Changeset 20344
- Timestamp:
- 03/24/16 14:43:24 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r20321 r20344 3610 3610 bool computerigid = true; 3611 3611 bool computeelastic= true; 3612 bool computeeustatic = true;3613 3614 3612 3615 3613 /*early return if we are not on an ice cap:*/ 3616 if( IsWaterInElement() | !IsIceInElement()){3614 if(!(this->inputs->Max(MaskIceLevelsetEnum)<0)){ 3617 3615 *peustatic=0; //do not forget to assign this pointer, otherwise, global eustatic will be garbage! 3618 3616 return; … … 3627 3625 this->parameters->FindParam(&computerigid,SealevelriseRigidEnum); 3628 3626 this->parameters->FindParam(&computeelastic,SealevelriseElasticEnum); 3629 this->parameters->FindParam(&computeeustatic,SealevelriseEustaticEnum);3630 3627 3631 3628 /*recover elastic green function:*/ … … 3639 3636 this->parameters->FindParam(&gsize,MeshNumberofverticesEnum); 3640 3637 3638 /* Where is the centroid of this element?:{{{*/ 3639 3641 3640 /*retrieve coordinates: */ 3642 3641 ::GetVerticesCoordinates(&llr_list[0][0],this->vertices,NUMVERTICES,spherical); 3643 3642 3644 /* Where is the centroid of this element?:*/3645 3643 IssmDouble minlong=400; 3646 3644 IssmDouble maxlong=-20; … … 3675 3673 late=late/180*PI; 3676 3674 longe=longe/180*PI; 3675 /*}}}*/ 3677 3676 3678 3677 /*Compute area of element:*/ … … 3685 3684 3686 3685 /*Compute eustatic compoent:*/ 3687 if(computeeustatic)eustatic += rho_ice*area*I/(oceanarea*rho_water);3686 eustatic += rho_ice*area*I/(oceanarea*rho_water); 3688 3687 3689 3688 if(computeelastic | computerigid){ … … 3758 3757 bool computerigid = true; 3759 3758 bool computeelastic= true; 3760 bool computeeustatic = true;3761 3759 3762 3760 /*early return if we are not on the ocean:*/ … … 3766 3764 this->parameters->FindParam(&computerigid,SealevelriseRigidEnum); 3767 3765 this->parameters->FindParam(&computeelastic,SealevelriseElasticEnum); 3768 this->parameters->FindParam(&computeeustatic,SealevelriseEustaticEnum);3769 3766 3770 3767 /*early return if rigid or elastic not requested:*/ … … 3858 3855 } 3859 3856 3860 /*Add all components to the pSg i or pSgo solution vectors:*/3857 /*Add all components to the pSgo solution vectors:*/ 3861 3858 if(computerigid)values[i]+=3*rho_water/rho_earth*area/eartharea*I*G_rigid[i]; 3862 3859 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.