Changeset 12535
- Timestamp:
- 06/25/12 14:53:16 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/objects/Node.cpp
r12529 r12535 57 57 //intialize inputs, and add as many inputs per element as requested: 58 58 this->inputs=new Inputs(); 59 if (iomodel->Data(MeshVertexonbedEnum)) 59 if (iomodel->Data(MeshVertexonbedEnum)) { 60 #ifndef _HAVE_ADOLC_ 60 61 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,(IssmBool)iomodel->Data(MeshVertexonbedEnum)[io_index])); 61 if (iomodel->Data(MeshVertexonsurfaceEnum)) 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_ 62 68 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,(IssmBool)iomodel->Data(MeshVertexonsurfaceEnum)[io_index])); 63 if (iomodel->Data(MaskVertexonfloatingiceEnum)) 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_ 64 75 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)iomodel->Data(MaskVertexonfloatingiceEnum)[io_index])); 65 if (iomodel->Data(MaskVertexongroundediceEnum)) 66 this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)iomodel->Data(MaskVertexongroundediceEnum)[io_index])); 67 if (analysis_type==DiagnosticHorizAnalysisEnum) 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_ 68 89 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->Data(FlowequationVertexEquationEnum)[io_index])); 69 90 #else 91 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)((iomodel->Data(FlowequationVertexEquationEnum)[io_index]).getValue()))); 92 #endif 93 } 70 94 /*set single point constraints: */ 71 95 72 96 /*spc all nodes on water*/ 73 97 if (!iomodel->Data(MaskVertexonwaterEnum)) _error2_("iomodel->nodeonwater is NULL"); 74 if (iomodel->Data(MaskVertexonwaterEnum)[io_index]){ 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){ 75 105 for(k=1;k<=gsize;k++){ 76 106 this->FreezeDof(k); … … 117 147 if (!iomodel->Data(FlowequationVertexEquationEnum)) _error2_("iomodel->vertices_type is NULL"); 118 148 /*Constrain all nodes that are not Hutter*/ 119 if (!iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum){ 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 120 154 for(k=1;k<=gsize;k++){ 121 155 this->FreezeDof(k); … … 135 169 /*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */ 136 170 _assert_(iomodel->Data(MeshVertexonbedEnum)); 137 if (!iomodel->Data(MeshVertexonbedEnum)[io_index]){ 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){ 138 178 for(k=1;k<=gsize;k++){ 139 179 this->FreezeDof(k);
Note:
See TracChangeset
for help on using the changeset viewer.