Changeset 15055 for issm/trunk-jpl/src/c/analyses/steadystate_core.cpp
- Timestamp:
- 05/21/13 10:09:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/steadystate_core.cpp
r15001 r15055 14 14 #include "../modules/modules.h" 15 15 #include "../solutionsequences/solutionsequences.h" 16 17 /*Local prototypes*/ 18 bool steadystateconvergence(FemModel* femmodel); 16 19 17 20 void steadystate_core(FemModel* femmodel){ … … 91 94 xDelete<int>(requested_outputs); 92 95 } 96 bool steadystateconvergence(FemModel* femmodel){ 97 98 /*output: */ 99 bool converged=false; 100 bool velocity_converged=false; 101 bool temperature_converged=false; 102 103 /*intermediary: */ 104 int velocityenums[8]={VxEnum,VxPicardEnum,VyEnum,VyPicardEnum,VzEnum,VzPicardEnum,PressureEnum,PressurePicardEnum}; //pairs of enums (new and old) on which to carry out the converence tests 105 int temperatureenums[2]={TemperatureEnum,TemperatureOldEnum}; 106 int convergencecriterion[1]={RelativeEnum}; //criterions for convergence, RelativeEnum or AbsoluteEnum 107 IssmDouble convergencecriterionvalue[1]; //value of criterion to be respected 108 109 /*retrieve parameters: */ 110 femmodel->parameters->FindParam(&convergencecriterionvalue[0],SteadystateReltolEnum); 111 112 /*figure out convergence at the input level, because we don't have the solution vectors!: */ 113 velocity_converged=InputConvergencex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,&velocityenums[0],8,&convergencecriterion[0],&convergencecriterionvalue[0],1); 114 temperature_converged=InputConvergencex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,&temperatureenums[0],2,&convergencecriterion[0],&convergencecriterionvalue[0],1); 115 116 if(velocity_converged && temperature_converged) converged=true; 117 118 /*return: */ 119 return converged; 120 }
Note:
See TracChangeset
for help on using the changeset viewer.