Changeset 10354
- Timestamp:
- 10/28/11 15:57:46 (14 years ago)
- Location:
- issm/trunk/src/c/modules/GroundinglineMigrationx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
r10309 r10354 39 39 40 40 /*Create flag for nodes above the hydrostatic equilibrium: */ 41 double* potential_sheet_ungrounding=PotentialSheetUngrounding(elements,nodes,parameters);41 double* vertices_potentially_ungrounding=PotentialSheetUngrounding(elements,vertices,parameters); 42 42 43 43 /*propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */ 44 double* sheet_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,parameters, potential_sheet_ungrounding);44 double* sheet_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,parameters,vertices_potentially_ungrounding); 45 45 46 46 /*Now, use the sheet_ungrounding flags to unground the ice sheet (at the same time, take care of grounding elements of the ice shelf … … 58 58 59 59 /*free ressouces: */ 60 xfree((void**)& potential_sheet_ungrounding);60 xfree((void**)&vertices_potentially_ungrounding); 61 61 xfree((void**)&sheet_ungrounding); 62 62 } -
issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxLocal.h
r10309 r10354 7 7 8 8 class Elements; 9 class Vertices; 9 10 class Nodes; 10 11 class Parameters; 11 12 12 13 /* local prototypes: */ 13 double* PotentialSheetUngrounding(Elements* elements, Nodes* nodes,Parameters* parameters);14 double* PropagateShelfIntoConnexIceSheet(Elements* elements,Nodes* nodes,Parameters* parameters,double* potential_sheet_ungrounding);14 double* PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters); 15 double* PropagateShelfIntoConnexIceSheet(Elements* elements,Nodes* nodes,Parameters* parameters,double* vertices_potentially_ungrounding); 15 16 bool* CreateElementOnGroundingline(Elements* elements,double* element_on_iceshelf); 16 17 double* CreateElementOnIceShelf(Elements* elements); -
issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxUtils.cpp
r10309 r10354 7 7 #include "../../shared/shared.h" 8 8 #include "../../io/io.h" 9 #include "../../io/io.h"10 9 #include "../../include/include.h" 11 10 #include "../../toolkits/toolkits.h" … … 13 12 14 13 /*FUNCTION PotentialSheetUngrounding {{{1*/ 15 double* PotentialSheetUngrounding(Elements* elements,Nodes* nodes,Parameters* parameters){ 16 17 int i; 18 Element* element=NULL; 19 Vec vec_potential_sheet_ungrounding=NULL; 20 double* potential_sheet_ungrounding=NULL; 21 int numnods; 22 int configuration_type; 23 24 /*recover parameters: */ 25 parameters->FindParam(&configuration_type,ConfigurationTypeEnum); 26 27 /*First, initialize vec_new_shelf_nodes, which will track which nodes have changed status: */ 28 numnods=nodes->NumberOfNodes(configuration_type); 29 vec_potential_sheet_ungrounding=NewVec(numnods); 30 31 /*Loop through elements, and fill vec_potential_sheet_ungrounding: */ 32 for(i=0;i<elements->Size();i++){ 33 element=(Element*)elements->GetObjectByOffset(i); 34 element->PotentialSheetUngrounding(vec_potential_sheet_ungrounding); 35 } 36 37 /*Assemble vector: */ 38 VecAssemblyBegin(vec_potential_sheet_ungrounding); 39 VecAssemblyEnd(vec_potential_sheet_ungrounding); 14 double* PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){ 15 16 int i,numberofvertices; 17 double* vertices_potentially_ungrounding = NULL; 18 Vec vec_vertices_potentially_ungrounding = NULL; 19 Element* element = NULL; 20 21 /*Initialize vector with number of vertices*/ 22 numberofvertices=vertices->NumberOfVertices(); 23 vec_vertices_potentially_ungrounding=NewVec(numberofvertices); //grounded vertex that could start floating 24 25 /*Fill vector vertices_potentially_floating: */ 26 for(i=0;i<elements->Size();i++){ 27 element=(Element*)elements->GetObjectByOffset(i); 28 element->PotentialSheetUngrounding(vec_vertices_potentially_ungrounding); 29 } 30 31 /*Assemble vector: */ 32 VecAssemblyBegin(vec_vertices_potentially_ungrounding); 33 VecAssemblyEnd(vec_vertices_potentially_ungrounding); 40 34 41 35 /*Serialize vector: */ 42 VecToMPISerial(&potential_sheet_ungrounding,vec_potential_sheet_ungrounding); 43 44 /*free ressouces: */ 45 VecFree(&vec_potential_sheet_ungrounding); 46 47 return potential_sheet_ungrounding; 36 VecToMPISerial(&vertices_potentially_ungrounding,vec_vertices_potentially_ungrounding); 37 38 /*free ressouces and return: */ 39 VecFree(&vec_vertices_potentially_ungrounding); 40 return vertices_potentially_ungrounding; 48 41 } 49 42 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.