Changeset 4005
- Timestamp:
- 06/03/10 07:37:08 (15 years ago)
- Location:
- issm/trunk/src/c/modules/ModelProcessorx
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/ModelProcessorx/Balancedthickness/CreateNodesBalancedthickness.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 … … 23 22 DataSet* nodes = NULL; 24 23 25 /* First create nodes*/26 nodes = new DataSet(NodesEnum);24 /*Recover pointer: */ 25 nodes=*pnodes; 27 26 28 /* Recover number of nodes already created in other analyses:*/29 totalnodes=iomodel->nodecounter;27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 30 29 31 30 /*Continuous Galerkin partition of nodes: */ … … 47 46 48 47 /*Add node to nodes dataset: */ 49 nodes->AddObject(new Node(i +1,i,iomodel));48 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel)); 50 49 51 50 } … … 60 59 xfree((void**)&iomodel->gridoniceshelf); 61 60 62 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these63 * datasets, it will not be redone: */64 nodes->Presort();65 66 61 /*Assign output pointer: */ 67 62 *pnodes=nodes; 68 69 63 } -
issm/trunk/src/c/modules/ModelProcessorx/Balancedthickness2/CreateNodesBalancedthickness2.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=false; 21 20 … … 23 22 DataSet* nodes = NULL; 24 23 25 /* First create nodes*/26 nodes = new DataSet(NodesEnum);24 /*Recover pointer: */ 25 nodes=*pnodes; 27 26 28 /* Recover number of nodes already created in other analyses:*/29 totalnodes=iomodel->nodecounter;27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 30 29 31 30 /*Continuous Galerkin partition of nodes: */ … … 59 58 60 59 /*Add node to nodes dataset: */ 61 nodes->AddObject(new Node(i +1,vertex_index,node_index,iomodel));60 nodes->AddObject(new Node(iomodel->nodecounter+i+1,vertex_index,node_index,iomodel)); 62 61 63 62 } … … 75 74 xfree((void**)&iomodel->elements); 76 75 77 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these78 * datasets, it will not be redone: */79 nodes->Presort();80 81 76 /*Assign output pointer: */ 82 77 *pnodes=nodes; -
issm/trunk/src/c/modules/ModelProcessorx/Balancedvelocities/CreateNodesBalancedvelocities.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 … … 23 22 DataSet* nodes = NULL; 24 23 25 /* First create nodes*/26 nodes = new DataSet(NodesEnum);24 /*Recover pointer: */ 25 nodes=*pnodes; 27 26 28 /* Recover number of nodes already created in other analyses:*/29 totalnodes=iomodel->nodecounter;27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 30 29 31 30 /*Continuous Galerkin partition of nodes: */ … … 47 46 48 47 /*Add node to nodes dataset: */ 49 nodes->AddObject(new Node(i +1,i,iomodel));48 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel)); 50 49 51 50 } … … 60 59 xfree((void**)&iomodel->gridoniceshelf); 61 60 62 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these63 * datasets, it will not be redone: */64 nodes->Presort();65 66 61 /*Assign output pointer: */ 67 62 *pnodes=nodes; 68 69 63 } -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp
r4002 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes; 19 20 bool continuous_galerkin=true; 20 21 … … 22 23 DataSet* nodes = NULL; 23 24 24 /*Recover pointer: */ 25 nodes=*pnodes; 26 27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 25 /*First create nodes*/ 26 nodes = new DataSet(NodesEnum); 29 27 30 28 /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */ 31 29 if (!iomodel->ismacayealpattyn)goto cleanup_and_return; 30 31 /*Recover number of nodes already created in other analyses: */ 32 totalnodes=iomodel->nodecounter; 32 33 33 34 /*Continuous Galerkin partition of nodes: */ … … 50 51 51 52 /*Add node to nodes dataset: */ 52 nodes->AddObject(new Node( iomodel->nodecounter+i+1,i,iomodel,DiagnosticHorizAnalysisEnum));53 nodes->AddObject(new Node(totalnodes+i+1,i,iomodel,DiagnosticHorizAnalysisEnum)); 53 54 } 54 55 } 55 56 56 57 /*Increase nodecounter for other analyses to start their node indexing correctly: */ 58 totalnodes+=iomodel->numberofvertices; 59 iomodel->nodecounter=totalnodes; 60 57 61 /*Clean fetched data: */ 58 62 xfree((void**)&iomodel->gridonbed); … … 64 68 xfree((void**)&iomodel->uppernodes); 65 69 70 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these 71 * datasets, it will not be redone: */ 72 nodes->Presort(); 73 66 74 /*Assign output pointer: */ 67 75 *pnodes=nodes; 76 68 77 } -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 … … 23 22 DataSet* nodes = NULL; 24 23 25 /*First create nodes*/ 26 nodes = new DataSet(NodesEnum); 24 /*Recover pointer: */ 25 nodes=*pnodes; 26 27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 27 29 28 30 /*Now, is the flag ishutter on? otherwise, do nothing: */ 29 31 if (!iomodel->ishutter)goto cleanup_and_return; 30 31 /*Recover number of nodes already created in other analyses: */32 totalnodes=iomodel->nodecounter;33 32 34 33 /*Continuous Galerkin partition of nodes: */ … … 53 52 54 53 /*Add node to nodes dataset: */ 55 nodes->AddObject(new Node(i +1,i,iomodel));54 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel)); 56 55 57 56 } … … 69 68 xfree((void**)&iomodel->numbernodetoelementconnectivity); 70 69 71 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these72 * datasets, it will not be redone: */73 elements->Presort();74 75 70 cleanup_and_return: 76 71 -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticStokes/CreateNodesDiagnosticStokes.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 … … 23 22 DataSet* nodes = NULL; 24 23 25 /*First create nodes*/ 26 nodes = new DataSet(NodesEnum); 24 /*Recover pointer: */ 25 nodes=*pnodes; 26 27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 27 29 28 30 /*Now, do we have Stokes elements?*/ 29 if (iomodel->dim==2) goto cleanup_and_return; 30 if (!iomodel->isstokes) goto cleanup_and_return; 31 32 /*Recover number of nodes already created in other analyses: */ 33 totalnodes=iomodel->nodecounter; 31 if (iomodel->dim==2) goto cleanup_and_return; 32 if (!iomodel->isstokes) goto cleanup_and_return; 34 33 35 34 /*Continuous Galerkin partition of nodes: */ … … 51 50 52 51 /*Add node to nodes dataset: */ 53 nodes->AddObject(new Node(i +1,i,iomodel));52 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel)); 54 53 55 54 } … … 66 65 xfree((void**)&iomodel->gridoniceshelf); 67 66 68 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these69 * datasets, it will not be redone: */70 nodes->Presort();71 72 67 cleanup_and_return: 73 68 74 69 /*Assign output pointer: */ 75 70 *pnodes=nodes; 76 77 71 } -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 … … 23 22 DataSet* nodes = NULL; 24 23 25 /*First create the elements, nodes and material properties: */ 26 nodes = new DataSet(NodesEnum); 24 /*Recover pointer: */ 25 nodes=*pnodes; 26 27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 27 29 28 30 /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */ 29 31 if (iomodel->dim==2)goto cleanup_and_return; 30 31 /*Recover number of nodes already created in other analyses: */32 totalnodes=iomodel->nodecounter;33 32 34 33 /*Continuous Galerkin partition of nodes: */ … … 48 47 49 48 /*Add node to nodes dataset: */ 50 nodes->AddObject(new Node(i +1,i,iomodel));49 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel)); 51 50 52 51 } … … 61 60 xfree((void**)&iomodel->gridoniceshelf); 62 61 63 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these64 * datasets, it will not be redone: */65 nodes->Presort();66 67 62 cleanup_and_return: 68 63 69 64 /*Assign output pointer: */ 70 65 *pnodes=nodes; 71 72 66 } -
issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 22 21 /*DataSets: */ 23 22 DataSet* nodes = NULL; 24 25 /*First create nodes*/26 nodes = new DataSet(NodesEnum);27 23 28 /*Recover number of nodes already created in other analyses: */ 29 totalnodes=iomodel->nodecounter; 24 /*Recover pointer: */ 25 nodes=*pnodes; 26 27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 30 29 31 30 /*Continuous Galerkin partition of nodes: */ … … 47 46 48 47 /*Add node to nodes dataset: */ 49 nodes->AddObject(new Node(i +1,i,iomodel));48 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel)); 50 49 51 50 } … … 60 59 xfree((void**)&iomodel->gridoniceshelf); 61 60 62 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these63 * datasets, it will not be redone: */64 nodes->Presort();65 66 61 /*Assign output pointer: */ 67 62 *pnodes=nodes; -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 22 21 /*DataSets: */ 23 22 DataSet* nodes = NULL; 24 25 /*First create nodes*/26 nodes = new DataSet(NodesEnum);27 23 28 /*Recover number of nodes already created in other analyses: */ 29 totalnodes=iomodel->nodecounter; 24 /*Recover pointer: */ 25 nodes=*pnodes; 26 27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 30 29 31 30 /*Continuous Galerkin partition of nodes: */ … … 47 46 48 47 /*Add node to nodes dataset: */ 49 nodes->AddObject(new Node(i +1,i,iomodel));48 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel)); 50 49 51 50 } … … 60 59 xfree((void**)&iomodel->gridoniceshelf); 61 60 62 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these63 * datasets, it will not be redone: */64 nodes->Presort();65 66 61 /*Assign output pointer: */ 67 62 *pnodes=nodes; 68 69 63 } -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic2/CreateNodesPrognostic2.cpp
r3999 r4005 19 19 int vertex_index; 20 20 int node_index; 21 int totalnodes;22 21 bool continuous_galerkin=false; 23 22 … … 25 24 DataSet* nodes = NULL; 26 25 27 /* First create nodes*/28 nodes = new DataSet(NodesEnum);26 /*Recover pointer: */ 27 nodes=*pnodes; 29 28 30 /* Recover number of nodes already created in other analyses:*/31 totalnodes=iomodel->nodecounter;29 /*Create nodes if they do not exist yet*/ 30 if(!nodes) nodes = new DataSet(NodesEnum); 32 31 33 32 /*Continuous Galerkin partition of nodes: */ … … 60 59 61 60 /*Add node to nodes dataset: */ 62 nodes->AddObject(new Node( node_index+1,vertex_index,node_index,iomodel));61 nodes->AddObject(new Node(iomodel->nodecounter+node_index+1,vertex_index,node_index,iomodel)); 63 62 64 63 } … … 75 74 xfree((void**)&iomodel->gridoniceshelf); 76 75 77 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these78 * datasets, it will not be redone: */79 nodes->Presort();80 81 76 /*Assign output pointer: */ 82 77 *pnodes=nodes; -
issm/trunk/src/c/modules/ModelProcessorx/SlopeCompute/CreateNodesSlopeConpute.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 22 21 /*DataSets: */ 23 22 DataSet* nodes = NULL; 23 24 /*Recover pointer: */ 25 nodes=*pnodes; 26 27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 24 29 25 /*First create nodes*/26 nodes = new DataSet(NodesEnum);27 28 /*Recover number of nodes already created in other analyses: */29 totalnodes=iomodel->nodecounter;30 31 30 /*Continuous Galerkin partition of nodes: */ 32 31 NodesPartitioning(&iomodel->my_nodes,iomodel->my_elements, iomodel->my_vertices, iomodel->my_bordervertices, iomodel, iomodel_handle,continuous_galerkin); … … 47 46 48 47 /*Add node to nodes dataset: */ 49 nodes->AddObject(new Node(i +1,i,iomodel));48 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel)); 50 49 51 50 } … … 60 59 xfree((void**)&iomodel->gridoniceshelf); 61 60 62 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these63 * datasets, it will not be redone: */64 nodes->Presort();65 66 61 /*Assign output pointer: */ 67 62 *pnodes=nodes; 68 69 63 } -
issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp
r3999 r4005 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 … … 23 22 DataSet* nodes = NULL; 24 23 25 /* First create nodes*/26 nodes = new DataSet(NodesEnum);24 /*Recover pointer: */ 25 nodes=*pnodes; 27 26 28 /* Recover number of nodes already created in other analyses:*/29 totalnodes=iomodel->nodecounter;27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 30 29 31 30 /*Continuous Galerkin partition of nodes: */ … … 47 46 48 47 /*Add node to nodes dataset: */ 49 nodes->AddObject(new Node(i +1,i,iomodel));48 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel)); 50 49 51 50 } … … 60 59 xfree((void**)&iomodel->gridoniceshelf); 61 60 62 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these63 * datasets, it will not be redone: */64 nodes->Presort();65 66 61 /*Assign output pointer: */ 67 62 *pnodes=nodes; 68 69 63 }
Note:
See TracChangeset
for help on using the changeset viewer.