Changeset 3625
- Timestamp:
- 04/27/10 08:57:51 (15 years ago)
- Location:
- issm/trunk/src/c/ModelProcessorx
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateElementsNodesAndMaterialsBalancedthickness.cpp
r3588 r3625 48 48 49 49 /*Create and add tria element to elements dataset: */ 50 elements->AddObject(new Tria(i ,iomodel));50 elements->AddObject(new Tria(i+1,i,iomodel)); 51 51 52 52 /*Create and add material property to materials dataset: */ 53 materials->AddObject(new Matice(i ,iomodel,3));53 materials->AddObject(new Matice(i+1,i,iomodel,3)); 54 54 } 55 55 }//for (i=0;i<numberofelements;i++) … … 79 79 if(iomodel->my_elements[i]){ 80 80 /*Create and add penta element to elements dataset: */ 81 elements->AddObject(new Penta(i ,iomodel));81 elements->AddObject(new Penta(i+1,i,iomodel)); 82 82 83 83 /*Create and add material property to materials dataset: */ 84 materials->AddObject(new Matice(i ,iomodel,6));84 materials->AddObject(new Matice(i+1,i,iomodel,6)); 85 85 } 86 86 }//for (i=0;i<numberofelements;i++) … … 99 99 100 100 /*Add new constrant material property to materials, at the end: */ 101 materials->AddObject(new Matpar(iomodel ));101 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel)); 102 102 103 103 /*First fetch data: */ … … 122 122 123 123 /*Add vertex to vertices dataset: */ 124 vertices->AddObject(new Vertex(i ,iomodel));124 vertices->AddObject(new Vertex(i+1,i,iomodel)); 125 125 126 126 /*Add node to nodes dataset: */ 127 nodes->AddObject(new Node(i ,iomodel));127 nodes->AddObject(new Node(i+1,i,iomodel)); 128 128 129 129 } -
issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateLoadsBalancedthickness.cpp
r3588 r3625 18 18 loads = new DataSet(LoadsEnum); 19 19 20 21 20 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these 22 21 * datasets, it will not be redone: */ … … 29 28 30 29 } 31 32 -
issm/trunk/src/c/ModelProcessorx/Balancedthickness2/CreateElementsNodesAndMaterialsBalancedthickness2.cpp
r3598 r3625 52 52 53 53 /*Create and add tria element to elements dataset: */ 54 elements->AddObject(new Tria(i ,iomodel));54 elements->AddObject(new Tria(i+1,i,iomodel)); 55 55 56 56 /*Create and add material property to materials dataset: */ 57 materials->AddObject(new Matice(i ,iomodel,3));57 materials->AddObject(new Matice(i+1,i,iomodel,3)); 58 58 } 59 59 }//for (i=0;i<numberofelements;i++) … … 72 72 73 73 /*Add new constrant material property tgo materials, at the end: */ 74 materials->AddObject(new Matpar(iomodel ));74 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel)); 75 75 76 76 /*Create nodes and vertices: */ … … 97 97 98 98 /*Add vertex to vertices dataset: */ 99 vertices->AddObject(new Vertex(i ,iomodel));99 vertices->AddObject(new Vertex(i+1,i,iomodel)); 100 100 101 101 } … … 116 116 117 117 /*Add node to nodes dataset: */ 118 nodes->AddObject(new Node( vertex_index,node_index,iomodel));118 nodes->AddObject(new Node(i+1,vertex_index,node_index,iomodel)); 119 119 120 120 } -
issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateElementsNodesAndMaterialsBalancedvelocities.cpp
r3567 r3625 48 48 49 49 /*Create and add tria element to elements dataset: */ 50 elements->AddObject(new Tria(i ,iomodel));50 elements->AddObject(new Tria(i+1,i,iomodel)); 51 51 52 52 /*Create and add material property to materials dataset: */ 53 materials->AddObject(new Matice(i ,iomodel,3));53 materials->AddObject(new Matice(i+1,i,iomodel,3)); 54 54 } 55 55 … … 81 81 if(iomodel->my_elements[i]){ 82 82 /*Create and add penta element to elements dataset: */ 83 elements->AddObject(new Penta(i ,iomodel));83 elements->AddObject(new Penta(i+1,i,iomodel)); 84 84 85 85 /*Create and add material property to materials dataset: */ 86 materials->AddObject(new Matice(i ,iomodel,6));86 materials->AddObject(new Matice(i+1,i,iomodel,6)); 87 87 88 88 }//if(my_elements[i]) … … 103 103 104 104 /*Add new constrant material property to materials, at the end: */ 105 materials->AddObject(new Matpar(iomodel ));105 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel)); //put it at the end of the materials 106 106 107 107 /*First fetch data: */ … … 126 126 127 127 /*Add vertex to vertices dataset: */ 128 vertices->AddObject(new Vertex(i ,iomodel));128 vertices->AddObject(new Vertex(i+1,i,iomodel)); 129 129 130 130 /*Add node to nodes dataset: */ 131 nodes->AddObject(new Node(i ,iomodel));131 nodes->AddObject(new Node(i+1,i,iomodel)); 132 132 133 133 } -
issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateLoadsBalancedvelocities.cpp
r3567 r3625 18 18 loads = new DataSet(LoadsEnum); 19 19 20 21 20 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these 22 21 * datasets, it will not be redone: */ … … 29 28 30 29 } 31 32 -
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp
r3612 r3625 59 59 60 60 /*Create and add tria element to elements dataset: */ 61 elements->AddObject(new Tria(i ,iomodel));61 elements->AddObject(new Tria(i+1,i,iomodel)); 62 62 63 63 /*Create and add material property to materials dataset: */ 64 materials->AddObject(new Matice(i ,iomodel,3));64 materials->AddObject(new Matice(i+1,i,iomodel,3)); 65 65 } 66 66 } … … 104 104 if (*(iomodel->elements_type+2*i+0)==MacAyealFormulationEnum || *(iomodel->elements_type+2*i+0)==PattynFormulationEnum){ //elements of type 1 are Hutter type Tria. Don't create this elements. 105 105 /*Create and add penta element to elements dataset: */ 106 elements->AddObject(new Penta(i ,iomodel));106 elements->AddObject(new Penta(i+1,i,iomodel)); 107 107 108 108 /*Create and add material property to materials dataset: */ 109 materials->AddObject(new Matice(i ,iomodel,6));109 materials->AddObject(new Matice(i+1,i,iomodel,6)); 110 110 111 111 } … … 134 134 135 135 /*Add new constrant material property tgo materials, at the end: */ 136 materials->AddObject(new Matpar(iomodel ));136 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel));//put it at the end of the materials 137 137 138 138 /*Create nodes and vertices: */ … … 158 158 159 159 /*Add vertex to vertices dataset: */ 160 vertices->AddObject(new Vertex(i ,iomodel));160 vertices->AddObject(new Vertex(i+1,i,iomodel)); 161 161 162 162 /*Add node to nodes dataset: */ 163 nodes->AddObject(new Node(i ,iomodel));163 nodes->AddObject(new Node(i+1,i,iomodel)); 164 164 165 165 } -
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
r3567 r3625 19 19 int element; 20 20 int i; 21 int counter=1; 21 22 22 23 /*Create loads: */ … … 48 49 49 50 /*Create and add load: */ 50 loads->AddObject(new Icefront(i,iomodel)); 51 loads->AddObject(new Icefront(counter,i,iomodel)); 52 counter++; 51 53 52 54 } … … 70 72 if(iomodel->my_elements[(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+2)]){ 71 73 72 loads->AddObject(new Riftfront(i,iomodel)); 74 loads->AddObject(new Riftfront(counter,i,iomodel)); 75 counter++; 73 76 } 74 77 } -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp
r3567 r3625 58 58 59 59 /*Create and add penta element to elements dataset: */ 60 elements->AddObject(new Sing(i ,iomodel));60 elements->AddObject(new Sing(i+1,i,iomodel)); 61 61 62 62 /*Create and add material property to materials dataset: */ 63 materials->AddObject(new Matice(i ,iomodel,1));63 materials->AddObject(new Matice(i+1,i,iomodel,1)); 64 64 65 65 } … … 76 76 77 77 /*Create and add penta element to elements dataset: */ 78 elements->AddObject(new Beam(i ,iomodel));78 elements->AddObject(new Beam(i+1,i,iomodel)); 79 79 80 80 /*Create and add material property to materials dataset: */ 81 materials->AddObject(new Matice(i ,iomodel,2));81 materials->AddObject(new Matice(i+1,i,iomodel,2)); 82 82 83 83 } … … 102 102 103 103 /*Add new constrant material property to materials, at the end: */ 104 materials->AddObject(new Matpar(iomodel)); 104 if (strcmp(iomodel->meshtype,"2d")==0){ 105 materials->AddObject(new Matpar(iomodel->numberofvertices+1,iomodel)); //put it at the end of the materials 106 } 107 else{ 108 materials->AddObject(new Matpar(iomodel->numberofvertices2d*(iomodel->numlayers-1)+1,iomodel)); //put it at the end of the materials 109 } 110 } 105 111 106 112 /*First fetch data: */ … … 126 132 127 133 /*Add vertex to vertices dataset: */ 128 vertices->AddObject(new Vertex(i ,iomodel));134 vertices->AddObject(new Vertex(i+1,i,iomodel)); 129 135 130 136 /*Add node to nodes dataset: */ 131 nodes->AddObject(new Node(i ,iomodel));137 nodes->AddObject(new Node(i+1,i,iomodel)); 132 138 133 139 } -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateElementsNodesAndMaterialsDiagnosticStokes.cpp
r3567 r3625 62 62 63 63 /*Create and add penta element to elements dataset: */ 64 elements->AddObject(new Penta(i ,iomodel));64 elements->AddObject(new Penta(i+1,i,iomodel)); 65 65 66 66 /*Create and add material property to materials dataset: */ 67 materials->AddObject(new Matice(i ,iomodel,6));67 materials->AddObject(new Matice(i+1,i,iomodel,6)); 68 68 } 69 69 … … 91 91 92 92 /*Add new constrant material property to materials, at the end: */ 93 materials->AddObject(new Matpar(iomodel ));93 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel)); 94 94 95 95 /*First fetch data: */ … … 114 114 115 115 /*Add vertex to vertices dataset: */ 116 vertices->AddObject(new Vertex(i ,iomodel));116 vertices->AddObject(new Vertex(i+1,i,iomodel)); 117 117 118 118 /*Add node to nodes dataset: */ 119 nodes->AddObject(new Node(i ,iomodel));119 nodes->AddObject(new Node(i+1,i,iomodel)); 120 120 121 121 } -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp
r3624 r3625 22 22 /*pengrid intermediary data: */ 23 23 int numberofpressureloads; 24 int count =0;24 int counter=1; 25 25 26 26 /*Create loads: */ … … 37 37 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed"); 38 38 39 count=1; //matlab indexing40 39 /*First load data:*/ 41 40 for (i=0;i<numberofpressureloads;i++){ … … 55 54 /*Create and add load: */ 56 55 loads->AddObject(new Icefront(i,iomodel)); 56 counter++; 57 57 58 58 } … … 76 76 if ((iomodel->gridonbed[i]) && (iomodel->gridonicesheet[i]) && (iomodel->gridonstokes[i])){ 77 77 78 loads->AddObject(new Pengrid(count,i,iomodel)); 78 loads->AddObject(new Pengrid(counter,i,iomodel)); 79 counter++; 79 80 } 80 81 } //if((iomodel->my_vertices[i]==1)) -
issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateElementsNodesAndMaterialsDiagnosticVert.cpp
r3567 r3625 54 54 55 55 /*Create and add penta element to elements dataset: */ 56 elements->AddObject(new Penta(i ,iomodel));56 elements->AddObject(new Penta(i+1,i,iomodel)); 57 57 58 58 /*Create and add material property to materials dataset: */ 59 materials->AddObject(new Matice(i ,iomodel,6));59 materials->AddObject(new Matice(i+1,i,iomodel,6)); 60 60 61 61 } … … 77 77 78 78 /*Add new constrant material property to materials, at the end: */ 79 materials->AddObject(new Matpar(iomodel ));79 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel));//put it at the end of the materials 80 80 81 81 /*First fetch data: */ … … 98 98 99 99 /*Add vertex to vertices dataset: */ 100 vertices->AddObject(new Vertex(i ,iomodel));100 vertices->AddObject(new Vertex(i+1,i,iomodel)); 101 101 102 102 /*Add node to nodes dataset: */ 103 nodes->AddObject(new Node(i ,iomodel));103 nodes->AddObject(new Node(i+1,i,iomodel)); 104 104 105 105 } -
issm/trunk/src/c/ModelProcessorx/Melting/CreateElementsNodesAndMaterialsMelting.cpp
r3567 r3625 55 55 56 56 /*Create and add tria element to elements dataset: */ 57 elements->AddObject(new Penta(i ,iomodel));57 elements->AddObject(new Penta(i+1,i,iomodel)); 58 58 59 59 /*Create and add material property to materials dataset: */ 60 materials->AddObject(new Matice(i ,iomodel,6));60 materials->AddObject(new Matice(i+1,i,iomodel,6)); 61 61 } 62 62 … … 82 82 83 83 /*Add new constrant material property tgo materials, at the end: */ 84 materials->AddObject(new Matpar(iomodel ));84 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel));//put it at the end of the materials 85 85 86 86 /*First fetch data: */ … … 105 105 106 106 /*Add vertex to vertices dataset: */ 107 vertices->AddObject(new Vertex(i ,iomodel));107 vertices->AddObject(new Vertex(i+1,i,iomodel)); 108 108 109 109 /*Add node to nodes dataset: */ 110 nodes->AddObject(new Node(i ,iomodel));110 nodes->AddObject(new Node(i+1,i,iomodel)); 111 111 112 112 } -
issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r3624 r3625 49 49 50 50 } 51 52 -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateElementsNodesAndMaterialsPrognostic.cpp
r3567 r3625 48 48 49 49 /*Create and add tria element to elements dataset: */ 50 elements->AddObject(new Tria(i ,iomodel));50 elements->AddObject(new Tria(i+1,i,iomodel)); 51 51 52 52 /*Create and add material property to materials dataset: */ 53 materials->AddObject(new Matice(i ,iomodel,3));53 materials->AddObject(new Matice(i+1,i,iomodel,3)); 54 54 } 55 55 }//for (i=0;i<numberofelements;i++) … … 80 80 if(iomodel->my_elements[i]){ 81 81 /*Create and add penta element to elements dataset: */ 82 elements->AddObject(new Penta(i ,iomodel));82 elements->AddObject(new Penta(i+1,i,iomodel)); 83 83 84 84 /*Create and add material property to materials dataset: */ 85 materials->AddObject(new Matice(i ,iomodel,6));85 materials->AddObject(new Matice(i+1,i,iomodel,6)); 86 86 } 87 87 }//for (i=0;i<numberofelements;i++) … … 100 100 101 101 /*Add new constrant material property to materials, at the end: */ 102 materials->AddObject(new Matpar(iomodel ));102 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel));//put it at the end of the materials 103 103 104 104 /*First fetch data: */ … … 123 123 124 124 /*Add vertex to vertices dataset: */ 125 vertices->AddObject(new Vertex(i ,iomodel));125 vertices->AddObject(new Vertex(i+1,i,iomodel)); 126 126 127 127 /*Add node to nodes dataset: */ 128 nodes->AddObject(new Node(i ,iomodel));128 nodes->AddObject(new Node(i+1,i,iomodel)); 129 129 130 130 } -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
r3567 r3625 27 27 28 28 } 29 30 -
issm/trunk/src/c/ModelProcessorx/Prognostic2/CreateElementsNodesAndMaterialsPrognostic2.cpp
r3570 r3625 52 52 53 53 /*Create and add tria element to elements dataset: */ 54 elements->AddObject(new Tria(i ,iomodel));54 elements->AddObject(new Tria(i+1,i,iomodel)); 55 55 56 56 /*Create and add material property to materials dataset: */ 57 materials->AddObject(new Matice(i ,iomodel,3));57 materials->AddObject(new Matice(i+1,i,iomodel,3)); 58 58 } 59 59 }//for (i=0;i<numberofelements;i++) … … 72 72 73 73 /*Add new constrant material property tgo materials, at the end: */ 74 materials->AddObject(new Matpar(iomodel ));74 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel)); 75 75 76 76 /*Create nodes and vertices: */ … … 97 97 98 98 /*Add vertex to vertices dataset: */ 99 vertices->AddObject(new Vertex(i ,iomodel));99 vertices->AddObject(new Vertex(i+1,i,iomodel)); 100 100 101 101 } … … 116 116 117 117 /*Add node to nodes dataset: */ 118 nodes->AddObject(new Node( vertex_index,node_index,iomodel));118 nodes->AddObject(new Node(i+1,vertex_index,node_index,iomodel)); 119 119 120 120 } -
issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateElementsNodesAndMaterialsSlopeCompute.cpp
r3567 r3625 46 46 47 47 /*Create and add tria element to elements dataset: */ 48 elements->AddObject(new Tria(i ,iomodel));48 elements->AddObject(new Tria(i+1,i,iomodel)); 49 49 50 50 /*Create and add material property to materials dataset: */ 51 materials->AddObject(new Matice(i ,iomodel,3));51 materials->AddObject(new Matice(i+1,i,iomodel,3)); 52 52 } 53 53 … … 74 74 if(iomodel->my_elements[i]){ 75 75 /*Create and add penta element to elements dataset: */ 76 elements->AddObject(new Penta(i ,iomodel));76 elements->AddObject(new Penta(i+1,i,iomodel)); 77 77 78 78 /*Create and add material property to materials dataset: */ 79 materials->AddObject(new Matice(i ,iomodel,6));79 materials->AddObject(new Matice(i+1,i,iomodel,6)); 80 80 81 81 }//if(my_elements[i]) … … 92 92 93 93 /*Add new constrant material property tgo materials, at the end: */ 94 materials->AddObject(new Matpar(iomodel ));94 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel)); //put it at the end of the materials 95 95 96 96 /*First fetch data: */ … … 115 115 116 116 /*Add vertex to vertices dataset: */ 117 vertices->AddObject(new Vertex(i ,iomodel));117 vertices->AddObject(new Vertex(i+1,i,iomodel)); 118 118 119 119 /*Add node to nodes dataset: */ 120 nodes->AddObject(new Node(i ,iomodel));120 nodes->AddObject(new Node(i+1,i,iomodel)); 121 121 122 122 } -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateElementsNodesAndMaterialsThermal.cpp
r3567 r3625 53 53 54 54 /*Create and add tria element to elements dataset: */ 55 elements->AddObject(new Penta(i ,iomodel));55 elements->AddObject(new Penta(i+1,i,iomodel)); 56 56 57 57 /*Create and add material property to materials dataset: */ 58 materials->AddObject(new Matice(i ,iomodel,6));58 materials->AddObject(new Matice(i+1,i,iomodel,6)); 59 59 } 60 60 }//for (i=0;i<numberofelements;i++) … … 78 78 79 79 /*Add new constrant material property tgo materials, at the end: */ 80 materials->AddObject(new Matpar(iomodel ));80 materials->AddObject(new Matpar(iomodel->numberofelements+1,iomodel));//put it at the end of the materials 81 81 82 82 /*Create nodes and vertices: */ … … 101 101 102 102 /*Add vertex to vertices dataset: */ 103 vertices->AddObject(new Vertex(i ,iomodel));103 vertices->AddObject(new Vertex(i+1,i,iomodel)); 104 104 105 105 /*Add node to nodes dataset: */ 106 nodes->AddObject(new Node(i ,iomodel));106 nodes->AddObject(new Node(i+1,i,iomodel)); 107 107 108 108 } -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r3624 r3625 52 52 53 53 } 54 55
Note:
See TracChangeset
for help on using the changeset viewer.