Changeset 23516
- Timestamp:
- 12/06/18 21:22:40 (6 years ago)
- Location:
- issm/trunk-jpl/src/c/modules/ModelProcessorx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
r23515 r23516 250 250 if (isoceancoupling) iomodel->FetchData(2,"md.mesh.lat","md.mesh.long"); 251 251 252 CreateNumberNodeToElementConnectivity(iomodel,solution_type);252 if (solution_type!=LoveSolutionEnum) CreateNumberNodeToElementConnectivity(iomodel); 253 253 254 254 int lid = 0; -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
r22004 r23516 14 14 #include "./ModelProcessorx.h" 15 15 16 void CreateNumberNodeToElementConnectivity(IoModel* iomodel ,int solution_type){16 void CreateNumberNodeToElementConnectivity(IoModel* iomodel){ 17 17 18 18 /*Intermediary*/ … … 28 28 29 29 /*Some checks if debugging*/ 30 if (solution_type==LoveSolutionEnum){ 31 /*do nothing, we don't have a mesh. Just initialize to NULL*/ 30 _assert_(iomodel->numberofvertices); 31 _assert_(iomodel->numberofelements); 32 _assert_(iomodel->elements); 33 34 /*Allocate ouput*/ 35 connectivity=xNewZeroInit<int>(iomodel->numberofvertices); 36 37 /*Get element width*/ 38 switch(iomodel->meshelementtype){ 39 case TriaEnum: elementswidth=3; break; 40 case TetraEnum: elementswidth=4; break; 41 case PentaEnum: elementswidth=6; break; 42 default: _error_("mesh not supported yet"); 32 43 } 33 else{34 44 35 /*Some checks if debugging*/ 36 _assert_(iomodel->numberofvertices); 37 _assert_(iomodel->numberofelements); 38 _assert_(iomodel->elements); 39 40 /*Allocate ouput*/ 41 connectivity=xNewZeroInit<int>(iomodel->numberofvertices); 42 43 /*Get element width*/ 44 switch(iomodel->meshelementtype){ 45 case TriaEnum: elementswidth=3; break; 46 case TetraEnum: elementswidth=4; break; 47 case PentaEnum: elementswidth=6; break; 48 default: _error_("mesh not supported yet"); 49 } 50 51 /*Create connectivity table*/ 52 for (i=0;i<iomodel->numberofelements;i++){ 53 for (j=0;j<elementswidth;j++){ 54 vertexid=iomodel->elements[elementswidth*i+j]; 55 _assert_(vertexid>0 && vertexid-1<iomodel->numberofvertices); 56 connectivity[vertexid-1]+=1; 57 } 45 /*Create connectivity table*/ 46 for (i=0;i<iomodel->numberofelements;i++){ 47 for (j=0;j<elementswidth;j++){ 48 vertexid=iomodel->elements[elementswidth*i+j]; 49 _assert_(vertexid>0 && vertexid-1<iomodel->numberofvertices); 50 connectivity[vertexid-1]+=1; 58 51 } 59 52 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h
r23514 r23516 38 38 /*Connectivity*/ 39 39 void CreateSingleNodeToElementConnectivity(IoModel* iomodel); 40 void CreateNumberNodeToElementConnectivity(IoModel* iomodel ,int solution_type);40 void CreateNumberNodeToElementConnectivity(IoModel* iomodel); 41 41 #endif
Note:
See TracChangeset
for help on using the changeset viewer.