source: issm/oecreview/Archive/24307-24683/ISSM-24483-24484.diff@ 24684

Last change on this file since 24684 was 24684, checked in by Mathieu Morlighem, 5 years ago

CHG: added new review

File size: 2.4 KB
  • ../trunk-jpl/src/c/classes/FemModel.cpp

     
    53385338                hmaxvertices_serial=xNew<IssmDouble>(numberofvertices);
    53395339                for(int i=0;i<numberofvertices;i++) hmaxvertices_serial[i]=NAN;
    53405340                /*Fill hmaxvertices*/
     5341                if(this->amrbamg->thicknesserror_threshold>0)   this->GethmaxVerticesFromEstimators(hmaxvertices_serial,ThicknessErrorEstimatorEnum);
     5342                if(this->amrbamg->deviatoricerror_threshold>0)  this->GethmaxVerticesFromEstimators(hmaxvertices_serial,DeviatoricStressErrorEstimatorEnum);
    53415343                if(this->amrbamg->groundingline_distance>0)             this->GethmaxVerticesFromZeroLevelSetDistance(hmaxvertices_serial,MaskGroundediceLevelsetEnum);
    53425344                if(this->amrbamg->icefront_distance>0)                          this->GethmaxVerticesFromZeroLevelSetDistance(hmaxvertices_serial,MaskIceLevelsetEnum);
    5343                 if(this->amrbamg->thicknesserror_threshold>0)   this->GethmaxVerticesFromEstimators(hmaxvertices_serial,ThicknessErrorEstimatorEnum);
    5344                 if(this->amrbamg->deviatoricerror_threshold>0)  this->GethmaxVerticesFromEstimators(hmaxvertices_serial,DeviatoricStressErrorEstimatorEnum);
    53455345        }
    53465346
    53475347        if(my_rank==0){
     
    55215521        IssmDouble L1,L2,L3;
    55225522        int vid,v1,v2,v3;
    55235523        bool refine;
     5524       
    55245525
    55255526        /*Fill variables*/
    55265527        switch(errorestimator_type){
     
    55425543        }
    55435544        if(!error_elements) _error_("error_elements is NULL!\n");
    55445545        if(groupthreshold<DBL_EPSILON) _error_("group threshold is too small!");
     5546       
     5547        /*Get mesh*/
     5548        this->GetMesh(&index,&x,&y,&numberofvertices,&numberofelements);
     5549        if(numberofelements<0) _error_("number of elements is negative!\n");
     5550        if(numberofvertices<0) _error_("number of vertices is negative!\n");
     5551        maxlength               = xNew<IssmDouble>(numberofelements);
     5552        error_vertices  = xNewZeroInit<IssmDouble>(numberofvertices);
    55455553
    55465554        /*Find the max of the estimators if it was not provided*/
    55475555        if(maxerror<DBL_EPSILON){
     
    55525560        }
    55535561        }
    55545562
    5555         /*Get mesh*/
    5556         this->GetMesh(&index,&x,&y,&numberofvertices,&numberofelements);
    5557         maxlength               = xNew<IssmDouble>(numberofelements);
    5558         error_vertices  = xNewZeroInit<IssmDouble>(numberofvertices);
    5559 
    55605563        /*Fill error_vertices (this is the sum of all elements connected to the vertex)*/
    55615564        for(int i=0;i<numberofelements;i++){
    55625565                v1=index[i*elementswidth+0]-1;//Matlab to C indexing
Note: See TracBrowser for help on using the repository browser.