Changeset 3383 for issm/trunk/src/c/ModelProcessorx/Prognostic/CreateElementsNodesAndMaterialsPrognostic.cpp
- Timestamp:
- 04/04/10 23:08:44 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateElementsNodesAndMaterialsPrognostic.cpp
r3332 r3383 10 10 #include "../../shared/shared.h" 11 11 #include "../../MeshPartitionx/MeshPartitionx.h" 12 #include "../../include/typedefs.h" 12 13 #include "../IoModel.h" 13 14 … … 34 35 Matice* matice = NULL; 35 36 Matpar* matpar = NULL; 37 ElementProperties* tria_properties=NULL; 38 ElementProperties* penta_properties=NULL; 36 39 37 40 /*output: */ … … 48 51 /*tria constructor input: */ 49 52 int tria_id; 50 int tria_m id;51 int tria_m parid;52 int tria_numpar id;53 int tria_ g[3];53 int tria_matice_id; 54 int tria_matpar_id; 55 int tria_numpar_id; 56 int tria_node_ids[3]; 54 57 double tria_h[3]; 55 58 double tria_s[3]; 56 59 double tria_b[3]; 57 double tria_k[3];58 double tria_melting[3];59 double tria_accumulation[3];60 double tria_geothermalflux[3];61 int tria_friction_type;62 double tria_p;63 double tria_q;64 60 int tria_shelf; 65 61 bool tria_onwater; … … 73 69 74 70 int penta_id; 75 int penta_m id;76 int penta_m parid;77 int penta_numpar id;78 int penta_ g[6];71 int penta_matice_id; 72 int penta_matpar_id; 73 int penta_numpar_id; 74 int penta_node_ids[6]; 79 75 double penta_h[6]; 80 76 double penta_s[6]; 81 77 double penta_b[6]; 82 double penta_k[6];83 int penta_friction_type;84 double penta_p;85 double penta_q;86 78 int penta_shelf; 87 79 int penta_onbed; 88 80 int penta_onsurface; 89 81 int penta_collapse; 90 double penta_melting[6];91 double penta_accumulation[6];92 double penta_geothermalflux[6];93 int penta_thermal_steadystate;94 82 bool penta_onwater; 95 83 … … 191 179 /*ids: */ 192 180 tria_id=i+1; //matlab indexing. 193 tria_m id=-1; //no need for materials194 tria_m parid=-1; //no need for materials195 tria_numpar id=1;181 tria_matice_id=-1; //no need for materials 182 tria_matpar_id=-1; //no need for materials 183 tria_numpar_id=1; 196 184 197 185 /*vertices offsets: */ 198 tria_ g[0]=(int)*(iomodel->elements+elements_width*i+0);199 tria_ g[1]=(int)*(iomodel->elements+elements_width*i+1);200 tria_ g[2]=(int)*(iomodel->elements+elements_width*i+2);186 tria_node_ids[0]=(int)*(iomodel->elements+elements_width*i+0); 187 tria_node_ids[1]=(int)*(iomodel->elements+elements_width*i+1); 188 tria_node_ids[2]=(int)*(iomodel->elements+elements_width*i+2); 201 189 202 190 /*thickness,surface and bed:*/ … … 217 205 tria_onwater=(bool)*(iomodel->elementonwater+i); 218 206 207 /*Create properties: */ 208 tria_properties=new ElementProperties(3,tria_h, tria_s, tria_b, NULL, NULL, NULL, NULL, UNDEF, UNDEF, UNDEF, tria_shelf, UNDEF, tria_onwater, UNDEF, UNDEF, UNDEF); 209 219 210 /*Create tria element using its constructor:*/ 220 tria=new Tria(tria_id, tria_mid, tria_mparid, tria_numparid,tria_g, tria_h, tria_s, tria_b, tria_k, tria_melting,tria_accumulation,tria_geothermalflux,tria_friction_type, tria_p, tria_q, tria_shelf, tria_onwater); 211 tria=new Tria(tria_id, tria_node_ids, tria_matice_id, tria_matpar_id, tria_numpar_id, tria_properties); 212 213 /*Delete properties: */ 214 delete tria_properties; 221 215 222 216 /*Add tria element to elements dataset: */ … … 270 264 /*name and id: */ 271 265 penta_id=i+1; //matlab indexing. 272 penta_m id=-1;273 penta_m parid=-1; //no need for materials274 penta_numpar id=1;266 penta_matice_id=-1; 267 penta_matpar_id=-1; //no need for materials 268 penta_numpar_id=1; 275 269 276 270 /*vertices,thickness,surface,bed and drag: */ 277 271 for(j=0;j<6;j++){ 278 penta_ g[j]=(int)*(iomodel->elements+elements_width*i+j);272 penta_node_ids[j]=(int)*(iomodel->elements+elements_width*i+j); 279 273 penta_h[j]=*(iomodel->thickness+ ((int)*(iomodel->elements+elements_width*i+j)-1)); 280 274 penta_s[j]=*(iomodel->surface+ ((int)*(iomodel->elements+elements_width*i+j)-1)); … … 289 283 penta_onwater=(bool)*(iomodel->elementonwater+i); 290 284 285 /*Create properties: */ 286 penta_properties=new ElementProperties(6,penta_h, penta_s, penta_b, NULL, NULL, NULL, NULL, UNDEF, UNDEF, UNDEF, penta_shelf, penta_onbed, penta_onwater, penta_onsurface, penta_collapse, UNDEF); 291 287 292 288 /*Create Penta using its constructor:*/ 293 penta= new Penta( penta_id,penta_mid,penta_mparid,penta_numparid,penta_g,penta_h,penta_s,penta_b,penta_k,penta_friction_type,294 penta_p,penta_q,penta_shelf,penta_onbed,penta_onsurface, 295 penta_collapse,penta_melting,penta_accumulation,penta_geothermalflux,296 penta_thermal_steadystate,penta_onwater);289 penta=new Penta(penta_id, penta_node_ids, penta_matice_id, penta_matpar_id, penta_numpar_id, penta_properties); 290 291 /*Delete properties: */ 292 delete penta_properties; 297 293 298 294 /*Add penta element to elements dataset: */
Note:
See TracChangeset
for help on using the changeset viewer.