Changeset 17144
- Timestamp:
- 01/17/14 16:31:39 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/analyses
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/ExtrapolationAnalysis.cpp
r17139 r17144 56 56 57 57 if(VerboseSolution()) _printf0_("extrapolation: call computational core:\n"); 58 UpdateConstraints(femmodel->elements); 58 59 solutionsequence_linear(femmodel); 59 60 … … 230 231 231 232 }/*}}}*/ 232 233 void ExtrapolationAnalysis::UpdateConstraints(Elements* elements){/*{{{*/ 234 235 for(int i=0;i<elements->Size();i++){ 236 Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 237 this->SetConstraintsOnIce(element); 238 } 239 240 }/*}}}*/ 241 void ExtrapolationAnalysis::SetConstraintsOnIce(Element* element){/*{{{*/ 242 243 int numnodes=element->GetNumberOfNodes(); 244 245 /* Intermediaries */ 246 int extvar_enum; 247 IssmDouble phi,value; 248 Node* node = NULL; 249 250 /* Get further parameters */ 251 element->FindParam(&extvar_enum, ExtrapolationVariableEnum); 252 253 Input* levelset_input=element->GetInput(MaskIceLevelsetEnum); _assert_(levelset_input); 254 Input* extvar_input=element->GetInput(extvar_enum); _assert_(extvar_input); 255 256 GaussPenta* gauss=new GaussPenta(); 257 for(int in=0;in<numnodes;in++){ 258 gauss->GaussNode(element->GetElementType(),in); 259 node=element->GetNode(in); 260 levelset_input->GetInputValue(&phi,gauss); 261 extvar_input->GetInputValue(&value,gauss); 262 if(phi<=0.){ 263 /* if ice, set dirichlet BC */ 264 node->ApplyConstraint(1,value); 265 } 266 else { 267 /* no ice, set no spc */ 268 node->DofInFSet(0); 269 } 270 } 271 delete gauss; 272 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/ExtrapolationAnalysis.h
r17139 r17144 30 30 void GetB(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss); 31 31 void GetBprime(IssmDouble* Bprime,Element* element,IssmDouble* xyz_list,Gauss* gauss); 32 32 void UpdateConstraints(Elements* elements); 33 void SetConstraintsOnIce(Element* element); 33 34 }; 34 35 #endif
Note:
See TracChangeset
for help on using the changeset viewer.