- Timestamp:
- 09/19/12 09:32:34 (12 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:ignore
-
old new 1 projects 1 2 autom4te.cache 2 3 aclocal.m4
-
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 12710-12871,12873-12877,12881-12896,12898-12900,12902-12916,12920-12935,12937-12945,12948-13100,13107-13110,13112-13116,13119-13393
- Property svn:ignore
-
issm/trunk/src
-
Property svn:mergeinfo
set to
/issm/branches/trunk-jpl-damage/src merged eligible /issm/trunk-jpl/src merged eligible
-
Property svn:mergeinfo
set to
-
issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
r12706 r13395 14 14 15 15 int i, migration_style,analysis_type; 16 double* vertices_potentially_ungrounding = NULL;17 double* vertices_ungrounding = NULL;18 double* old_floatingice = NULL;19 Vector * vec_old_floatingice = NULL;16 IssmDouble* vertices_potentially_ungrounding = NULL; 17 IssmDouble* vertices_ungrounding = NULL; 18 IssmDouble* old_floatingice = NULL; 19 Vector<IssmDouble>* vec_old_floatingice = NULL; 20 20 Element* element = NULL; 21 21 … … 27 27 28 28 if(migration_style==NoneEnum) return; 29 if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error 2_(EnumToStringx(migration_style) << " not supported yet!");29 if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error_(EnumToStringx(migration_style) << " not supported yet!"); 30 30 31 31 if(migration_style==SoftMigrationEnum){ … … 49 49 /*free ressouces: */ 50 50 xdelete(&vec_old_floatingice); 51 xDelete< double>(vertices_potentially_ungrounding);52 xDelete< double>(vertices_ungrounding);53 xDelete< double>(old_floatingice);51 xDelete<IssmDouble>(vertices_potentially_ungrounding); 52 xDelete<IssmDouble>(vertices_ungrounding); 53 xDelete<IssmDouble>(old_floatingice); 54 54 } 55 55 56 56 /*FUNCTION CreateNodesOnFloatingIce {{{*/ 57 Vector * CreateNodesOnFloatingIce(Nodes* nodes,int configuration_type){57 Vector<IssmDouble>* CreateNodesOnFloatingIce(Nodes* nodes,int configuration_type){ 58 58 59 59 int i,numnods; 60 Vector * vec_nodes_on_floatingice = NULL;60 Vector<IssmDouble>* vec_nodes_on_floatingice = NULL; 61 61 Node *node = NULL; 62 62 63 63 /*First, initialize nodes_on_floatingice, which will track which nodes have changed status: */ 64 64 numnods=nodes->NumberOfNodes(configuration_type); 65 vec_nodes_on_floatingice=new Vector (numnods);65 vec_nodes_on_floatingice=new Vector<IssmDouble>(numnods); 66 66 67 67 /*Loop through nodes, and fill vec_nodes_on_floatingice: */ … … 82 82 /*%}}}*/ 83 83 /*FUNCTION PotentialSheetUngrounding {{{*/ 84 double* PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){84 IssmDouble* PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){ 85 85 86 86 int i,numberofvertices; 87 double* vertices_potentially_ungrounding = NULL;88 Vector * vec_vertices_potentially_ungrounding = NULL;87 IssmDouble* vertices_potentially_ungrounding = NULL; 88 Vector<IssmDouble>* vec_vertices_potentially_ungrounding = NULL; 89 89 Element* element = NULL; 90 90 91 91 /*Initialize vector with number of vertices*/ 92 92 numberofvertices=vertices->NumberOfVertices(); 93 vec_vertices_potentially_ungrounding=new Vector (numberofvertices); //grounded vertex that could start floating93 vec_vertices_potentially_ungrounding=new Vector<IssmDouble>(numberofvertices); //grounded vertex that could start floating 94 94 95 95 /*Fill vector vertices_potentially_floating: */ … … 109 109 /*}}}*/ 110 110 /*FUNCTION PropagateFloatingiceToGroundedNeighbors {{{*/ 111 double* PropagateFloatingiceToGroundedNeighbors(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,double* vertices_potentially_ungrounding){111 IssmDouble* PropagateFloatingiceToGroundedNeighbors(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,IssmDouble* vertices_potentially_ungrounding){ 112 112 113 113 int i,analysis_type; 114 114 int numberofvertices; 115 115 int nflipped,local_nflipped; 116 double* nodes_on_floatingice = NULL;117 double* elements_neighboring_floatingce = NULL;118 Vector * vec_elements_neighboring_floatingice = NULL;119 Vector * vec_nodes_on_floatingice = NULL;116 IssmDouble* nodes_on_floatingice = NULL; 117 IssmDouble* elements_neighboring_floatingce = NULL; 118 Vector<IssmDouble>* vec_elements_neighboring_floatingice = NULL; 119 Vector<IssmDouble>* vec_nodes_on_floatingice = NULL; 120 120 Node* node = NULL; 121 121 Element* element = NULL; … … 134 134 135 135 /*Vector of size number of elements*/ 136 vec_elements_neighboring_floatingice=new Vector (elements->NumberOfElements(),true);136 vec_elements_neighboring_floatingice=new Vector<IssmDouble>(elements->NumberOfElements(),true); 137 137 138 138 /*Figure out if any of the nodes of the element will be floating -> elements neighbouting the floating ice*/ … … 150 150 for(i=0;i<elements->Size();i++){ 151 151 element=(Element*)elements->GetObjectByOffset(i); 152 if( elements_neighboring_floatingce[element->Sid()]){152 if(reCast<int,IssmDouble>(elements_neighboring_floatingce[element->Sid()])){ 153 153 local_nflipped+=element->UpdatePotentialSheetUngrounding(vertices_potentially_ungrounding,vec_nodes_on_floatingice,nodes_on_floatingice); 154 154 } … … 164 164 165 165 /*Avoid leaks: */ 166 xDelete< double>(elements_neighboring_floatingce);167 xDelete< double>(nodes_on_floatingice);166 xDelete<IssmDouble>(elements_neighboring_floatingce); 167 xDelete<IssmDouble>(nodes_on_floatingice); 168 168 169 169 /*Assemble and serialize:*/ … … 174 174 /*Free ressources:*/ 175 175 xdelete(&vec_nodes_on_floatingice); 176 xDelete< double>(elements_neighboring_floatingce);176 xDelete<IssmDouble>(elements_neighboring_floatingce); 177 177 178 178 return nodes_on_floatingice;
Note:
See TracChangeset
for help on using the changeset viewer.