Changeset 16291
- Timestamp:
- 10/03/13 14:53:55 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 57 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/control_core.cpp
r16248 r16291 21 21 int nsteps; 22 22 IssmDouble tol_cm; 23 int dim;24 23 int solution_type; 25 24 bool isFS; … … 53 52 femmodel->parameters->FindParam(&cm_jump,NULL,InversionStepThresholdEnum); 54 53 femmodel->parameters->FindParam(&tol_cm,InversionCostFunctionThresholdEnum); 55 femmodel->parameters->FindParam(&dim,MeshDimensionEnum);56 54 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 57 55 femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum); -
issm/trunk-jpl/src/c/analyses/stressbalance_core.cpp
r16219 r16291 14 14 /*parameters: */ 15 15 bool dakota_analysis; 16 int dim;16 int meshtype; 17 17 bool isSIA,isSSA,isL1L2,isHO,isFS; 18 18 bool conserve_loads = true; … … 24 24 25 25 /* recover parameters:*/ 26 femmodel->parameters->FindParam(& dim,MeshDimensionEnum);26 femmodel->parameters->FindParam(&meshtype,MeshTypeEnum); 27 27 femmodel->parameters->FindParam(&isSIA,FlowequationIsSIAEnum); 28 28 femmodel->parameters->FindParam(&isSSA,FlowequationIsSSAEnum); … … 78 78 } 79 79 80 if ( dim==3&& (isSIA || isSSA || isL1L2 || isHO)){80 if (meshtype==Mesh3DEnum && (isSIA || isSSA || isL1L2 || isHO)){ 81 81 if(VerboseSolution()) _printf0_(" computing vertical velocities\n"); 82 82 femmodel->SetCurrentConfiguration(StressbalanceVerticalAnalysisEnum); … … 90 90 InputToResultx(femmodel,VelEnum); 91 91 InputToResultx(femmodel,PressureEnum); 92 if( dim==3) InputToResultx(femmodel,VzEnum);92 if(meshtype==Mesh3DEnum) InputToResultx(femmodel,VzEnum); 93 93 femmodel->RequestedOutputsx(requested_outputs,numoutputs); 94 94 } -
issm/trunk-jpl/src/c/analyses/transient_core.cpp
r16219 r16291 25 25 bool time_adapt=false; 26 26 int output_frequency; 27 int dim,groundingline_migration;27 int meshtype,groundingline_migration; 28 28 int numoutputs = 0; 29 int 29 int *requested_outputs = NULL; 30 30 31 31 /*intermediary: */ … … 34 34 35 35 //first recover parameters common to all solutions 36 femmodel->parameters->FindParam(& dim,MeshDimensionEnum);36 femmodel->parameters->FindParam(&meshtype,MeshTypeEnum); 37 37 femmodel->parameters->FindParam(&starttime,TimesteppingStartTimeEnum); 38 38 femmodel->parameters->FindParam(&finaltime,TimesteppingFinalTimeEnum); … … 63 63 InputDuplicatex(femmodel,QmuVxEnum,VxEnum); 64 64 InputDuplicatex(femmodel,QmuVyEnum,VyEnum); 65 if( dim==3){65 if(meshtype==Mesh3DEnum){ 66 66 InputDuplicatex(femmodel,QmuVzEnum,VzEnum); 67 67 if(isFS)InputDuplicatex(femmodel,QmuPressureEnum,PressureEnum); … … 75 75 } 76 76 if(isgroundingline) InputDuplicatex(femmodel,QmuMaskGroundediceLevelsetEnum,MaskGroundediceLevelsetEnum); 77 if( dim==2)InputDuplicatex(femmodel,QmuMaterialsRheologyBEnum,MaterialsRheologyBbarEnum);78 if(isthermal && dim==3){77 if(meshtype==Mesh2DhorizontalEnum)InputDuplicatex(femmodel,QmuMaterialsRheologyBEnum,MaterialsRheologyBbarEnum); 78 if(isthermal && meshtype==Mesh3DEnum){ 79 79 //Update Vertex Position after updating Thickness and Bed 80 80 femmodel->SetCurrentConfiguration(MasstransportAnalysisEnum); … … 112 112 femmodel->parameters->SetParam(save_results,SaveResultsEnum); 113 113 114 if(isthermal && dim==3){114 if(isthermal && meshtype==Mesh3DEnum){ 115 115 if(VerboseSolution()) _printf0_(" computing temperatures\n"); 116 116 #ifdef _HAVE_THERMAL_ -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16275 r16291 2573 2573 IssmDouble Tria::MassFlux( IssmDouble* segment){ 2574 2574 2575 int dim;2575 int meshtype; 2576 2576 IssmDouble mass_flux=0.; 2577 2577 IssmDouble xyz_list[NUMVERTICES][3]; … … 2607 2607 2608 2608 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 2609 this->parameters->FindParam(& dim,MeshDimensionEnum);2609 this->parameters->FindParam(&meshtype,MeshTypeEnum); 2610 2610 Input* vx_input=NULL; 2611 2611 Input* vy_input=NULL; 2612 if( dim==2){2612 if(meshtype==Mesh2DhorizontalEnum){ 2613 2613 vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2614 2614 vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 6237 6237 /*Intermediaries */ 6238 6238 int stabilization; 6239 int dim;6239 int meshtype; 6240 6240 IssmDouble Jdet,D_scalar,dt,h; 6241 6241 IssmDouble vel,vx,vy,dvxdx,dvydy; … … 6256 6256 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 6257 6257 this->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 6258 this->parameters->FindParam(& dim,MeshDimensionEnum);6258 this->parameters->FindParam(&meshtype,MeshTypeEnum); 6259 6259 this->parameters->FindParam(&stabilization,MasstransportStabilizationEnum); 6260 6260 Input* vxaverage_input=NULL; 6261 6261 Input* vyaverage_input=NULL; 6262 if( dim==2){6262 if(meshtype==Mesh2DhorizontalEnum){ 6263 6263 vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input); 6264 6264 vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input); … … 6355 6355 6356 6356 /*Intermediaries */ 6357 int dim;6357 int meshtype; 6358 6358 IssmDouble xyz_list[NUMVERTICES][3]; 6359 6359 IssmDouble Jdet,D_scalar,dt,vx,vy; … … 6372 6372 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 6373 6373 this->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 6374 this->parameters->FindParam(& dim,MeshDimensionEnum);6374 this->parameters->FindParam(&meshtype,MeshTypeEnum); 6375 6375 Input* vxaverage_input=NULL; 6376 6376 Input* vyaverage_input=NULL; 6377 if( dim==2){6377 if(meshtype==Mesh2DhorizontalEnum){ 6378 6378 vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input); 6379 6379 vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input); … … 6844 6844 /*Intermediaries */ 6845 6845 int stabilization; 6846 int dim;6846 int meshtype; 6847 6847 IssmDouble Jdet,D_scalar,dt,h; 6848 6848 IssmDouble vel,vx,vy,dvxdx,dvydy; … … 6863 6863 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 6864 6864 this->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 6865 this->parameters->FindParam(& dim,MeshDimensionEnum);6865 this->parameters->FindParam(&meshtype,MeshTypeEnum); 6866 6866 this->parameters->FindParam(&stabilization,DamageStabilizationEnum); 6867 6867 Input* vxaverage_input=NULL; 6868 6868 Input* vyaverage_input=NULL; 6869 if( dim==2){6869 if(meshtype==Mesh2DhorizontalEnum){ 6870 6870 vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input); 6871 6871 vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input); … … 7268 7268 7269 7269 /*Intermediaries */ 7270 int stabilization, dim;7270 int stabilization,meshtype; 7271 7271 IssmDouble Jdet,vx,vy,dvxdx,dvydy,vel,h; 7272 7272 IssmDouble D_scalar; … … 7287 7287 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 7288 7288 this->parameters->FindParam(&stabilization,BalancethicknessStabilizationEnum); 7289 this->parameters->FindParam(& dim,MeshDimensionEnum);7289 this->parameters->FindParam(&meshtype,MeshTypeEnum); 7290 7290 Input* vxaverage_input=NULL; 7291 7291 Input* vyaverage_input=NULL; 7292 if( dim==2){7292 if(meshtype==Mesh2DhorizontalEnum){ 7293 7293 vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input); 7294 7294 vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input); … … 7376 7376 7377 7377 /*Intermediaries*/ 7378 int dim;7379 7378 IssmDouble vx,vy,D_scalar,Jdet; 7380 7379 IssmDouble xyz_list[NUMVERTICES][3]; … … 7392 7391 /*Retrieve all inputs and parameters*/ 7393 7392 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 7394 this->parameters->FindParam(&dim,MeshDimensionEnum);7395 7393 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 7396 7394 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); -
issm/trunk-jpl/src/c/classes/IoModel.cpp
r16265 r16291 30 30 this->my_vertices=NULL; 31 31 32 this-> dim=-1;32 this->meshtype=-1; 33 33 this->numberofvertices=-1; 34 34 this->numberofelements=-1; … … 74 74 this->my_vertices = NULL; 75 75 76 FetchData(&this-> dim,MeshDimensionEnum);76 FetchData(&this->meshtype,MeshTypeEnum); 77 77 FetchData(&this->numberofvertices,MeshNumberofverticesEnum); 78 78 FetchData(&this->numberofelements,MeshNumberofelementsEnum); -
issm/trunk-jpl/src/c/classes/IoModel.h
r16253 r16291 31 31 32 32 /*Mesh properties and connectivity tables*/ 33 int dim;34 int 35 int 36 int 37 int 38 int 39 int 40 int 41 int 42 int 43 int 33 int meshtype; 34 int numberofvertices; 35 int numberofelements; 36 int numberoffaces; 37 int numberofedges; 38 int *elements; 39 int *faces; 40 int *edges; 41 int *elementtoedgeconnectivity; 42 int *singlenodetoelementconnectivity; 43 int *numbernodetoelementconnectivity; 44 44 45 45 /*Data to synchronize through low level object drivers: */ -
issm/trunk-jpl/src/c/classes/Materials/Matice.cpp
r16233 r16291 701 701 702 702 /*Intermediaries*/ 703 Element *element= NULL;704 Parameters * parameters= NULL;705 int dim;703 Element *element = NULL; 704 Parameters *parameters = NULL; 705 int meshtype; 706 706 707 707 /*Recover element*/ … … 730 730 parameters=((Penta*)(element))->parameters; 731 731 } 732 parameters->FindParam(& dim,MeshDimensionEnum);733 if( dim==2){732 parameters->FindParam(&meshtype,MeshTypeEnum); 733 if(meshtype==Mesh3DEnum){ 734 734 /*Duplicate rheology input: */ 735 735 this->inputs->AddInput(new TriaInput(MaterialsRheologyBbarEnum,values,P1Enum)); … … 790 790 if(control_analysis) iomodel->Constant(&num_control_type,InversionNumControlParametersEnum); 791 791 792 if(iomodel-> dim==2){792 if(iomodel->meshtype==Mesh2DhorizontalEnum){ 793 793 794 794 /*Intermediaries*/ … … 847 847 /*if 3d*/ 848 848 #ifdef _HAVE_3D_ 849 else if(iomodel-> dim==3){849 else if(iomodel->meshtype==Mesh3DEnum){ 850 850 851 851 /*Intermediaries*/ -
issm/trunk-jpl/src/c/classes/Node.cpp
r16233 r16291 55 55 _assert_(sqrt( coord_system[0][0]*coord_system[0][0] + coord_system[1][0]*coord_system[1][0]) >1.e-4); 56 56 57 if(iomodel-> dim==3){57 if(iomodel->meshtype==Mesh3DEnum){ 58 58 /*We have a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */ 59 59 _assert_(iomodel->Data(MeshVertexonbedEnum)); … … 95 95 analysis_type==HydrologyDCEfficientAnalysisEnum 96 96 ){ 97 if(iomodel-> dim==3){97 if(iomodel->meshtype==Mesh3DEnum){ 98 98 /*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */ 99 99 _assert_(iomodel->Data(MeshVertexonbedEnum)); … … 104 104 } 105 105 if(analysis_type==FreeSurfaceTopAnalysisEnum){ 106 if(iomodel-> dim==3){106 if(iomodel->meshtype==Mesh3DEnum){ 107 107 /*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */ 108 108 _assert_(iomodel->Data(MeshVertexonsurfaceEnum)); -
issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
r16164 r16291 48 48 break; 49 49 case P1bubbleEnum: 50 switch(iomodel-> dim){51 case 2: elementnbv = 3; break;52 case 3:elementnbv = 6; break;50 switch(iomodel->meshtype){ 51 case Mesh2DhorizontalEnum: elementnbv = 3; break; 52 case Mesh3DEnum: elementnbv = 6; break; 53 53 default: _error_("3d is the only supported dimension"); 54 54 } -
issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.h
r15428 r16291 11 11 template <class doubletype> 12 12 int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes,int* elements, 13 int numberofelements2d,int numberofnodes2d,doubletype* elements2d,int numlayers,int elements_width, int dim,int num_procs){13 int numberofelements2d,int numberofnodes2d,doubletype* elements2d,int numlayers,int elements_width, int meshtype,int num_procs){ 14 14 15 15 int noerr=1; … … 31 31 int edgecut=1; 32 32 33 if(dim==2){ 34 epart=xNew<int>(numberofelements); 35 npart=xNew<int>(numberofnodes); 36 index=xNew<int>(elements_width*numberofelements); 37 for (i=0;i<numberofelements;i++){ 38 for (j=0;j<elements_width;j++){ 39 *(index+elements_width*i+j)=(*(elements+elements_width*i+j))-1; //-1 for C indexing in Metis 33 switch(meshtype){ 34 case Mesh2DhorizontalEnum: 35 epart=xNew<int>(numberofelements); 36 npart=xNew<int>(numberofnodes); 37 index=xNew<int>(elements_width*numberofelements); 38 for (i=0;i<numberofelements;i++){ 39 for (j=0;j<elements_width;j++){ 40 *(index+elements_width*i+j)=(*(elements+elements_width*i+j))-1; //-1 for C indexing in Metis 41 } 40 42 } 41 }42 43 43 /*Partition using Metis:*/44 if (num_procs>1){45 46 METIS_PartMeshNodalPatch(&numberofelements,&numberofnodes, index, &etype, &numflag, &num_procs, &edgecut, epart, npart);47 48 _error_("metis has not beed installed. Cannot run with more than 1 cpu");49 50 }51 else if (num_procs==1){52 /*METIS does not know how to deal with one cpu only!*/53 for (i=0;i<numberofelements;i++) epart[i]=0;54 for (i=0;i<numberofnodes;i++) npart[i]=0;55 }56 else _error_("At least one processor is required");57 }58 else{59 /*We have a 3d mesh, made of a regularly extruded 2d mesh. We first partition the 2d mesh, then we extrude the partition: */44 /*Partition using Metis:*/ 45 if (num_procs>1){ 46 #ifdef _HAVE_METIS_ 47 METIS_PartMeshNodalPatch(&numberofelements,&numberofnodes, index, &etype, &numflag, &num_procs, &edgecut, epart, npart); 48 #else 49 _error_("metis has not beed installed. Cannot run with more than 1 cpu"); 50 #endif 51 } 52 else if (num_procs==1){ 53 /*METIS does not know how to deal with one cpu only!*/ 54 for (i=0;i<numberofelements;i++) epart[i]=0; 55 for (i=0;i<numberofnodes;i++) npart[i]=0; 56 } 57 else _error_("At least one processor is required"); 58 break; 59 case Mesh3DEnum: 60 /*We have a 3d mesh, made of a regularly extruded 2d mesh. We first partition the 2d mesh, then we extrude the partition: */ 60 61 61 /*First build concatenated 2d mesh from 2d_coll and 2d_noncoll: */62 epart2d=xNew<int>(numberofelements2d);63 npart2d=xNew<int>(numberofnodes2d);64 index2d=xNew<int>(3*numberofelements2d);62 /*First build concatenated 2d mesh from 2d_coll and 2d_noncoll: */ 63 epart2d=xNew<int>(numberofelements2d); 64 npart2d=xNew<int>(numberofnodes2d); 65 index2d=xNew<int>(3*numberofelements2d); 65 66 66 for (i=0;i<numberofelements2d;i++){ 67 for (j=0;j<3;j++){ 68 *(index2d+3*i+j)=reCast<int>(*(elements2d+3*i+j))-1; //-1 for C indexing in Metis 67 for (i=0;i<numberofelements2d;i++){ 68 for (j=0;j<3;j++){ 69 *(index2d+3*i+j)=reCast<int>(*(elements2d+3*i+j))-1; //-1 for C indexing in Metis 70 } 69 71 } 70 }71 72 72 /*Partition using Metis:*/73 if (num_procs>1){74 75 METIS_PartMeshNodalPatch(&numberofelements2d,&numberofnodes2d, index2d, &etype2d, &numflag, &num_procs, &edgecut, epart2d, npart2d);76 77 _error_("metis has not beed installed. Cannot run with more than 1 cpu");78 79 }80 else if (num_procs==1){81 /*METIS does not know how to deal with one cpu only!*/82 for (i=0;i<numberofelements2d;i++) epart2d[i]=0;83 for (i=0;i<numberofnodes2d;i++) npart2d[i]=0;84 }85 else _error_("At least one processor is required");73 /*Partition using Metis:*/ 74 if (num_procs>1){ 75 #ifdef _HAVE_METIS_ 76 METIS_PartMeshNodalPatch(&numberofelements2d,&numberofnodes2d, index2d, &etype2d, &numflag, &num_procs, &edgecut, epart2d, npart2d); 77 #else 78 _error_("metis has not beed installed. Cannot run with more than 1 cpu"); 79 #endif 80 } 81 else if (num_procs==1){ 82 /*METIS does not know how to deal with one cpu only!*/ 83 for (i=0;i<numberofelements2d;i++) epart2d[i]=0; 84 for (i=0;i<numberofnodes2d;i++) npart2d[i]=0; 85 } 86 else _error_("At least one processor is required"); 86 87 87 /*Extrude epart2d to epart, using numlayers: */88 epart=xNew<int>(numberofelements);88 /*Extrude epart2d to epart, using numlayers: */ 89 epart=xNew<int>(numberofelements); 89 90 90 count=0; 91 for(i=0;i<(numlayers-1);i++){ 92 for(j=0;j<numberofelements2d;j++){ 93 epart[count]=epart2d[j]; 94 count++; 91 count=0; 92 for(i=0;i<(numlayers-1);i++){ 93 for(j=0;j<numberofelements2d;j++){ 94 epart[count]=epart2d[j]; 95 count++; 96 } 95 97 } 96 }97 98 98 /*Extrude npart2d to npart, using numlayers: */99 npart=xNew<int>(numberofnodes);99 /*Extrude npart2d to npart, using numlayers: */ 100 npart=xNew<int>(numberofnodes); 100 101 101 count=0; 102 for(i=0;i<(numlayers);i++){ 103 for(j=0;j<numberofnodes2d;j++){ 104 npart[count]=npart2d[j]; 105 count++; 102 count=0; 103 for(i=0;i<(numlayers);i++){ 104 for(j=0;j<numberofnodes2d;j++){ 105 npart[count]=npart2d[j]; 106 count++; 107 } 106 108 } 107 } 109 break; 110 default: 111 _error_("mesh type "<<EnumToStringx(meshtype)<<" not supported yet"); 108 112 } 109 113 -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp
r16290 r16291 16 16 17 17 /*Check in 3d*/ 18 if(stabilization==3 && iomodel-> dim==3) _error_("DG 3d not implemented yet");18 if(stabilization==3 && iomodel->meshtype==Mesh3DEnum) _error_("DG 3d not implemented yet"); 19 19 20 20 /*First fetch data: */ 21 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);21 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 22 22 if(stabilization!=3){ 23 23 CreateNodes(pnodes,iomodel,BalancethicknessAnalysisEnum,P1Enum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp
r15986 r16291 42 42 iomodel->FetchDataToInput(elements,BalancethicknessThickeningRateEnum); 43 43 44 if(iomodel-> dim==3){44 if(iomodel->meshtype==Mesh3DEnum){ 45 45 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 46 46 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Balancevelocity/CreateNodesBalancevelocity.cpp
r16007 r16291 12 12 13 13 /*Check in 3d*/ 14 if(iomodel-> dim==3) _error_("DG 3d not implemented yet");14 if(iomodel->meshtype==Mesh3DEnum) _error_("DG 3d not implemented yet"); 15 15 16 16 /*First fetch data: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Balancevelocity/UpdateElementsBalancevelocity.cpp
r16007 r16291 31 31 iomodel->FetchDataToInput(elements,BalancethicknessThickeningRateEnum); 32 32 33 if(iomodel-> dim==3){33 if(iomodel->meshtype==Mesh3DEnum){ 34 34 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 35 35 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp
r16290 r16291 11 11 void CreateNodesBedSlope(Nodes** pnodes, IoModel* iomodel){ 12 12 13 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);13 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 14 14 CreateNodes(pnodes,iomodel,BedSlopeAnalysisEnum,P1Enum); 15 15 iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp
r15941 r16291 24 24 iomodel->FetchDataToInput(elements,BedEnum); 25 25 iomodel->FetchDataToInput(elements,MaskIceLevelsetEnum); 26 if(iomodel-> dim==3){26 if(iomodel->meshtype==Mesh3DEnum){ 27 27 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 28 28 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateEdges.cpp
r15723 r16291 23 23 24 24 /*Mesh dependent variables*/ 25 if(iomodel-> dim==2){25 if(iomodel->meshtype==Mesh2DhorizontalEnum){ 26 26 elementnbv = 3; 27 27 elementnbe = 3; … … 32 32 elementedges[2*2+0] = 0; elementedges[2*2+1] = 1; elementedges_markers[2] = 1; 33 33 } 34 else if(iomodel-> dim==3){34 else if(iomodel->meshtype==Mesh3DEnum){ 35 35 elementnbv = 6; 36 36 elementnbe = 9; -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
r16167 r16291 35 35 36 36 #ifdef _HAVE_3D_ 37 if(iomodel-> dim==3)iomodel->FetchData(2,MeshUpperelementsEnum,MeshLowerelementsEnum);37 if(iomodel->meshtype==Mesh3DEnum)iomodel->FetchData(2,MeshUpperelementsEnum,MeshLowerelementsEnum); 38 38 #endif 39 39 if(control_analysis)iomodel->FetchData(3,InversionControlParametersEnum,InversionMinParametersEnum,InversionMaxParametersEnum); … … 44 44 45 45 /*Create and add tria element to elements dataset: */ 46 if(iomodel-> dim==2) elements->AddObject(new Tria(i+1,i,i,iomodel,nummodels));46 if(iomodel->meshtype==Mesh2DhorizontalEnum) elements->AddObject(new Tria(i+1,i,i,iomodel,nummodels)); 47 47 #ifdef _HAVE_3D_ 48 48 else elements->AddObject(new Penta(i+1,i,i,iomodel,nummodels)); … … 57 57 for (i=0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matice(i+1,i,iomodel)); 58 58 if(dakota_analysis){ 59 if(iomodel-> dim==2) materials->InputDuplicate(MaterialsRheologyBbarEnum,QmuMaterialsRheologyBEnum);59 if(iomodel->meshtype==Mesh2DhorizontalEnum) materials->InputDuplicate(MaterialsRheologyBbarEnum,QmuMaterialsRheologyBEnum); 60 60 #ifdef _HAVE_3D_ 61 61 else materials->InputDuplicate(MaterialsRheologyBEnum,QmuMaterialsRheologyBEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateFaces.cpp
r16218 r16291 12 12 13 13 /*Check Iomodel properties*/ 14 if(iomodel-> dim!=2) _error_("only 2d model are supported");14 if(iomodel->meshtype!=Mesh2DhorizontalEnum) _error_("only 2d model are supported"); 15 15 if(iomodel->numberofvertices<3) _error_("not enough elements in mesh"); 16 16 _assert_(iomodel->elements); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
r15428 r16291 36 36 37 37 /*Get element width (3 or 6)*/ 38 if(iomodel-> dim==2){38 if(iomodel->meshtype==Mesh2DhorizontalEnum){ 39 39 elementswidth=3; 40 40 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r16272 r16291 19 19 20 20 int i,j,m,k; 21 int numoutputs ;21 int numoutputs,meshtype; 22 22 Parameters *parameters = NULL; 23 23 IssmDouble *requestedoutputs = NULL; … … 45 45 46 46 /*Copy some constants from iomodel */ 47 parameters->AddObject(iomodel->CopyConstantObject(Mesh DimensionEnum));47 parameters->AddObject(iomodel->CopyConstantObject(MeshTypeEnum)); 48 48 parameters->AddObject(iomodel->CopyConstantObject(SettingsOutputFrequencyEnum)); 49 49 parameters->AddObject(iomodel->CopyConstantObject(SteadystateReltolEnum)); … … 74 74 parameters->AddObject(iomodel->CopyConstantObject(MeshNumberofelementsEnum)); 75 75 parameters->AddObject(iomodel->CopyConstantObject(MeshNumberofverticesEnum)); 76 parameters->AddObject(iomodel->CopyConstantObject(MeshNumberoflayersEnum));77 76 parameters->AddObject(iomodel->CopyConstantObject(SettingsIoGatherEnum)); 78 77 parameters->AddObject(iomodel->CopyConstantObject(SettingsResultsAsPatchesEnum)); … … 94 93 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIssmbgradientsEnum)); 95 94 parameters->AddObject(iomodel->CopyConstantObject(GiaCrossSectionShapeEnum)); 96 95 96 /*For stress balance only*/ 97 if(iomodel->meshtype==Mesh3DEnum) 98 parameters->AddObject(iomodel->CopyConstantObject(MeshNumberoflayersEnum)); 99 97 100 iomodel->Constant(&ispdd,SurfaceforcingsIspddEnum); 98 101 if(ispdd){ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp
r15435 r16291 30 30 31 31 /*Get element width (3 or 6)*/ 32 if(iomodel-> dim==2){32 if(iomodel->meshtype==Mesh2DhorizontalEnum){ 33 33 elementswidth=3; 34 34 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/EdgesPartitioning.cpp
r15611 r16291 18 18 19 19 /*Mesh dependent variables*/ 20 if(iomodel-> dim==2){20 if(iomodel->meshtype==Mesh2DhorizontalEnum){ 21 21 elementnbe = 3; 22 22 } 23 else if(iomodel-> dim==3){23 else if(iomodel->meshtype==Mesh3DEnum){ 24 24 elementnbe = 9; 25 25 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
r15771 r16291 45 45 46 46 /*Fetch parameters: */ 47 iomodel->Constant(&numberofelements2d,MeshNumberofelements2dEnum); 48 iomodel->Constant(&numberofvertices2d,MeshNumberofvertices2dEnum); 49 iomodel->Constant(&numlayers,MeshNumberoflayersEnum); 47 50 48 iomodel->Constant(&numrifts,RiftsNumriftsEnum); 51 49 … … 55 53 /*Number of vertices per elements, needed to correctly retrieve data: */ 56 54 /*Determine parallel partitioning of elements: we use Metis for now. First load the data, then partition*/ 57 if(iomodel->dim==2){ 58 elements_width=3; //tria elements 59 } 60 else{ 61 elements_width=6; //penta elements 62 iomodel->FetchData(&elements2d,NULL,NULL,MeshElements2dEnum); 55 switch(iomodel->meshtype){ 56 case Mesh2DhorizontalEnum: 57 elements_width=3; 58 numberofelements2d = 0; 59 numberofvertices2d = 0; 60 numlayers = 0; 61 break; 62 case Mesh3DEnum: 63 elements_width=6; //penta elements 64 iomodel->FetchData(&elements2d,NULL,NULL,MeshElements2dEnum); 65 iomodel->Constant(&numberofelements2d,MeshNumberofelements2dEnum); 66 iomodel->Constant(&numberofvertices2d,MeshNumberofvertices2dEnum); 67 iomodel->Constant(&numlayers,MeshNumberoflayersEnum); 68 break; 69 default: 70 _error_("mesh not supported yet"); 63 71 } 64 72 65 MeshPartitionx(&epart,&npart,iomodel->numberofelements,iomodel->numberofvertices,iomodel->elements,numberofelements2d,numberofvertices2d,elements2d,numlayers,elements_width,iomodel-> dim,num_procs);73 MeshPartitionx(&epart,&npart,iomodel->numberofelements,iomodel->numberofvertices,iomodel->elements,numberofelements2d,numberofvertices2d,elements2d,numlayers,elements_width,iomodel->meshtype,num_procs); 66 74 67 75 /*Free elements2d: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp
r16200 r16291 30 30 31 31 /*return if 2d mesh*/ 32 if(iomodel-> dim==2) return;32 if(iomodel->meshtype==Mesh2DhorizontalEnum) return; 33 33 34 34 /*Fetch data: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp
r16290 r16291 11 11 void CreateNodesEnthalpy(Nodes** pnodes, IoModel* iomodel){ 12 12 13 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);13 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 14 14 CreateNodes(pnodes,iomodel,EnthalpyAnalysisEnum,P1Enum); 15 15 iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp
r16218 r16291 13 13 14 14 /*Now, is the model 3d? otherwise, do nothing: */ 15 if(iomodel-> dim==2)return;15 if(iomodel->meshtype==Mesh2DhorizontalEnum)return; 16 16 17 17 /*Fetch data needed: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/FacesPartitioning.cpp
r15611 r16291 15 15 16 16 /*Check Iomodel properties*/ 17 if(iomodel-> dim!=2) _error_("only 2d model are supported");17 if(iomodel->meshtype!=Mesh2DhorizontalEnum) _error_("only 2d model are supported"); 18 18 19 19 /*Get faces and elements*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceBase/CreateNodesFreeSurfaceBase.cpp
r16290 r16291 12 12 13 13 /*Create Nodes either DG or CG depending on stabilization*/ 14 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);14 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 15 15 CreateNodes(pnodes,iomodel,FreeSurfaceBaseAnalysisEnum,P1Enum); 16 16 iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceBase/UpdateElementsFreeSurfaceBase.cpp
r16218 r16291 12 12 13 13 /*Now, is the model 3d? otherwise, do nothing: */ 14 if (iomodel-> dim==2)return;14 if (iomodel->meshtype==Mesh2DhorizontalEnum)return; 15 15 16 16 /*Finite element type*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceTop/CreateNodesFreeSurfaceTop.cpp
r16290 r16291 12 12 13 13 /*Create Nodes either DG or CG depending on stabilization*/ 14 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);14 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 15 15 CreateNodes(pnodes,iomodel,FreeSurfaceTopAnalysisEnum,P1Enum); 16 16 iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceTop/UpdateElementsFreeSurfaceTop.cpp
r16218 r16291 12 12 13 13 /*Now, is the model 3d? otherwise, do nothing: */ 14 if (iomodel-> dim==2)return;14 if (iomodel->meshtype==Mesh2DhorizontalEnum)return; 15 15 16 16 int finiteelement = P1Enum; -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/CreateLoadsHydrologyDCInefficient.cpp
r15643 r16291 22 22 CreateSingleNodeToElementConnectivity(iomodel); 23 23 for(int i=0;i<iomodel->numberofvertices;i++){ 24 if (iomodel-> dim==3){24 if (iomodel->meshtype==Mesh3DEnum){ 25 25 /*keep only this partition's nodes:*/ 26 26 if((iomodel->my_vertices[i]==1)){ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/CreateNodesHydrologyDCInefficient.cpp
r16290 r16291 18 18 if(hydrology_model!=HydrologydcEnum) return; 19 19 20 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);20 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 21 21 CreateNodes(pnodes,iomodel,HydrologyDCInefficientAnalysisEnum,P1Enum); 22 22 iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyShreve/CreateNodesHydrologyShreve.cpp
r16290 r16291 18 18 if(hydrology_model!=HydrologyshreveEnum) return; 19 19 20 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);20 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 21 21 CreateNodes(pnodes,iomodel,HydrologyShreveAnalysisEnum,P1Enum); 22 22 iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Masstransport/CreateNodesMasstransport.cpp
r16290 r16291 16 16 17 17 /*Check in 3d*/ 18 if(stabilization==3 && iomodel-> dim==3) _error_("DG 3d not implemented yet");18 if(stabilization==3 && iomodel->meshtype==Mesh3DEnum) _error_("DG 3d not implemented yet"); 19 19 20 20 /*Create Nodes either DG or CG depending on stabilization*/ 21 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);21 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 22 22 if(stabilization!=3){ 23 23 CreateNodes(pnodes,iomodel,MasstransportAnalysisEnum,P1Enum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Masstransport/UpdateElementsMasstransport.cpp
r16218 r16291 64 64 } 65 65 66 if(iomodel-> dim==3){66 if(iomodel->meshtype==Mesh3DEnum){ 67 67 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 68 68 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r15465 r16291 10 10 11 11 /*if 2d: Error*/ 12 if(iomodel-> dim==2) _error_("2d meshes not supported yet");12 if(iomodel->meshtype==Mesh2DhorizontalEnum) _error_("2d meshes not supported yet"); 13 13 14 14 /*Recover pointer: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp
r16290 r16291 11 11 void CreateNodesMelting(Nodes** pnodes, IoModel* iomodel){ 12 12 13 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);13 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 14 14 CreateNodes(pnodes,iomodel,MeltingAnalysisEnum,P1Enum); 15 15 iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp
r15986 r16291 12 12 13 13 /*Now, is the model 3d? otherwise, do nothing: */ 14 if(iomodel-> dim==2)return;14 if(iomodel->meshtype==Mesh2DhorizontalEnum)return; 15 15 16 16 /*Update elements: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
r16142 r16291 47 47 48 48 /*Hack for trasient runs (FIXME: to be improved)*/ 49 if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && iomodel-> dim==2) continue;50 if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && iomodel-> dim==2) continue;51 if(solution_type==TransientSolutionEnum && analysis_type==EnthalpyAnalysisEnum && iomodel-> dim==2) continue;49 if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && iomodel->meshtype==Mesh2DhorizontalEnum) continue; 50 if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && iomodel->meshtype==Mesh2DhorizontalEnum) continue; 51 if(solution_type==TransientSolutionEnum && analysis_type==EnthalpyAnalysisEnum && iomodel->meshtype==Mesh2DhorizontalEnum) continue; 52 52 if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && isthermal==false) continue; 53 53 if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && isthermal==false) continue; -
issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
r16200 r16291 65 65 66 66 /*First: add all the nodes of all the elements belonging to this cpu*/ 67 if(iomodel-> dim==2){67 if(iomodel->meshtype==Mesh2DhorizontalEnum){ 68 68 for (i=0;i<iomodel->numberofelements;i++){ 69 69 if (my_elements[i]){ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Stressbalance/CreateConstraintsStressbalance.cpp
r16218 r16291 161 161 iomodel->FetchData(&spcvz,&Mz,&Nz,StressbalanceSpcvzEnum); 162 162 iomodel->FetchData(&nodeonSSA,NULL,NULL,FlowequationBorderSSAEnum); 163 if(iomodel-> dim==3)iomodel->FetchData(&nodeonHO,NULL,NULL,FlowequationBorderHOEnum);164 if(iomodel-> dim==3)iomodel->FetchData(&nodeonFS,NULL,NULL,FlowequationBorderFSEnum);165 if(iomodel-> dim==3)iomodel->FetchData(&nodeonbed,NULL,NULL,MeshVertexonbedEnum);166 if(iomodel-> dim==3)iomodel->FetchData(&groundedice_ls,NULL,NULL,MaskGroundediceLevelsetEnum);163 if(iomodel->meshtype==Mesh3DEnum)iomodel->FetchData(&nodeonHO,NULL,NULL,FlowequationBorderHOEnum); 164 if(iomodel->meshtype==Mesh3DEnum)iomodel->FetchData(&nodeonFS,NULL,NULL,FlowequationBorderFSEnum); 165 if(iomodel->meshtype==Mesh3DEnum)iomodel->FetchData(&nodeonbed,NULL,NULL,MeshVertexonbedEnum); 166 if(iomodel->meshtype==Mesh3DEnum)iomodel->FetchData(&groundedice_ls,NULL,NULL,MaskGroundediceLevelsetEnum); 167 167 iomodel->FetchData(&vertices_type,NULL,NULL,FlowequationVertexEquationEnum); 168 168 iomodel->FetchData(&surface,NULL,NULL,SurfaceEnum); … … 385 385 386 386 /*Constraint at the bedrock interface (v.n = vz = 0) (Coordinates will be updated according to the bed slope)*/ 387 if (iomodel-> dim==3) if(nodeonbed[i]>0. && groundedice_ls[i]>=0. && nodeonFS[i]>0.){387 if (iomodel->meshtype==Mesh3DEnum) if(nodeonbed[i]>0. && groundedice_ls[i]>=0. && nodeonFS[i]>0.){ 388 388 switch(reCast<int,IssmDouble>(vertices_type[i])){ 389 389 case SSAFSApproximationEnum: … … 410 410 iomodel->DeleteData(spcvz,StressbalanceSpcvzEnum); 411 411 iomodel->DeleteData(nodeonSSA,FlowequationBorderSSAEnum); 412 if(iomodel-> dim==3)iomodel->DeleteData(nodeonHO,FlowequationBorderHOEnum);413 if(iomodel-> dim==3)iomodel->DeleteData(nodeonFS,FlowequationBorderFSEnum);414 if(iomodel-> dim==3)iomodel->DeleteData(nodeonbed,MeshVertexonbedEnum);415 if(iomodel-> dim==3)iomodel->DeleteData(groundedice_ls,MaskGroundediceLevelsetEnum);412 if(iomodel->meshtype==Mesh3DEnum)iomodel->DeleteData(nodeonHO,FlowequationBorderHOEnum); 413 if(iomodel->meshtype==Mesh3DEnum)iomodel->DeleteData(nodeonFS,FlowequationBorderFSEnum); 414 if(iomodel->meshtype==Mesh3DEnum)iomodel->DeleteData(nodeonbed,MeshVertexonbedEnum); 415 if(iomodel->meshtype==Mesh3DEnum)iomodel->DeleteData(groundedice_ls,MaskGroundediceLevelsetEnum); 416 416 iomodel->DeleteData(vertices_type,FlowequationVertexEquationEnum); 417 417 iomodel->DeleteData(surface,SurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Stressbalance/CreateNodesStressbalance.cpp
r16024 r16291 50 50 iomodel->Constant(&finiteelement,FlowequationFeFSEnum); 51 51 } 52 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,53 FlowequationVertexEquationEnum,StressbalanceReferentialEnum);52 iomodel->FetchData(3,FlowequationBorderSSAEnum,FlowequationVertexEquationEnum,StressbalanceReferentialEnum); 53 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(3,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderFSEnum); 54 54 CreateNodes(pnodes,iomodel,StressbalanceAnalysisEnum,finiteelement,approximation); 55 55 iomodel->DeleteData(6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum, -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Stressbalance/UpdateElementsStressbalance.cpp
r16228 r16291 104 104 iomodel->FetchDataToInput(elements,DamageDEnum); 105 105 106 if(iomodel-> dim==3){106 if(iomodel->meshtype==Mesh3DEnum){ 107 107 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 108 108 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/StressbalanceVertical/CreateConstraintsStressbalanceVertical.cpp
r15857 r16291 21 21 22 22 /*return if 2d mesh*/ 23 if(iomodel-> dim==2) return;23 if(iomodel->meshtype==Mesh2DhorizontalEnum) return; 24 24 25 25 /*Fetch data: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/StressbalanceVertical/CreateNodesStressbalanceVertical.cpp
r15986 r16291 12 12 13 13 /*Now, is the flag macayaealHO on? otherwise, do nothing: */ 14 if(iomodel-> dim==2) return;14 if(iomodel->meshtype==Mesh2DhorizontalEnum) return; 15 15 16 16 iomodel->FetchData(3,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationVertexEquationEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/StressbalanceVertical/UpdateElementsStressbalanceVertical.cpp
r16223 r16291 12 12 13 13 /*Now, is the model 3d? otherwise, do nothing: */ 14 if (iomodel-> dim==2)return;14 if (iomodel->meshtype==Mesh2DhorizontalEnum)return; 15 15 16 16 /*Update elements: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp
r16290 r16291 11 11 void CreateNodesSurfaceSlope(Nodes** pnodes, IoModel* iomodel){ 12 12 13 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);13 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 14 14 CreateNodes(pnodes,iomodel,SurfaceSlopeAnalysisEnum,P1Enum); 15 15 iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp
r15941 r16291 24 24 iomodel->FetchDataToInput(elements,BedEnum); 25 25 iomodel->FetchDataToInput(elements,MaskIceLevelsetEnum); 26 if(iomodel-> dim==3){26 if(iomodel->meshtype==Mesh3DEnum){ 27 27 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 28 28 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
r15484 r16291 15 15 16 16 /*Only 3d mesh supported*/ 17 if(iomodel-> dim==3){17 if(iomodel->meshtype==Mesh3DEnum){ 18 18 IoModelToConstraintsx(constraints,iomodel,ThermalSpctemperatureEnum,ThermalAnalysisEnum,P1Enum); 19 19 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r15465 r16291 12 12 Loads* loads=*ploads; 13 13 14 if(iomodel-> dim==2) _error_("2d meshes not supported yet");14 if(iomodel->meshtype==Mesh2DhorizontalEnum) _error_("2d meshes not supported yet"); 15 15 16 16 /*create penalties for nodes: no node can have a temperature over the melting point*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp
r16290 r16291 11 11 void CreateNodesThermal(Nodes** pnodes, IoModel* iomodel){ 12 12 13 i omodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum);13 if(iomodel->meshtype==Mesh3DEnum) iomodel->FetchData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); 14 14 CreateNodes(pnodes,iomodel,ThermalAnalysisEnum,P1Enum); 15 15 iomodel->DeleteData(2,MeshVertexonbedEnum,MeshVertexonsurfaceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp
r16218 r16291 13 13 14 14 /*Now, is the model 3d? otherwise, do nothing: */ 15 if(iomodel-> dim==2)return;15 if(iomodel->meshtype==Mesh2DhorizontalEnum)return; 16 16 17 17 /*Update elements: */ -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r16275 r16291 183 183 MaterialsMantleDensityEnum, 184 184 MeshAverageVertexConnectivityEnum, 185 MeshDimensionEnum,186 185 MeshElementonbedEnum, 187 186 MeshElementonsurfaceEnum, … … 200 199 MeshYEnum, 201 200 MeshZEnum, 201 MeshTypeEnum, 202 Mesh2DhorizontalEnum, 203 Mesh2DverticalEnum, 204 Mesh3DEnum, 202 205 MiscellaneousNameEnum, //FIXME: only used by qmu, should not be marshalled (already in queueing script) 203 206 MasstransportHydrostaticAdjustmentEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r16275 r16291 191 191 case MaterialsMantleDensityEnum : return "MaterialsMantleDensity"; 192 192 case MeshAverageVertexConnectivityEnum : return "MeshAverageVertexConnectivity"; 193 case MeshDimensionEnum : return "MeshDimension";194 193 case MeshElementonbedEnum : return "MeshElementonbed"; 195 194 case MeshElementonsurfaceEnum : return "MeshElementonsurface"; … … 208 207 case MeshYEnum : return "MeshY"; 209 208 case MeshZEnum : return "MeshZ"; 209 case MeshTypeEnum : return "MeshType"; 210 case Mesh2DhorizontalEnum : return "Mesh2Dhorizontal"; 211 case Mesh2DverticalEnum : return "Mesh2Dvertical"; 212 case Mesh3DEnum : return "Mesh3D"; 210 213 case MiscellaneousNameEnum : return "MiscellaneousName"; 211 214 case MasstransportHydrostaticAdjustmentEnum : return "MasstransportHydrostaticAdjustment"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r16275 r16291 194 194 else if (strcmp(name,"MaterialsMantleDensity")==0) return MaterialsMantleDensityEnum; 195 195 else if (strcmp(name,"MeshAverageVertexConnectivity")==0) return MeshAverageVertexConnectivityEnum; 196 else if (strcmp(name,"MeshDimension")==0) return MeshDimensionEnum;197 196 else if (strcmp(name,"MeshElementonbed")==0) return MeshElementonbedEnum; 198 197 else if (strcmp(name,"MeshElementonsurface")==0) return MeshElementonsurfaceEnum; … … 211 210 else if (strcmp(name,"MeshY")==0) return MeshYEnum; 212 211 else if (strcmp(name,"MeshZ")==0) return MeshZEnum; 212 else if (strcmp(name,"MeshType")==0) return MeshTypeEnum; 213 else if (strcmp(name,"Mesh2Dhorizontal")==0) return Mesh2DhorizontalEnum; 214 else if (strcmp(name,"Mesh2Dvertical")==0) return Mesh2DverticalEnum; 215 else if (strcmp(name,"Mesh3D")==0) return Mesh3DEnum; 213 216 else if (strcmp(name,"MiscellaneousName")==0) return MiscellaneousNameEnum; 214 217 else if (strcmp(name,"MasstransportHydrostaticAdjustment")==0) return MasstransportHydrostaticAdjustmentEnum; … … 257 260 else if (strcmp(name,"SurfaceforcingsMassBalance")==0) return SurfaceforcingsMassBalanceEnum; 258 261 else if (strcmp(name,"SurfaceforcingsIspdd")==0) return SurfaceforcingsIspddEnum; 259 else if (strcmp(name,"SurfaceforcingsDesfac")==0) return SurfaceforcingsDesfacEnum;260 else if (strcmp(name,"SurfaceforcingsS0p")==0) return SurfaceforcingsS0pEnum;261 else if (strcmp(name,"SurfaceforcingsIssmbgradients")==0) return SurfaceforcingsIssmbgradientsEnum;262 262 else stage=3; 263 263 } 264 264 if(stage==3){ 265 if (strcmp(name,"SurfaceforcingsMonthlytemperatures")==0) return SurfaceforcingsMonthlytemperaturesEnum; 265 if (strcmp(name,"SurfaceforcingsDesfac")==0) return SurfaceforcingsDesfacEnum; 266 else if (strcmp(name,"SurfaceforcingsS0p")==0) return SurfaceforcingsS0pEnum; 267 else if (strcmp(name,"SurfaceforcingsIssmbgradients")==0) return SurfaceforcingsIssmbgradientsEnum; 268 else if (strcmp(name,"SurfaceforcingsMonthlytemperatures")==0) return SurfaceforcingsMonthlytemperaturesEnum; 266 269 else if (strcmp(name,"SurfaceforcingsHref")==0) return SurfaceforcingsHrefEnum; 267 270 else if (strcmp(name,"SurfaceforcingsSmbref")==0) return SurfaceforcingsSmbrefEnum; … … 380 383 else if (strcmp(name,"Input")==0) return InputEnum; 381 384 else if (strcmp(name,"IntInput")==0) return IntInputEnum; 382 else if (strcmp(name,"IntParam")==0) return IntParamEnum;383 else if (strcmp(name,"IntVecParam")==0) return IntVecParamEnum;384 else if (strcmp(name,"TransientParam")==0) return TransientParamEnum;385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"Matice")==0) return MaticeEnum; 388 if (strcmp(name,"IntParam")==0) return IntParamEnum; 389 else if (strcmp(name,"IntVecParam")==0) return IntVecParamEnum; 390 else if (strcmp(name,"TransientParam")==0) return TransientParamEnum; 391 else if (strcmp(name,"Matice")==0) return MaticeEnum; 389 392 else if (strcmp(name,"Matpar")==0) return MatparEnum; 390 393 else if (strcmp(name,"Node")==0) return NodeEnum; … … 503 506 else if (strcmp(name,"StressTensorxz")==0) return StressTensorxzEnum; 504 507 else if (strcmp(name,"StressTensoryy")==0) return StressTensoryyEnum; 505 else if (strcmp(name,"StressTensoryz")==0) return StressTensoryzEnum;506 else if (strcmp(name,"StressTensorzz")==0) return StressTensorzzEnum;507 else if (strcmp(name,"GiaCrossSectionShape")==0) return GiaCrossSectionShapeEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"GiadWdt")==0) return GiadWdtEnum; 511 if (strcmp(name,"StressTensoryz")==0) return StressTensoryzEnum; 512 else if (strcmp(name,"StressTensorzz")==0) return StressTensorzzEnum; 513 else if (strcmp(name,"GiaCrossSectionShape")==0) return GiaCrossSectionShapeEnum; 514 else if (strcmp(name,"GiadWdt")==0) return GiadWdtEnum; 512 515 else if (strcmp(name,"GiaW")==0) return GiaWEnum; 513 516 else if (strcmp(name,"P0")==0) return P0Enum;
Note:
See TracChangeset
for help on using the changeset viewer.