Changeset 24941


Ignore:
Timestamp:
05/31/20 22:04:40 (5 years ago)
Author:
Eric.Larour
Message:

CHG: further optimizations based on availability of areas and masks.

Location:
issm/trunk-jpl/src/c/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r24940 r24941  
    53355335        this->parameters->FindParam(&gsize,MeshNumberofverticesEnum);
    53365336
    5337         /*compute area of element:*/
    5338         area=GetAreaSpherical();
     5337        /*Get area of element: precomputed in the sealevelrise_core_geometry:*/
     5338        this->GetInput2Value(&area,AreaEnum);
    53395339
    53405340        /*element centroid (spherical): */
     
    54555455                IssmDouble area;
    54565456
    5457                 /*Compute area of element:*/
    5458                 area=GetAreaSpherical();
     5457                /*Get area of element:*/
     5458                this->GetInput2Value(&area,AreaEnum);
    54595459
    54605460                /*Average Sg over vertices:*/
     
    54795479        /*Compute area of element:*/
    54805480        IssmDouble area,eartharea;
    5481         area=GetAreaSpherical();
     5481        this->GetInput2Value(&area,AreaEnum);
    54825482
    54835483        /*recover earth area: */
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r24940 r24941  
    46404640        ns = elements->Size();
    46414641
    4642         /*First, figure out the surface area of Earth: */
    4643         for(int i=0;i<ns;i++){
    4644                 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
    4645         }
    4646 
    46474642        /*Figure out max of ns: */
    46484643        ISSM_MPI_Reduce(&ns,&nsmax,1,ISSM_MPI_INT,ISSM_MPI_MAX,0,IssmComm::GetComm());
     
    46944689        IssmDouble  eustatic_cpu   = 0.;
    46954690        IssmDouble  eustatic_cpu_e = 0.;
     4691        IssmDouble  area      = 0.;
    46964692        IssmDouble  oceanarea      = 0.;
    46974693        IssmDouble  oceanarea_cpu  = 0.;
     
    47074703        for(int i=0;i<elements->Size();i++){
    47084704                Element*   element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
    4709                 IssmDouble area=element->GetAreaSpherical();
     4705                element->GetInput2Value(&area,AreaEnum);
    47104706                if (masks->isoceanin[i]) oceanarea_cpu += area;
    47114707        }
Note: See TracChangeset for help on using the changeset viewer.