Changeset 7333
- Timestamp:
- 02/04/11 09:20:43 (14 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp
r7323 r7333 48 48 /*First, figure out which nodes that are on the ice sheet want to unground. Build a flags vector for this (size number of nodes: */ 49 49 potential_sheet_ungrounding=PotentialSheetUngrounding(elements,nodes,parameters); 50 50 51 51 /*Now, propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */ 52 52 sheet_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,parameters,potential_sheet_ungrounding); 53 53 54 54 /*Now, use the sheet_ungrounding flags to unground the ice sheet (at the same time, take care of grounding elements of the ice shelf 55 55 * that want to: */ … … 136 136 * nodes have flipped from grounded to ungrounded: */ 137 137 VecToMPISerial(&nodes_on_iceshelf,vec_nodes_on_iceshelf); 138 138 139 139 for(i=0;i<elements->Size();i++){ 140 140 element=(Element*)elements->GetObjectByOffset(i); 141 141 if(elements_touching_iceshelf[element->Sid()]){ 142 nflipped+=element->UpdatePotentialSheetUngrounding(potential_sheet_ungrounding,vec_nodes_on_iceshelf,nodes_on_iceshelf);142 local_nflipped+=element->UpdatePotentialSheetUngrounding(potential_sheet_ungrounding,vec_nodes_on_iceshelf,nodes_on_iceshelf); 143 143 } 144 144 } 145 145 146 146 MPI_Allreduce(&local_nflipped,&nflipped,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); 147 //_printf_(VerboseConvergence()," number of grounded vertices connected to grounding line: %i\n",nflipped); 148 _printf_(1," number of grounded vertices connected to grounding line: %i\n",nflipped); 147 _printf_(VerboseConvergence()," number of grounded vertices connected to grounding line: %i\n",nflipped); 149 148 150 149 /*Avoid leaks: */ 151 150 xfree((void**)&nodes_on_iceshelf); 151 152 /*Assemble:*/ 153 VecAssemblyBegin(vec_nodes_on_iceshelf); 154 VecAssemblyEnd(vec_nodes_on_iceshelf); 152 155 } 153 156 … … 162 165 } 163 166 /*}}}*/ 164 165 166 167 bool* CreateElementOnGroundingLine(Elements* elements,double* element_on_iceshelf){ //{{{1 167 168 … … 212 213 for(i=0;i<elements->Size();i++){ 213 214 element=(Element*)elements->GetObjectByOffset(i); 214 printf("%i\n",i);215 215 VecSetValue(vec_element_on_iceshelf,element->Sid(),(int)element->IsOnShelf(),INSERT_VALUES); 216 216 } … … 328 328 for(i=0;i<nodes->Size();i++){ 329 329 node=(Node*)nodes->GetObjectByOffset(i); 330 if(node->IsOnShelf())VecSetValue(nodes_on_iceshelf,node->Sid()+1,1,INSERT_VALUES); 330 if(node->InAnalysis(analysis_type)){ 331 if(node->IsOnShelf()){ 332 VecSetValue(nodes_on_iceshelf,node->Sid(),1.0,INSERT_VALUES); 333 } 334 } 331 335 } 332 336 -
issm/trunk/src/c/objects/Elements/Tria.cpp
r7323 r7333 4297 4297 } 4298 4298 /*}}}*/ 4299 /*FUNCTION Tria::IsNodeOnShelf {{{1*/4299 /*FUNCTION Tria::IsNodeOnShelfFromFlags {{{1*/ 4300 4300 bool Tria::IsNodeOnShelfFromFlags(double* flags){ 4301 4301 … … 5679 5679 if (potential_sheet_ungrounding[nodes[i]->Sid()]){ 5680 5680 VecSetValue(vec_nodes_on_iceshelf,nodes[i]->Sid(),1,INSERT_VALUES); 5681 5682 /*Figure out if we flipped: */ 5683 if (potential_sheet_ungrounding[nodes[i]->Sid()] != nodes_on_iceshelf[nodes[i]->Sid()])nflipped++; 5681 5684 } 5682 /*Figure out if we flipped: */5683 if (potential_sheet_ungrounding[nodes[i]->Sid()] != nodes_on_iceshelf[nodes[i]->Sid()])nflipped++;5684 5685 } 5685 5686 return nflipped; -
issm/trunk/src/c/solutions/groundinglinemigration2d_core.cpp
r7307 r7333 21 21 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 22 22 23 /*activate formulation: */ 24 femmodel->SetCurrentConfiguration(PrognosticAnalysisEnum); 25 23 26 _printf_(VerboseSolution(),"%s\n"," computing new grounding line position"); 24 27 GroundingLineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
Note:
See TracChangeset
for help on using the changeset viewer.