Changeset 16272
- Timestamp:
- 09/30/13 09:25:47 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/thermal_core.cpp
r16219 r16272 34 34 35 35 if(VerboseSolution()) _printf0_(" setting basal Dirichlet boundary conditions\n"); 36 femmodel->Update ThermalBasalConstraintsx();36 femmodel->UpdateBasalConstraintsEnthalpyx(); 37 37 38 38 if(VerboseSolution()) _printf0_(" computing temperatures\n"); -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r16238 r16272 126 126 127 127 #ifdef _HAVE_THERMAL_ 128 virtual void Update ThermalBasalConstraints(void)=0;128 virtual void UpdateBasalConstraintsEnthalpy(void)=0; 129 129 virtual void ComputeBasalMeltingrate(void)=0; 130 130 virtual void DrainWaterfraction(void)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16238 r16272 4577 4577 } 4578 4578 else{ 4579 // only base temperate, set Dirichlet BCs in Penta::Update ThermalBasalConstraints()4579 // only base temperate, set Dirichlet BCs in Penta::UpdateBasalConstraintsEnthalpy() 4580 4580 } 4581 4581 } … … 4992 4992 } 4993 4993 /*}}}*/ 4994 /*FUNCTION Penta::Update ThermalBasalConstraints{{{*/4995 void Penta::Update ThermalBasalConstraints(void){4994 /*FUNCTION Penta::UpdateBasalConstraintsEnthalpy{{{*/ 4995 void Penta::UpdateBasalConstraintsEnthalpy(void){ 4996 4996 4997 4997 /*Intermediary*/ … … 5008 5008 parameters->FindParam(&isenthalpy,ThermalIsenthalpyEnum); 5009 5009 if(!isenthalpy) return; 5010 //parameters->FindParam(&isdynamicbasalspc,ThermalIsdynamicbasalspcEnum);5011 isdynamicbasalspc = true; 5010 parameters->FindParam(&isdynamicbasalspc,ThermalIsdynamicbasalspcEnum); 5011 isdynamicbasalspc = true; // TODO: remove before release 5012 5012 if(!isdynamicbasalspc) return; 5013 5013 … … 5026 5026 for(int i=0;i<numindices;i++){ 5027 5027 gauss->GaussNode(this->element_type,indices[i]); 5028 gaussup->GaussNode(this->element_type,indicesup[i]); // TODO: check: are the nodes corresponding?5029 5030 /*Check wether there is a temperate layer at the base or not -> TODO: Johannes:)*/5031 /*check if node is temperate, if not, return*/5028 gaussup->GaussNode(this->element_type,indicesup[i]); 5029 5030 /*Check wether there is a temperate layer at the base or not */ 5031 /*check if node is temperate, if not, continue*/ 5032 5032 enthalpy_input->GetInputValue(&enthalpy, gauss); 5033 5033 pressure_input->GetInputValue(&pressure, gauss); 5034 5034 if (enthalpy<matpar->PureIceEnthalpy(pressure)){ 5035 // TODO: reset, if necessary, all spcs to non-valid5036 5035 continue; 5037 5036 } 5038 /*check if upper node is temperate. if yes, then we have a temperate layer of positive thickness. if not, continue.*/ 5037 /*check if upper node is temperate. 5038 if yes, then we have a temperate layer of positive thickness and 5039 reset the spc. 5040 if not, apply dirichlet BC.*/ 5039 5041 enthalpy_input->GetInputValue(&enthalpyup, gaussup); 5040 5042 pressure_input->GetInputValue(&pressureup, gaussup); … … 5047 5049 /*Calculate enthalpy at pressure melting point */ 5048 5050 h_pmp=matpar->PureIceEnthalpy(pressure); 5049 5050 5051 /*Apply Dirichlet condition (dof = 0 here, since there is only one degree of freedom per node)*/ 5051 5052 nodes[indices[i]]->ApplyConstraint(1,h_pmp); -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r16238 r16272 347 347 void InputUpdateFromSolutionThermal(IssmDouble* solutiong); 348 348 void InputUpdateFromSolutionEnthalpy(IssmDouble* solutiong); 349 void Update ThermalBasalConstraints(void);349 void UpdateBasalConstraintsEnthalpy(void); 350 350 void ComputeBasalMeltingrate(void); 351 351 void DrainWaterfraction(void); -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r16255 r16272 250 250 251 251 #ifdef _HAVE_THERMAL_ 252 void Update ThermalBasalConstraints(void){_error_("not implemented yet");};252 void UpdateBasalConstraintsEnthalpy(void){_error_("not implemented yet");}; 253 253 void ComputeBasalMeltingrate(void){_error_("not implemented yet");}; 254 254 void DrainWaterfraction(void){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r16192 r16272 1242 1242 #endif 1243 1243 #ifdef _HAVE_THERMAL_ 1244 void FemModel::Update ThermalBasalConstraintsx(void){ /*{{{*/1244 void FemModel::UpdateBasalConstraintsEnthalpyx(void){ /*{{{*/ 1245 1245 1246 1246 for(int i=0;i<elements->Size();i++){ 1247 1247 Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 1248 element->Update ThermalBasalConstraints();1248 element->UpdateBasalConstraintsEnthalpy(); 1249 1249 } 1250 1250 -
issm/trunk-jpl/src/c/classes/FemModel.h
r16126 r16272 100 100 #endif 101 101 #ifdef _HAVE_THERMAL_ 102 void Update ThermalBasalConstraintsx(void);102 void UpdateBasalConstraintsEnthalpyx(void); 103 103 #endif 104 104 }; -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r16240 r16272 84 84 parameters->AddObject(iomodel->CopyConstantObject(TransientIsgiaEnum)); 85 85 parameters->AddObject(iomodel->CopyConstantObject(ThermalIsenthalpyEnum)); 86 parameters->AddObject(iomodel->CopyConstantObject(ThermalIsdynamicbasalspcEnum)); 86 87 parameters->AddObject(iomodel->CopyConstantObject(MaterialsRheologyLawEnum)); 87 88 parameters->AddObject(iomodel->CopyConstantObject(AutodiffIsautodiffEnum)); -
issm/trunk-jpl/src/c/modules/PostprocessingEnthalpyx/PostprocessingEnthalpyx.cpp
r16032 r16272 12 12 Element* element=NULL; 13 13 14 /*drain excess water fraction: */ 15 for (i=0;i<femmodel->elements->Size();i++){ 16 element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i)); 17 element->DrainWaterfraction(); 18 } 19 14 20 15 /*Compute basal melting rates: */ 21 16 for (i=0;i<femmodel->elements->Size();i++){ … … 24 19 } 25 20 21 /*drain excess water fraction: */ 22 /* for (i=0;i<femmodel->elements->Size();i++){ 23 element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i)); 24 element->DrainWaterfraction(); 25 } 26 */ 27 26 28 /*Update basal dirichlet BCs for enthalpy: */ 27 29 for (i=0;i<femmodel->elements->Size();i++){ 28 30 element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i)); 29 element->Update ThermalBasalConstraints();31 element->UpdateBasalConstraintsEnthalpy(); 30 32 } 31 33 }
Note:
See TracChangeset
for help on using the changeset viewer.