Changeset 26285
- Timestamp:
- 05/20/21 11:00:16 (4 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/BarystaticContributions.cpp
r26283 r26285 131 131 132 132 } /*}}}*/ 133 void BarystaticContributions::Reset(int eid){ /*{{{*/ 133 void BarystaticContributions::Reset(){ /*{{{*/ 134 135 136 ice->SetValue(0); 137 hydro->SetValue(0); 138 ocean->SetValue(0); 134 139 135 int id;136 if(nice){137 id=reCast<int>(pice[eid]);138 ice->SetValue(id,0.,INS_VAL);139 }140 else{141 ice->SetValue(0,0.,INS_VAL);142 }143 144 if(nhydro){145 id=reCast<int>(phydro[eid]);146 hydro->SetValue(id,0.,INS_VAL);147 }148 else{149 hydro->SetValue(0,0.,INS_VAL);150 }151 152 if(nocean){153 id=reCast<int>(pocean[eid]);154 ocean->SetValue(id,0.,INS_VAL);155 }156 else{157 ocean->SetValue(0,0.,INS_VAL);158 }159 160 161 140 } /*}}}*/ 162 141 void BarystaticContributions::Save(Results* results, Parameters* parameters, IssmDouble oceanarea){ /*{{{*/ -
issm/trunk-jpl/src/c/classes/BarystaticContributions.h
r26283 r26285 42 42 void Save(Results* results, Parameters* parameters, IssmDouble oceanarea); 43 43 void Set(int eid, IssmDouble icevalue, IssmDouble hydrovalue, IssmDouble oceanvalue); 44 void Reset( int eid);44 void Reset(); 45 45 46 46 }; -
issm/trunk-jpl/src/c/cores/sealevelchange_core.cpp
r26283 r26285 388 388 barycontrib->Cumulate(femmodel->parameters); 389 389 barycontrib->Save(femmodel->results,femmodel->parameters,oceanarea); 390 391 //Avoid double counting barystatic contributions in future time steps: reset all non-cumulative bscl to 0 392 for(Object* & object : femmodel->elements->objects){ 393 Element* element = xDynamicCast<Element*>(object); 394 barycontrib->Reset(element->Sid()); 395 } 390 barycontrib->Reset(); 396 391 } 397 392
Note:
See TracChangeset
for help on using the changeset viewer.