Changeset 20344


Ignore:
Timestamp:
03/24/16 14:43:24 (9 years ago)
Author:
Eric.Larour
Message:

CHG: simplified the solution by removing the Eustatic choice (which is now default). Also
modified the condition on which the eustatic level contribution is added for ice loading
elements, so as to better conserver mass!

File:
1 edited

Legend:

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

    r20321 r20344  
    36103610        bool computerigid = true;
    36113611        bool computeelastic= true;
    3612         bool computeeustatic = true;
    3613 
    36143612       
    36153613        /*early return if we are not on an ice cap:*/
    3616         if(IsWaterInElement() | !IsIceInElement()){
     3614        if(!(this->inputs->Max(MaskIceLevelsetEnum)<0)){
    36173615                *peustatic=0; //do not forget to assign this pointer, otherwise, global eustatic will be garbage!
    36183616                return;
     
    36273625        this->parameters->FindParam(&computerigid,SealevelriseRigidEnum);
    36283626        this->parameters->FindParam(&computeelastic,SealevelriseElasticEnum);
    3629         this->parameters->FindParam(&computeeustatic,SealevelriseEustaticEnum);
    36303627
    36313628        /*recover elastic green function:*/
     
    36393636        this->parameters->FindParam(&gsize,MeshNumberofverticesEnum);
    36403637
     3638        /* Where is the centroid of this element?:{{{*/
     3639       
    36413640        /*retrieve coordinates: */
    36423641        ::GetVerticesCoordinates(&llr_list[0][0],this->vertices,NUMVERTICES,spherical);
    36433642       
    3644         /* Where is the centroid of this element?:*/
    36453643        IssmDouble minlong=400;
    36463644        IssmDouble maxlong=-20;
     
    36753673        late=late/180*PI;
    36763674        longe=longe/180*PI;
     3675        /*}}}*/
    36773676
    36783677        /*Compute area of element:*/
     
    36853684
    36863685        /*Compute eustatic compoent:*/
    3687         if(computeeustatic) eustatic += rho_ice*area*I/(oceanarea*rho_water);
     3686        eustatic += rho_ice*area*I/(oceanarea*rho_water);
    36883687
    36893688        if(computeelastic | computerigid){
     
    37583757        bool computerigid = true;
    37593758        bool computeelastic= true;
    3760         bool computeeustatic = true;
    37613759
    37623760        /*early return if we are not on the ocean:*/
     
    37663764        this->parameters->FindParam(&computerigid,SealevelriseRigidEnum);
    37673765        this->parameters->FindParam(&computeelastic,SealevelriseElasticEnum);
    3768         this->parameters->FindParam(&computeeustatic,SealevelriseEustaticEnum);
    37693766       
    37703767        /*early return if rigid or elastic not requested:*/
     
    38583855                }
    38593856
    3860                 /*Add all components to the pSgi or pSgo solution vectors:*/
     3857                /*Add all components to the pSgo solution vectors:*/
    38613858                if(computerigid)values[i]+=3*rho_water/rho_earth*area/eartharea*I*G_rigid[i];
    38623859                if(computeelastic)values[i]+=3*rho_water/rho_earth*area/eartharea*I*G_elastic[i];
Note: See TracChangeset for help on using the changeset viewer.