Index: /issm/trunk-jpl/src/c/objects/Node.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Node.cpp	(revision 12548)
+++ /issm/trunk-jpl/src/c/objects/Node.cpp	(revision 12549)
@@ -57,50 +57,19 @@
 	//intialize inputs, and add as many inputs per element as requested: 
 	this->inputs=new Inputs();
-	if (iomodel->Data(MeshVertexonbedEnum)) {
-#ifndef _HAVE_ADOLC_
-	 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,(IssmBool)iomodel->Data(MeshVertexonbedEnum)[io_index]));
-#else
-	 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,(IssmBool)((iomodel->Data(MeshVertexonbedEnum)[io_index]).getValue())));
-#endif
-	}
-	if (iomodel->Data(MeshVertexonsurfaceEnum)) {
-#ifndef _HAVE_ADOLC_
-	 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,(IssmBool)iomodel->Data(MeshVertexonsurfaceEnum)[io_index]));
-#else
-	 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,(IssmBool)((iomodel->Data(MeshVertexonsurfaceEnum)[io_index]).getValue())));
-#endif
-	}
-	if (iomodel->Data(MaskVertexonfloatingiceEnum)) {
-#ifndef _HAVE_ADOLC_
-	 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)iomodel->Data(MaskVertexonfloatingiceEnum)[io_index]));
-#else
-	 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)((iomodel->Data(MaskVertexonfloatingiceEnum)[io_index]).getValue())));
-#endif
-	}
-	if (iomodel->Data(MaskVertexongroundediceEnum)) {
-#ifndef _HAVE_ADOLC_
-	  this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)iomodel->Data(MaskVertexongroundediceEnum)[io_index]));
-#else
-	  this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)((iomodel->Data(MaskVertexongroundediceEnum)[io_index]).getValue())));
-#endif
-	}
-	if (analysis_type==DiagnosticHorizAnalysisEnum) {
-#ifndef _HAVE_ADOLC_
-	 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->Data(FlowequationVertexEquationEnum)[io_index]));
-#else
-	 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)((iomodel->Data(FlowequationVertexEquationEnum)[io_index]).getValue())));
-#endif
-	}
+	if (iomodel->Data(MeshVertexonbedEnum))
+	 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,reCast<IssmBool>(iomodel->Data(MeshVertexonbedEnum)[io_index])));
+	if (iomodel->Data(MeshVertexonsurfaceEnum))
+	 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,reCast<IssmBool>(iomodel->Data(MeshVertexonsurfaceEnum)[io_index])));
+	if (iomodel->Data(MaskVertexonfloatingiceEnum))
+	 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,reCast<IssmBool>(iomodel->Data(MaskVertexonfloatingiceEnum)[io_index])));
+	if (iomodel->Data(MaskVertexongroundediceEnum))
+	  this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,reCast<IssmBool>(iomodel->Data(MaskVertexongroundediceEnum)[io_index])));
+	if (analysis_type==DiagnosticHorizAnalysisEnum)
+	 this->inputs->AddInput(new IntInput(ApproximationEnum,reCast<IssmInt>(iomodel->Data(FlowequationVertexEquationEnum)[io_index])));
 	/*set single point constraints: */
 
 	/*spc all nodes on water*/
 	if (!iomodel->Data(MaskVertexonwaterEnum)) _error2_("iomodel->nodeonwater is NULL");
-	IssmBool maskVertexOnWater;
-#ifndef _HAVE_ADOLC_
-	maskVertexOnWater=iomodel->Data(MaskVertexonwaterEnum)[io_index];
-#else
-        maskVertexOnWater=(IssmBool)((iomodel->Data(MaskVertexonwaterEnum)[io_index]).getValue());
-#endif
-	if (maskVertexOnWater){
+	if (reCast<IssmBool>(iomodel->Data(MaskVertexonwaterEnum)[io_index])){
 		for(k=1;k<=gsize;k++){
 			this->FreezeDof(k);
@@ -147,9 +116,5 @@
 		if (!iomodel->Data(FlowequationVertexEquationEnum)) _error2_("iomodel->vertices_type is NULL");
 		/*Constrain all nodes that are not Hutter*/
-#ifndef _HAVE_ADOLC_
-		if (!(iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum)){
-#else
-		if (!((iomodel->Data(FlowequationVertexEquationEnum)[io_index]).getValue()==HutterApproximationEnum)){
-#endif
+		if (reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[io_index])!=HutterApproximationEnum){
 			for(k=1;k<=gsize;k++){
 				this->FreezeDof(k);
@@ -169,11 +134,5 @@
 			/*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */
 			_assert_(iomodel->Data(MeshVertexonbedEnum));
-		        IssmBool meshVertexOnBed;
-#ifndef _HAVE_ADOLC_
-		        meshVertexOnBed=iomodel->Data(MeshVertexonbedEnum)[io_index];
-#else
-                        meshVertexOnBed=(IssmBool)((iomodel->Data(MeshVertexonbedEnum)[io_index]).getValue());
-#endif
-			if (!meshVertexOnBed){
+			if (!(reCast<IssmBool>(iomodel->Data(MeshVertexonbedEnum)[io_index]))){
 				for(k=1;k<=gsize;k++){
 					this->FreezeDof(k);
