Changeset 3384


Ignore:
Timestamp:
04/05/10 08:59:20 (15 years ago)
Author:
Mathieu Morlighem
Message:

first debugging of Hokks

Location:
issm/trunk/src/c/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/ElementProperties.cpp

    r3383 r3384  
    2323       
    2424        int i;
    25 
    2625
    2726        /*initialize to 0 every value: */
     
    6059
    6160        if(elementproperties_h)this->h=(double*)xmalloc(this->numnodes*sizeof(double));
     61        else this->h=NULL;
    6262        if(elementproperties_s)this->s=(double*)xmalloc(this->numnodes*sizeof(double));
     63        else this->s=NULL;
    6364        if(elementproperties_b)this->b=(double*)xmalloc(this->numnodes*sizeof(double));
     65        else this->b=NULL;
    6466        if(elementproperties_k)this->k=(double*)xmalloc(this->numnodes*sizeof(double));
     67        else this->k=NULL;
    6568        if(elementproperties_melting)this->melting=(double*)xmalloc(this->numnodes*sizeof(double));
     69        else this->melting=NULL;
    6670        if(elementproperties_accumulation)this->accumulation=(double*)xmalloc(this->numnodes*sizeof(double));
     71        else this->accumulation=NULL;
    6772        if(elementproperties_geothermalflux)this->geothermalflux=(double*)xmalloc(this->numnodes*sizeof(double));
     73        else this->geothermalflux=NULL;
    6874
    6975        for(i=0;i<this->numnodes;i++){
     
    324330        int i;
    325331       
    326         printf("   h=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");
    327         printf("   s=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");
    328         printf("   b=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");
    329         printf("   melting=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");
    330         printf("   accumulation=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");
    331         printf("   geothermalflux=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->geothermalflux[i]);printf("]\n");
     332        if (h)              {printf("   h=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");}
     333        if (s)              {printf("   s=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");}
     334        if (b)              {printf("   b=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");}
     335        if (melting)        {printf("   melting=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");}
     336        if (accumulation)   {printf("   accumulation=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");}
     337        printf("Pointer geothermal flux2= %p\n",this->geothermalflux);
    332338        printf("   friction_type: %i\n",friction_type);
    333339        printf("   p: %g\n",p);
  • issm/trunk/src/c/objects/Numericalflux.cpp

    r3378 r3384  
    392392/*FUNCTION Numericalflux::PenaltyCreateKMatrixInternal {{{1*/
    393393void  Numericalflux::PenaltyCreateKMatrixInternal(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
     394        double   start, finish;
     395        start=MPI_Wtime();
    394396
    395397        /* local declarations */
     
    492494
    493495        /*Add Ke_gg to global matrix Kgg: */
     496        start=MPI_Wtime();
    494497        MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES);
    495 
     498        finish=MPI_Wtime();
     499        printf("internal inserting K of edge %i matrix: %g\n",id,finish-start);
    496500
    497501        xfree((void**)&gauss_coords);
     
    501505/*FUNCTION Numericalflux::PenaltyCreateKMatrixBoundary {{{1*/
    502506void  Numericalflux::PenaltyCreateKMatrixBoundary(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
     507        double   start, finish;
     508        start=MPI_Wtime();
    503509
    504510        /* local declarations */
     
    565571                return;
    566572        }
     573        printf("%i made it through!\n",id);
    567574
    568575        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
     
    603610
    604611        /*Add Ke_gg to global matrix Kgg: */
     612        start=MPI_Wtime();
    605613        MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES);
     614        finish=MPI_Wtime();
     615        printf("boundary inserting K of edge %i matrix: %g\n",id,finish-start);
    606616
    607617        xfree((void**)&gauss_coords);
Note: See TracChangeset for help on using the changeset viewer.