Changeset 12549
- Timestamp:
- 06/26/12 09:16:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/objects/Node.cpp
r12535 r12549 57 57 //intialize inputs, and add as many inputs per element as requested: 58 58 this->inputs=new Inputs(); 59 if (iomodel->Data(MeshVertexonbedEnum)) { 60 #ifndef _HAVE_ADOLC_ 61 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,(IssmBool)iomodel->Data(MeshVertexonbedEnum)[io_index])); 62 #else 63 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,(IssmBool)((iomodel->Data(MeshVertexonbedEnum)[io_index]).getValue()))); 64 #endif 65 } 66 if (iomodel->Data(MeshVertexonsurfaceEnum)) { 67 #ifndef _HAVE_ADOLC_ 68 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,(IssmBool)iomodel->Data(MeshVertexonsurfaceEnum)[io_index])); 69 #else 70 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,(IssmBool)((iomodel->Data(MeshVertexonsurfaceEnum)[io_index]).getValue()))); 71 #endif 72 } 73 if (iomodel->Data(MaskVertexonfloatingiceEnum)) { 74 #ifndef _HAVE_ADOLC_ 75 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)iomodel->Data(MaskVertexonfloatingiceEnum)[io_index])); 76 #else 77 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)((iomodel->Data(MaskVertexonfloatingiceEnum)[io_index]).getValue()))); 78 #endif 79 } 80 if (iomodel->Data(MaskVertexongroundediceEnum)) { 81 #ifndef _HAVE_ADOLC_ 82 this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)iomodel->Data(MaskVertexongroundediceEnum)[io_index])); 83 #else 84 this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)((iomodel->Data(MaskVertexongroundediceEnum)[io_index]).getValue()))); 85 #endif 86 } 87 if (analysis_type==DiagnosticHorizAnalysisEnum) { 88 #ifndef _HAVE_ADOLC_ 89 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->Data(FlowequationVertexEquationEnum)[io_index])); 90 #else 91 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)((iomodel->Data(FlowequationVertexEquationEnum)[io_index]).getValue()))); 92 #endif 93 } 59 if (iomodel->Data(MeshVertexonbedEnum)) 60 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,reCast<IssmBool>(iomodel->Data(MeshVertexonbedEnum)[io_index]))); 61 if (iomodel->Data(MeshVertexonsurfaceEnum)) 62 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,reCast<IssmBool>(iomodel->Data(MeshVertexonsurfaceEnum)[io_index]))); 63 if (iomodel->Data(MaskVertexonfloatingiceEnum)) 64 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,reCast<IssmBool>(iomodel->Data(MaskVertexonfloatingiceEnum)[io_index]))); 65 if (iomodel->Data(MaskVertexongroundediceEnum)) 66 this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,reCast<IssmBool>(iomodel->Data(MaskVertexongroundediceEnum)[io_index]))); 67 if (analysis_type==DiagnosticHorizAnalysisEnum) 68 this->inputs->AddInput(new IntInput(ApproximationEnum,reCast<IssmInt>(iomodel->Data(FlowequationVertexEquationEnum)[io_index]))); 94 69 /*set single point constraints: */ 95 70 96 71 /*spc all nodes on water*/ 97 72 if (!iomodel->Data(MaskVertexonwaterEnum)) _error2_("iomodel->nodeonwater is NULL"); 98 IssmBool maskVertexOnWater; 99 #ifndef _HAVE_ADOLC_ 100 maskVertexOnWater=iomodel->Data(MaskVertexonwaterEnum)[io_index]; 101 #else 102 maskVertexOnWater=(IssmBool)((iomodel->Data(MaskVertexonwaterEnum)[io_index]).getValue()); 103 #endif 104 if (maskVertexOnWater){ 73 if (reCast<IssmBool>(iomodel->Data(MaskVertexonwaterEnum)[io_index])){ 105 74 for(k=1;k<=gsize;k++){ 106 75 this->FreezeDof(k); … … 147 116 if (!iomodel->Data(FlowequationVertexEquationEnum)) _error2_("iomodel->vertices_type is NULL"); 148 117 /*Constrain all nodes that are not Hutter*/ 149 #ifndef _HAVE_ADOLC_ 150 if (!(iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum)){ 151 #else 152 if (!((iomodel->Data(FlowequationVertexEquationEnum)[io_index]).getValue()==HutterApproximationEnum)){ 153 #endif 118 if (reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[io_index])!=HutterApproximationEnum){ 154 119 for(k=1;k<=gsize;k++){ 155 120 this->FreezeDof(k); … … 169 134 /*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */ 170 135 _assert_(iomodel->Data(MeshVertexonbedEnum)); 171 IssmBool meshVertexOnBed; 172 #ifndef _HAVE_ADOLC_ 173 meshVertexOnBed=iomodel->Data(MeshVertexonbedEnum)[io_index]; 174 #else 175 meshVertexOnBed=(IssmBool)((iomodel->Data(MeshVertexonbedEnum)[io_index]).getValue()); 176 #endif 177 if (!meshVertexOnBed){ 136 if (!(reCast<IssmBool>(iomodel->Data(MeshVertexonbedEnum)[io_index]))){ 178 137 for(k=1;k<=gsize;k++){ 179 138 this->FreezeDof(k);
Note:
See TracChangeset
for help on using the changeset viewer.