Changeset 20462
- Timestamp:
- 04/07/16 14:55:28 (9 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/DofIndexing.cpp
r19255 r20462 28 28 this->clone = false; 29 29 this->active = true; 30 this->freeze = false; 30 31 this->f_set = NULL; 31 32 this->s_set = NULL; … … 51 52 this->clone = in->clone; 52 53 this->active = in->active; 54 this->freeze = in->freeze; 53 55 54 56 if(this->gsize>0){ … … 112 114 this->clone = in.clone; 113 115 this->active = in.active; 116 this->freeze = in.freeze; 114 117 115 118 if(this->gsize>0){ … … 219 222 _printf_(" clone: " << clone << "\n"); 220 223 _printf_(" active: " << active << "\n"); 224 _printf_(" freeze: " << freeze << "\n"); 221 225 } 222 226 /*}}}*/ … … 231 235 _printf_(" clone: " << clone << "\n"); 232 236 _printf_(" active: " << active << "\n"); 237 _printf_(" freeze: " << freeze << "\n"); 233 238 234 239 _printf_(" set membership: f,s sets \n"); … … 284 289 /*}}}*/ 285 290 void DofIndexing::Activate(void){/*{{{*/ 291 286 292 this->active = true; 287 293 … … 302 308 MARSHALLING(clone); 303 309 MARSHALLING(active); 310 MARSHALLING(freeze); 304 311 MARSHALLING_DYNAMIC(f_set,bool,gsize); 305 312 MARSHALLING_DYNAMIC(s_set,bool,gsize); -
issm/trunk-jpl/src/c/classes/DofIndexing.h
r19199 r20462 18 18 19 19 /*partitioning: */ 20 bool clone; //this node is replicated from another one 21 bool active; //Is this node active or inactive (all dofs are constrained) 20 bool clone; //this node is replicated from another one 21 bool active; //Is this node active or inactive (all dofs are constrained) 22 bool freeze; //this is required for 2d solutions, we never activate nodes that are not on base 22 23 23 24 /*boundary conditions sets: */ -
issm/trunk-jpl/src/c/classes/Loads/Riftfront.cpp
r19254 r20462 253 253 void Riftfront::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/ 254 254 255 _error_("not implemented yet");255 /*Nothing to update*/ 256 256 257 257 } -
issm/trunk-jpl/src/c/classes/Node.cpp
r20134 r20462 64 64 _assert_(iomodel->Data(FlowequationVertexEquationEnum)); 65 65 if(in_approximation==SSAApproximationEnum && !reCast<int>(iomodel->Data(MeshVertexonbaseEnum)[io_index])){ 66 this-> Deactivate();66 this->HardDeactivate(); 67 67 } 68 68 if(in_approximation==L1L2ApproximationEnum && !reCast<int>(iomodel->Data(MeshVertexonbaseEnum)[io_index])){ 69 this-> Deactivate();69 this->HardDeactivate(); 70 70 } 71 71 if(in_approximation==SSAHOApproximationEnum && reCast<int>(iomodel->Data(FlowequationBorderSSAEnum)[io_index])){ 72 72 if(!reCast<int>(iomodel->Data(MeshVertexonbaseEnum)[io_index])){ 73 this-> Deactivate();73 this->HardDeactivate(); 74 74 } 75 75 } … … 82 82 /*spc all nodes on SIA*/ 83 83 if(in_approximation==SIAApproximationEnum){ 84 this-> Deactivate();84 this->HardDeactivate(); 85 85 } 86 86 } … … 101 101 _assert_(iomodel->Data(MeshVertexonbaseEnum)); 102 102 if(!(reCast<bool>(iomodel->Data(MeshVertexonbaseEnum)[io_index]))){ 103 this-> Deactivate();103 this->HardDeactivate(); 104 104 } 105 105 } … … 112 112 _assert_(iomodel->Data(MeshVertexonsurfaceEnum)); 113 113 if(!(reCast<bool>(iomodel->Data(MeshVertexonsurfaceEnum)[io_index]))){ 114 this-> Deactivate();114 this->HardDeactivate(); 115 115 } 116 116 } … … 463 463 464 464 if(this->indexing.f_set[dof] == 1){ 465 //if(this->indexing.freeze) _error_("Cannot change dof of frozen node"); 465 466 this->indexingupdate = true; 466 467 this->indexing.f_set[dof]=0; //n splits into f (for which we solve) and s (single point constraints) … … 476 477 477 478 if(this->indexing.f_set[dof] == 0){ 479 if(this->indexing.freeze) _error_("Cannot change dof of frozen node"); 478 480 this->indexingupdate = true; 479 481 this->indexing.f_set[dof]=1; … … 485 487 486 488 DofInSSet(dof); //with 0 displacement for this dof. 489 //FIXME: for now we don't want this element to change so we use freeze 490 this->indexing.freeze =true; 487 491 488 492 } … … 490 494 void Node::Deactivate(void){/*{{{*/ 491 495 492 if(IsActive() ){496 if(IsActive() && !this->indexing.freeze){ 493 497 this->indexingupdate = true; 494 498 indexing.Deactivate(); … … 497 501 } 498 502 /*}}}*/ 503 void Node::HardDeactivate(void){/*{{{*/ 504 505 this->indexing.Deactivate(); 506 this->indexing.freeze =true; 507 508 } 509 /*}}}*/ 499 510 void Node::Activate(void){/*{{{*/ 500 511 501 if(!IsActive() ){512 if(!IsActive() && !this->indexing.freeze){ 502 513 this->indexingupdate = true; 503 514 indexing.Activate(); -
issm/trunk-jpl/src/c/classes/Node.h
r19199 r20462 73 73 void Activate(void); 74 74 void Deactivate(void); 75 void HardDeactivate(void); 75 76 void ReindexingDone(void); 76 77 bool RequiresDofReindexing(void); -
issm/trunk-jpl/src/c/modules/SetActiveNodesLSMx/SetActiveNodesLSMx.cpp
r20457 r20462 49 49 } 50 50 51 /* if solving 2d problem on vertically extende mesh, solve on basal layer only*/52 if(domaintype!=Domain2DhorizontalEnum){53 femmodel->parameters->FindParam(&analysis_type,AnalysisTypeEnum);54 if(55 analysis_type==FreeSurfaceBaseAnalysisEnum ||56 analysis_type==MasstransportAnalysisEnum ||57 analysis_type==MeltingAnalysisEnum ||58 analysis_type==L2ProjectionBaseAnalysisEnum ||59 analysis_type==BalancethicknessAnalysisEnum ||60 analysis_type==HydrologyDCInefficientAnalysisEnum ||61 //analysis_type==DamageEvolutionAnalysisEnum ||62 analysis_type==HydrologyDCEfficientAnalysisEnum ||63 analysis_type==LevelsetAnalysisEnum ||64 analysis_type==ExtrapolationAnalysisEnum65 ){ solvein2d=true;}66 67 if(analysis_type==StressbalanceAnalysisEnum){68 bool isSIA,isSSA,isL1L2;69 femmodel->parameters->FindParam(&isSIA,FlowequationIsSIAEnum);70 femmodel->parameters->FindParam(&isSSA,FlowequationIsSSAEnum);71 femmodel->parameters->FindParam(&isL1L2,FlowequationIsL1L2Enum);72 if(isSIA || isSSA || isL1L2)73 solvein2d=true;74 }75 76 if(solvein2d){77 IssmDouble *mask_isonbase = xNew<IssmDouble>(numnodes);78 element->GetInputListOnNodes(&mask_isonbase[0],MeshVertexonbaseEnum);79 for(in=0;in<numnodes;in++) mask[in]*=mask_isonbase[in];80 xDelete<IssmDouble>(mask_isonbase);81 }82 }83 84 51 for(in=0;in<numnodes;in++){ 85 52 Node* node=element->GetNode(in);
Note:
See TracChangeset
for help on using the changeset viewer.