Index: /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 9404)
+++ /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 9405)
@@ -553,4 +553,5 @@
 	SpcDynamicEnum,
 	NumberOfEdgesEnum,
+	ResultsOnVerticesEnum,
 	MaximumNumberOfEnums
 };
Index: /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
===================================================================
--- /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 9405)
@@ -495,4 +495,5 @@
 		case SpcDynamicEnum : return "SpcDynamic";
 		case NumberOfEdgesEnum : return "NumberOfEdges";
+		case ResultsOnVerticesEnum : return "ResultsOnVertices";
 		default : return "unknown";
 
Index: /issm/trunk/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
===================================================================
--- /issm/trunk/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 9405)
@@ -33,5 +33,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	/*First of, find the record for the enum, and get code  of data type: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp	(revision 9405)
@@ -13,5 +13,5 @@
 	
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&prognostic_DG,PrognosticDGEnum);
+	iomodel->Constant(&prognostic_DG,PrognosticDGEnum);
 
 	/*Output*/
Index: /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp	(revision 9405)
@@ -20,6 +20,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&prognostic_DG,PrognosticDGEnum);
-	iomodel->constants->FindParam(&numberofedges,NumberOfEdgesEnum);
+	iomodel->Constant(&prognostic_DG,PrognosticDGEnum);
+	iomodel->Constant(&numberofedges,NumberOfEdgesEnum);
 
 	/*Output*/
@@ -42,5 +42,5 @@
 
 			/*Get left and right elements*/
-			element=(int)iomodel->f(EdgesEnum)[4*i+2]-1; //edges are [node1 node2 elem1 elem2]
+			element=(int)iomodel->Data(EdgesEnum)[4*i+2]-1; //edges are [node1 node2 elem1 elem2]
 
 			/*Now, if this element is not in the partition, pass: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp	(revision 9405)
@@ -30,8 +30,8 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&prognostic_DG,PrognosticDGEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&prognostic_DG,PrognosticDGEnum);
 
 	/*Recover pointer: */
@@ -72,5 +72,5 @@
 
 					//Get index of the vertex on which the current node is located
-					vertex_id=(int)*(iomodel->f(ElementsEnum)+3*i+j); //(Matlab indexing)
+					vertex_id=(int)*(iomodel->Data(ElementsEnum)+3*i+j); //(Matlab indexing)
 					io_index=vertex_id-1;                      //(C indexing)
 					_assert_(vertex_id>0 && vertex_id<=numberofvertices);
Index: /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp	(revision 9405)
@@ -20,6 +20,6 @@
 
 	/*Fetch data needed: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 	iomodel->FetchData(1,ElementsEnum);
 
Index: /issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp	(revision 9405)
@@ -24,5 +24,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp	(revision 9405)
@@ -20,6 +20,6 @@
 
 	/*Fetch data needed: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 	iomodel->FetchData(1,ElementsEnum);
 
Index: /issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 9405)
@@ -27,7 +27,7 @@
 	
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&control_analysis,ControlAnalysisEnum);
-	iomodel->constants->FindParam(&num_control_type,NumControlTypeEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&control_analysis,ControlAnalysisEnum);
+	iomodel->Constant(&num_control_type,NumControlTypeEnum);
 
 	/*Now, return if no control*/
@@ -42,5 +42,5 @@
 	iomodel->FetchData(4,ControlTypeEnum,WeightsEnum,CmMinEnum,CmMaxEnum);
 	for(i=0;i<num_control_type;i++){
-		switch((int)iomodel->f(ControlTypeEnum)[i]){
+		switch((int)iomodel->Data(ControlTypeEnum)[i]){
 			case DhdtEnum: iomodel->FetchData(1,DhdtEnum); break;
 			case VxEnum:   iomodel->FetchData(1,VxEnum); break;
@@ -48,5 +48,5 @@
 			case DragCoefficientEnum: iomodel->FetchData(1,DragCoefficientEnum); break;
 			case RheologyBbarEnum:    iomodel->FetchData(1,RheologyBEnum); break;
-			default: _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->f(ControlTypeEnum)[i]));
+			default: _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(ControlTypeEnum)[i]));
 		}
 	}
Index: /issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp	(revision 9405)
@@ -28,8 +28,8 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&control_analysis,ControlAnalysisEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&control_analysis,ControlAnalysisEnum);
 
 	/*Did we already create the elements? : */
Index: /issm/trunk/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 9405)
@@ -29,8 +29,8 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	elements=iomodel->f(ElementsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	elements=iomodel->Data(ElementsEnum);
 
 	/*Some checks if debugging*/
Index: /issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 9405)
@@ -22,5 +22,5 @@
 		
 	/*Initialize dataset: */
-	parameters = (Parameters*)iomodel->constants->Copy();
+	parameters = iomodel->CopyConstants();
 
 	/*some parameters that did not come with the iomodel: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 9405)
@@ -32,8 +32,8 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	elements=iomodel->f(ElementsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	elements=iomodel->Data(ElementsEnum);
 
 	/*Some checks if debugging*/
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 9405)
@@ -40,12 +40,12 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&yts,YtsEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&g,GEnum);
-	iomodel->constants->FindParam(&rho_ice,RhoIceEnum);
-	iomodel->constants->FindParam(&stokesreconditioning,StokesreconditioningEnum);
-	iomodel->constants->FindParam(&isstokes,IsstokesEnum);
-	iomodel->constants->FindParam(&ismacayealpattyn,IsmacayealpattynEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&yts,YtsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&g,GEnum);
+	iomodel->Constant(&rho_ice,RhoIceEnum);
+	iomodel->Constant(&stokesreconditioning,StokesreconditioningEnum);
+	iomodel->Constant(&isstokes,IsstokesEnum);
+	iomodel->Constant(&ismacayealpattyn,IsmacayealpattynEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 9405)
@@ -42,9 +42,9 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&isstokes,IsstokesEnum);
-	iomodel->constants->FindParam(&ismacayealpattyn,IsmacayealpattynEnum);
-	iomodel->constants->FindParam(&numrifts,NumriftsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&isstokes,IsstokesEnum);
+	iomodel->Constant(&ismacayealpattyn,IsmacayealpattynEnum);
+	iomodel->Constant(&numrifts,NumriftsEnum);
 
 	/*Recover pointer: */
@@ -177,5 +177,5 @@
 		iomodel->FetchData(5,RiftinfoEnum,ThicknessEnum,BedEnum,SurfaceEnum,NodeOnIceShelfEnum);
 		for(i=0;i<numrifts;i++){
-			if(iomodel->my_elements[(int)(iomodel->f(RiftinfoEnum)[RIFTINFOSIZE*i+2])-1]){
+			if(iomodel->my_elements[(int)*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+2)-1]){
 				loads->AddObject(new Riftfront(iomodel->loadcounter+count+1,i,iomodel,DiagnosticHorizAnalysisEnum));
 				count++;
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp	(revision 9405)
@@ -25,7 +25,7 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&isstokes,IsstokesEnum);
-	iomodel->constants->FindParam(&ismacayealpattyn,IsmacayealpattynEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&isstokes,IsstokesEnum);
+	iomodel->Constant(&ismacayealpattyn,IsmacayealpattynEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 9405)
@@ -24,10 +24,10 @@
 
 	/*Fetch constants needed: */
-	iomodel->constants->FindParam(&isstokes,IsstokesEnum);
-	iomodel->constants->FindParam(&ismacayealpattyn,IsmacayealpattynEnum);
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&control_analysis,ControlAnalysisEnum);
-	iomodel->constants->FindParam(&qmu_analysis,QmuAnalysisEnum);
+	iomodel->Constant(&isstokes,IsstokesEnum);
+	iomodel->Constant(&ismacayealpattyn,IsmacayealpattynEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&control_analysis,ControlAnalysisEnum);
+	iomodel->Constant(&qmu_analysis,QmuAnalysisEnum);
 
 	/*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp	(revision 9405)
@@ -28,7 +28,7 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&yts,YtsEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&ishutter,IshutterEnum);
+	iomodel->Constant(&yts,YtsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&ishutter,IshutterEnum);
 
 	/*Create constraints if they do not exist yet*/
@@ -51,5 +51,5 @@
 		/*keep only this partition's nodes:*/
 		if((iomodel->my_vertices[i])){
-			if (!(int)iomodel->f(NodeOnHutterEnum)[i]){
+			if (!(int)iomodel->Data(NodeOnHutterEnum)[i]){
 
 				constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHutterAnalysisEnum));
@@ -60,11 +60,11 @@
 			}
 			else{
-				if (!isnan(iomodel->f(SpcvxEnum)[i])){
-					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,iomodel->f(SpcvxEnum)[i]/yts,DiagnosticHutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+				if (!isnan(iomodel->Data(SpcvxEnum)[i])){
+					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,iomodel->Data(SpcvxEnum)[i]/yts,DiagnosticHutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
 					count++;
 				}
 
-				if (!isnan(iomodel->f(SpcvyEnum)[i])){
-					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,iomodel->f(SpcvyEnum)[i]/yts,DiagnosticHutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
+				if (!isnan(iomodel->Data(SpcvyEnum)[i])){
+					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,iomodel->Data(SpcvyEnum)[i]/yts,DiagnosticHutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
 					count++;
 				}
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp	(revision 9405)
@@ -25,6 +25,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&ishutter,IshutterEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&ishutter,IshutterEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp	(revision 9405)
@@ -21,6 +21,6 @@
 	
 	/*Fetch data needed: */
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&ishutter,IshutterEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&ishutter,IshutterEnum);
 
 	/*Now, is the flag hutter on? otherwise, do nothing: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp	(revision 9405)
@@ -24,7 +24,7 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&yts,YtsEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&yts,YtsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	/*Recover pointer: */
@@ -52,11 +52,11 @@
 		if(iomodel->my_vertices[i]){
 
-			if ((int)iomodel->f(NodeOnStokesEnum)[i]){
+			if ((int)iomodel->Data(NodeOnStokesEnum)[i]){
 				constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticVertAnalysisEnum)); //spc to zero as vertical velocity is done in Horiz for Stokes
 				count++;
 			}
-			else if (!isnan(iomodel->f(SpcvzEnum)[i])){
+			else if (!isnan(iomodel->Data(SpcvzEnum)[i])){
 				constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,
-								iomodel->f(SpcvzEnum)[i]/yts,DiagnosticVertAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+								iomodel->Data(SpcvzEnum)[i]/yts,DiagnosticVertAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
 				count++;
 
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp	(revision 9405)
@@ -25,6 +25,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp	(revision 9405)
@@ -20,6 +20,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 
 	/*Now, is the model 3d? otherwise, do nothing: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 9405)
@@ -48,11 +48,11 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&numberofelements2d,NumberOfElements2DEnum);
-	iomodel->constants->FindParam(&numberofvertices2d,NumberOfNodes2DEnum);
-	iomodel->constants->FindParam(&numlayers,NumlayersEnum);
-	iomodel->constants->FindParam(&numrifts,NumriftsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofelements2d,NumberOfElements2DEnum);
+	iomodel->Constant(&numberofvertices2d,NumberOfNodes2DEnum);
+	iomodel->Constant(&numlayers,NumlayersEnum);
+	iomodel->Constant(&numrifts,NumriftsEnum);
 
 	/*First, check that partitioning has not yet been carryed out. Just check whether my_elements pointers is not already assigned a value: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp	(revision 9405)
@@ -26,8 +26,8 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&heatcapacity,HeatcapacityEnum);
-	iomodel->constants->FindParam(&referencetemperature,ReferencetemperatureEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&heatcapacity,HeatcapacityEnum);
+	iomodel->Constant(&referencetemperature,ReferencetemperatureEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp	(revision 9405)
@@ -24,5 +24,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 	
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp	(revision 9405)
@@ -20,6 +20,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 
 	/*Now, is the model 3d? otherwise, do nothing: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp	(revision 9405)
@@ -24,5 +24,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 	
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp	(revision 9405)
@@ -19,5 +19,5 @@
 	
 	/*Fetch data needed: */
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 	iomodel->FetchData(1,ElementsEnum);
 
Index: /issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 9405)
@@ -22,6 +22,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	/*if 2d: Error*/
@@ -40,5 +40,5 @@
 	for (i=0;i<numberofvertices;i++){
 		if((iomodel->my_vertices[i]==1)){
-			if (iomodel->f(NodeOnBedEnum)[i]){ 
+			if (iomodel->Data(NodeOnBedEnum)[i]){ 
 				loads->AddObject(new Pengrid(iomodel->loadcounter+i+1,i,iomodel,MeltingAnalysisEnum));
 			}
Index: /issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp	(revision 9405)
@@ -24,5 +24,5 @@
 	
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp	(revision 9405)
@@ -20,6 +20,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 
 	/*Now, is the model 3d? otherwise, do nothing: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 9405)
@@ -37,6 +37,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&verbose,VerboseEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&verbose,VerboseEnum);
 	
 	SetVerbosityLevel(verbose);
Index: /issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 9405)
@@ -42,5 +42,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	my_nodes=(bool*)xmalloc(numberofvertices*sizeof(bool));
@@ -57,5 +57,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 
 	/*each element has it own nodes (as many as vertices) + additional nodes from neighbouring elements for each edge. This yields to a very different partition for 
@@ -78,5 +78,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
+	iomodel->Constant(&dim,DimEnum);
 
 	/*Build discontinuous node partitioning
Index: /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp	(revision 9405)
@@ -13,5 +13,5 @@
 	
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&prognostic_DG,PrognosticDGEnum);
+	iomodel->Constant(&prognostic_DG,PrognosticDGEnum);
 
 	/*Output*/
Index: /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 9405)
@@ -27,7 +27,7 @@
 	
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&prognostic_DG,PrognosticDGEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&numberofedges,NumberOfEdgesEnum);
+	iomodel->Constant(&prognostic_DG,PrognosticDGEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofedges,NumberOfEdgesEnum);
 
 	/*Recover pointer: */
@@ -47,5 +47,5 @@
 
 			/*Get left and right elements*/
-			element=(int)(iomodel->f(EdgesEnum)[4*i+2])-1; //edges are [node1 node2 elem1 elem2]
+			element=(int)(iomodel->Data(EdgesEnum)[4*i+2])-1; //edges are [node1 node2 elem1 elem2]
 
 			/*Now, if this element is not in the partition, pass: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 9405)
@@ -30,8 +30,8 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&prognostic_DG,PrognosticDGEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&prognostic_DG,PrognosticDGEnum);
 
 	/*Recover pointer: */
@@ -72,5 +72,5 @@
 
 					//Get index of the vertex on which the current node is located
-					vertex_id=(int)*(iomodel->f(ElementsEnum)+3*i+j); //(Matlab indexing)
+					vertex_id=(int)*(iomodel->Data(ElementsEnum)+3*i+j); //(Matlab indexing)
 					io_index=vertex_id-1;                      //(C indexing)
 					_assert_(vertex_id>0 && vertex_id<=numberofvertices);
Index: /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 9405)
@@ -21,7 +21,7 @@
 
 	/*Fetch data needed: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&prognostic_DG,PrognosticDGEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&prognostic_DG,PrognosticDGEnum);
 	iomodel->FetchData(1,ElementsEnum);
 
Index: /issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp	(revision 9405)
@@ -24,5 +24,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp	(revision 9405)
@@ -20,6 +20,6 @@
 
 	/*Fetch data needed: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 	iomodel->FetchData(1,ElementsEnum);
 
Index: /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp	(revision 9405)
@@ -23,5 +23,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
+	iomodel->Constant(&dim,DimEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 9405)
@@ -26,6 +26,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	/*Create loads if they do not exist yet*/
@@ -43,5 +43,5 @@
 		/*keep only this partition's nodes:*/
 		if((iomodel->my_vertices[i]==1)){
-			if (isnan(iomodel->f(SpctemperatureEnum)[i])){ //No penalty applied on spc nodes!
+			if (isnan(iomodel->Data(SpctemperatureEnum)[i])){ //No penalty applied on spc nodes!
 				loads->AddObject(new Pengrid(iomodel->loadcounter+i+1,i,iomodel,ThermalAnalysisEnum));
 			}
Index: /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp	(revision 9405)
@@ -24,5 +24,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp	(revision 9405)
@@ -21,7 +21,7 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&qmu_analysis,QmuAnalysisEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&qmu_analysis,QmuAnalysisEnum);
 
 	/*Now, is the model 3d? otherwise, do nothing: */
Index: /issm/trunk/src/c/modules/OutputResultsx/OutputResultsx.cpp
===================================================================
--- /issm/trunk/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 9405)
@@ -26,5 +26,5 @@
 	char       *outputfilename          = NULL;
 	char        cpu_outputfilename[100];        //easier to convert an integer with sprintf
-	bool        io_gather;
+	bool        io_gather,results_on_vertices;
 	int         solutiontype;
 	Results    *results                 = NULL;
Index: /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
===================================================================
--- /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 9404)
+++ /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 9405)
@@ -493,4 +493,5 @@
 	else if (strcmp(name,"SpcDynamic")==0) return SpcDynamicEnum;
 	else if (strcmp(name,"NumberOfEdges")==0) return NumberOfEdgesEnum;
+	else if (strcmp(name,"ResultsOnVertices")==0) return ResultsOnVerticesEnum;
 	else _error_("Enum %s not found",name);
 
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 9405)
@@ -57,6 +57,6 @@
 	/*Checks in debugging mode*/
 	/*{{{2*/
-	_assert_(iomodel->f(UpperelementsEnum));
-	_assert_(iomodel->f(LowerelementsEnum));
+	_assert_(iomodel->Data(UpperelementsEnum));
+	_assert_(iomodel->Data(LowerelementsEnum));
 	/*}}}*/
 
@@ -66,13 +66,13 @@
 
 	/*Build neighbors list*/
-	if (isnan(iomodel->f(UpperelementsEnum)[index])) penta_elements_ids[1]=this->id; //upper penta is the same penta
-	else                                    penta_elements_ids[1]=(int)(iomodel->f(UpperelementsEnum)[index]);
-	if (isnan(iomodel->f(LowerelementsEnum)[index])) penta_elements_ids[0]=this->id; //lower penta is the same penta
-	else                                    penta_elements_ids[0]=(int)(iomodel->f(LowerelementsEnum)[index]);
+	if (isnan(iomodel->Data(UpperelementsEnum)[index])) penta_elements_ids[1]=this->id; //upper penta is the same penta
+	else                                    penta_elements_ids[1]=(int)(iomodel->Data(UpperelementsEnum)[index]);
+	if (isnan(iomodel->Data(LowerelementsEnum)[index])) penta_elements_ids[0]=this->id; //lower penta is the same penta
+	else                                    penta_elements_ids[0]=(int)(iomodel->Data(LowerelementsEnum)[index]);
 	this->InitHookNeighbors(penta_elements_ids);
 
 	/*Build horizontalneighborsids list: */
-	_assert_(iomodel->f(ElementconnectivityEnum));
-	for(i=0;i<3;i++) this->horizontalneighborsids[i]=(int)iomodel->f(ElementconnectivityEnum)[3*index+i]-1;
+	_assert_(iomodel->Data(ElementconnectivityEnum));
+	for(i=0;i<3;i++) this->horizontalneighborsids[i]=(int)iomodel->Data(ElementconnectivityEnum)[3*index+i]-1;
 
 	//this->parameters: we still can't point to it, it may not even exist. Configure will handle this.
@@ -4860,7 +4860,7 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&yts,YtsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&yts,YtsEnum);
 
 	/*Branch on type of vector: nodal or elementary: */
@@ -4869,5 +4869,5 @@
 		/*Recover vertices ids needed to initialize inputs*/
 		for(i=0;i<6;i++){ 
-			penta_vertex_ids[i]=(int)iomodel->f(ElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
+			penta_vertex_ids[i]=(int)iomodel->Data(ElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
 		}
 
@@ -5169,52 +5169,52 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&yts,YtsEnum);
-	iomodel->constants->FindParam(&control_analysis,ControlAnalysisEnum);
-	iomodel->constants->FindParam(&num_control_type,NumControlTypeEnum);
-	iomodel->constants->FindParam(&num_cm_responses,NumCmResponsesEnum);
+	iomodel->Constant(&yts,YtsEnum);
+	iomodel->Constant(&control_analysis,ControlAnalysisEnum);
+	iomodel->Constant(&num_control_type,NumControlTypeEnum);
+	iomodel->Constant(&num_cm_responses,NumCmResponsesEnum);
 
 	/*Checks if debuging*/
 	/*{{{2*/
-	_assert_(iomodel->f(ElementsEnum));
+	_assert_(iomodel->Data(ElementsEnum));
 	/*}}}*/
 
 	/*Recover vertices ids needed to initialize inputs*/
 	for(i=0;i<6;i++){ 
-		penta_vertex_ids[i]=(int)iomodel->f(ElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
+		penta_vertex_ids[i]=(int)iomodel->Data(ElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
 	}
 
 	/*Control Inputs*/
-	if (control_analysis && iomodel->f(ControlTypeEnum)){
+	if (control_analysis && iomodel->Data(ControlTypeEnum)){
 		for(i=0;i<num_control_type;i++){
-			switch((int)iomodel->f(ControlTypeEnum)[i]){
+			switch((int)iomodel->Data(ControlTypeEnum)[i]){
 				case DhdtEnum:
-					if (iomodel->f(DhdtEnum)){
-						for(j=0;j<6;j++)nodeinputs[j]=iomodel->f(DhdtEnum)[penta_vertex_ids[j]-1]/yts;
-						for(j=0;j<6;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
-						for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
+					if (iomodel->Data(DhdtEnum)){
+						for(j=0;j<6;j++)nodeinputs[j]=iomodel->Data(DhdtEnum)[penta_vertex_ids[j]-1]/yts;
+						for(j=0;j<6;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
+						for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
 						this->inputs->AddInput(new ControlInput(DhdtEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 					}
 					break;
 				case VxEnum:
-					if (iomodel->f(VxEnum)){
-						for(j=0;j<6;j++)nodeinputs[j]=iomodel->f(VxEnum)[penta_vertex_ids[j]-1]/yts;
-						for(j=0;j<6;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
-						for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
+					if (iomodel->Data(VxEnum)){
+						for(j=0;j<6;j++)nodeinputs[j]=iomodel->Data(VxEnum)[penta_vertex_ids[j]-1]/yts;
+						for(j=0;j<6;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
+						for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
 						this->inputs->AddInput(new ControlInput(VxEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 					}
 					break;
 				case VyEnum:
-					if (iomodel->f(VyEnum)){
-						for(j=0;j<6;j++)nodeinputs[j]=iomodel->f(VyEnum)[penta_vertex_ids[j]-1]/yts;
-						for(j=0;j<6;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
-						for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
+					if (iomodel->Data(VyEnum)){
+						for(j=0;j<6;j++)nodeinputs[j]=iomodel->Data(VyEnum)[penta_vertex_ids[j]-1]/yts;
+						for(j=0;j<6;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
+						for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[(penta_vertex_ids[j]-1)*num_control_type+i]/yts;
 						this->inputs->AddInput(new ControlInput(VyEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 					}
 					break;
 				case DragCoefficientEnum:
-					if (iomodel->f(DragCoefficientEnum)){
-						for(j=0;j<6;j++)nodeinputs[j]=iomodel->f(DragCoefficientEnum)[penta_vertex_ids[j]-1];
-						for(j=0;j<6;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[(penta_vertex_ids[j]-1)*num_control_type+i];
-						for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[(penta_vertex_ids[j]-1)*num_control_type+i];
+					if (iomodel->Data(DragCoefficientEnum)){
+						for(j=0;j<6;j++)nodeinputs[j]=iomodel->Data(DragCoefficientEnum)[penta_vertex_ids[j]-1];
+						for(j=0;j<6;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[(penta_vertex_ids[j]-1)*num_control_type+i];
+						for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[(penta_vertex_ids[j]-1)*num_control_type+i];
 						this->inputs->AddInput(new ControlInput(DragCoefficientEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 					}
@@ -5223,5 +5223,5 @@
 					/*Matice will take care of it*/ break;
 				default:
-					_error_("Control %s not implemented yet",EnumToStringx((int)iomodel->f(ControlTypeEnum)[i]));
+					_error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(ControlTypeEnum)[i]));
 			}
 		}
@@ -5229,41 +5229,41 @@
 
 	//Need to know the type of approximation for this element
-	if(iomodel->f(ElementsTypeEnum)){
-		if (*(iomodel->f(ElementsTypeEnum)+index)==MacAyealApproximationEnum){
+	if(iomodel->Data(ElementsTypeEnum)){
+		if (*(iomodel->Data(ElementsTypeEnum)+index)==MacAyealApproximationEnum){
 			this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealApproximationEnum));
 		}
-		else if (*(iomodel->f(ElementsTypeEnum)+index)==PattynApproximationEnum){
+		else if (*(iomodel->Data(ElementsTypeEnum)+index)==PattynApproximationEnum){
 			this->inputs->AddInput(new IntInput(ApproximationEnum,PattynApproximationEnum));
 		}
-		else if (*(iomodel->f(ElementsTypeEnum)+index)==MacAyealPattynApproximationEnum){
+		else if (*(iomodel->Data(ElementsTypeEnum)+index)==MacAyealPattynApproximationEnum){
 			this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealPattynApproximationEnum));
 		}
-		else if (*(iomodel->f(ElementsTypeEnum)+index)==HutterApproximationEnum){
+		else if (*(iomodel->Data(ElementsTypeEnum)+index)==HutterApproximationEnum){
 			this->inputs->AddInput(new IntInput(ApproximationEnum,HutterApproximationEnum));
 		}
-		else if (*(iomodel->f(ElementsTypeEnum)+index)==StokesApproximationEnum){
+		else if (*(iomodel->Data(ElementsTypeEnum)+index)==StokesApproximationEnum){
 			this->inputs->AddInput(new IntInput(ApproximationEnum,StokesApproximationEnum));
 		}
-		else if (*(iomodel->f(ElementsTypeEnum)+index)==MacAyealStokesApproximationEnum){
+		else if (*(iomodel->Data(ElementsTypeEnum)+index)==MacAyealStokesApproximationEnum){
 			this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealStokesApproximationEnum));
 		}
-		else if (*(iomodel->f(ElementsTypeEnum)+index)==PattynStokesApproximationEnum){
+		else if (*(iomodel->Data(ElementsTypeEnum)+index)==PattynStokesApproximationEnum){
 			this->inputs->AddInput(new IntInput(ApproximationEnum,PattynStokesApproximationEnum));
 		}
-		else if (*(iomodel->f(ElementsTypeEnum)+index)==NoneApproximationEnum){
+		else if (*(iomodel->Data(ElementsTypeEnum)+index)==NoneApproximationEnum){
 			this->inputs->AddInput(new IntInput(ApproximationEnum,NoneApproximationEnum));
 		}
 		else{
-			_error_("Approximation type %s not supported yet",EnumToStringx((int)*(iomodel->f(ElementsTypeEnum)+index)));
+			_error_("Approximation type %s not supported yet",EnumToStringx((int)*(iomodel->Data(ElementsTypeEnum)+index)));
 		}
 	}
 
 	/*DatasetInputs*/
-	if (control_analysis && iomodel->f(WeightsEnum)) {
+	if (control_analysis && iomodel->Data(WeightsEnum)) {
 
 		/*Create inputs and add to DataSetInput*/
 		DatasetInput* datasetinput=new DatasetInput(WeightsEnum);
 		for(i=0;i<num_cm_responses;i++){
-			for(j=0;j<6;j++)nodeinputs[j]=iomodel->f(WeightsEnum)[(penta_vertex_ids[j]-1)*num_cm_responses+i];
+			for(j=0;j<6;j++)nodeinputs[j]=iomodel->Data(WeightsEnum)[(penta_vertex_ids[j]-1)*num_cm_responses+i];
 			datasetinput->inputs->AddObject(new PentaVertexInput(WeightsEnum,nodeinputs));
 		}
@@ -7520,18 +7520,18 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&yts,YtsEnum);
-	iomodel->constants->FindParam(&prognostic_DG,PrognosticDGEnum);
-	iomodel->constants->FindParam(&qmu_analysis,QmuAnalysisEnum);
-	iomodel->constants->FindParam(&isstokes,IsstokesEnum);
-	iomodel->constants->FindParam(&beta,BetaEnum);
-	iomodel->constants->FindParam(&heatcapacity,HeatcapacityEnum);
-	iomodel->constants->FindParam(&referencetemperature,ReferencetemperatureEnum);
-	iomodel->constants->FindParam(&meltingpoint,MeltingpointEnum);
-	iomodel->constants->FindParam(&latentheat,LatentheatEnum);
+	iomodel->Constant(&yts,YtsEnum);
+	iomodel->Constant(&prognostic_DG,PrognosticDGEnum);
+	iomodel->Constant(&qmu_analysis,QmuAnalysisEnum);
+	iomodel->Constant(&isstokes,IsstokesEnum);
+	iomodel->Constant(&beta,BetaEnum);
+	iomodel->Constant(&heatcapacity,HeatcapacityEnum);
+	iomodel->Constant(&referencetemperature,ReferencetemperatureEnum);
+	iomodel->Constant(&meltingpoint,MeltingpointEnum);
+	iomodel->Constant(&latentheat,LatentheatEnum);
 
 
 	/*Checks if debuging*/
 	/*{{{2*/
-	_assert_(iomodel->f(ElementsEnum));
+	_assert_(iomodel->Data(ElementsEnum));
 	/*}}}*/
 
@@ -7548,5 +7548,5 @@
 
 	/*Recover vertices ids needed to initialize inputs*/
-	for(i=0;i<6;i++) penta_vertex_ids[i]=(int)iomodel->f(ElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
+	for(i=0;i<6;i++) penta_vertex_ids[i]=(int)iomodel->Data(ElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
 
 	/*Recover nodes ids needed to initialize the node hook.*/
@@ -7554,5 +7554,5 @@
 		//go recover node ids, needed to initialize the node hook.
 		//WARNING: We assume P1 elements here!!!!!
-		penta_node_ids[i]=iomodel->nodecounter+(int)iomodel->f(ElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
+		penta_node_ids[i]=iomodel->nodecounter+(int)iomodel->Data(ElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
 	}
 
@@ -7569,6 +7569,6 @@
 
 			/*default vx,vy and vz: either observation or 0 */
-			if(!iomodel->f(VxEnum)){
-				if (iomodel->f(VxObsEnum)) for(i=0;i<6;i++)nodeinputs[i]=iomodel->f(VxObsEnum)[penta_vertex_ids[i]-1]/yts;
+			if(!iomodel->Data(VxEnum)){
+				if (iomodel->Data(VxObsEnum)) for(i=0;i<6;i++)nodeinputs[i]=iomodel->Data(VxObsEnum)[penta_vertex_ids[i]-1]/yts;
 				else                 for(i=0;i<6;i++)nodeinputs[i]=0;
 				this->inputs->AddInput(new PentaVertexInput(VxEnum,nodeinputs));
@@ -7576,6 +7576,6 @@
 				if(qmu_analysis) this->inputs->AddInput(new PentaVertexInput(QmuVxEnum,nodeinputs));
 			}
-			if(!iomodel->f(VyEnum)){
-				if (iomodel->f(VyObsEnum)) for(i=0;i<6;i++)nodeinputs[i]=iomodel->f(VyObsEnum)[penta_vertex_ids[i]-1]/yts;
+			if(!iomodel->Data(VyEnum)){
+				if (iomodel->Data(VyObsEnum)) for(i=0;i<6;i++)nodeinputs[i]=iomodel->Data(VyObsEnum)[penta_vertex_ids[i]-1]/yts;
 				else                 for(i=0;i<6;i++)nodeinputs[i]=0;
 				this->inputs->AddInput(new PentaVertexInput(VyEnum,nodeinputs));
@@ -7583,6 +7583,6 @@
 				if(qmu_analysis) this->inputs->AddInput(new PentaVertexInput(QmuVyEnum,nodeinputs));
 			}
-			if(!iomodel->f(VzEnum)){
-				if (iomodel->f(VzObsEnum)) for(i=0;i<6;i++)nodeinputs[i]=iomodel->f(VzObsEnum)[penta_vertex_ids[i]-1]/yts;
+			if(!iomodel->Data(VzEnum)){
+				if (iomodel->Data(VzObsEnum)) for(i=0;i<6;i++)nodeinputs[i]=iomodel->Data(VzObsEnum)[penta_vertex_ids[i]-1]/yts;
 				else                 for(i=0;i<6;i++)nodeinputs[i]=0;
 				this->inputs->AddInput(new PentaVertexInput(VzEnum,nodeinputs));
@@ -7590,5 +7590,5 @@
 				if(qmu_analysis) this->inputs->AddInput(new PentaVertexInput(QmuVzEnum,nodeinputs));
 			}
-			if(!iomodel->f(PressureEnum)){
+			if(!iomodel->Data(PressureEnum)){
 				for(i=0;i<6;i++)nodeinputs[i]=0;
 				if(qmu_analysis){
@@ -7601,10 +7601,10 @@
 				}
 			}
-			if(*(iomodel->f(ElementsTypeEnum)+index)==PattynStokesApproximationEnum){
+			if(*(iomodel->Data(ElementsTypeEnum)+index)==PattynStokesApproximationEnum){
 				/*Create VzPattyn and VzStokes Enums*/
-				if(iomodel->f(VzEnum) && iomodel->f(NodeOnStokesEnum)){
-					for(i=0;i<6;i++) nodeinputs[i]=iomodel->f(VzEnum)[penta_vertex_ids[i]-1]/yts*iomodel->f(NodeOnStokesEnum)[penta_vertex_ids[i]-1];
+				if(iomodel->Data(VzEnum) && iomodel->Data(NodeOnStokesEnum)){
+					for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]/yts*iomodel->Data(NodeOnStokesEnum)[penta_vertex_ids[i]-1];
 					this->inputs->AddInput(new PentaVertexInput(VzStokesEnum,nodeinputs));
-					for(i=0;i<6;i++) nodeinputs[i]=iomodel->f(VzEnum)[penta_vertex_ids[i]-1]/yts*(1-iomodel->f(NodeOnStokesEnum)[penta_vertex_ids[i]-1]);
+					for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]/yts*(1-iomodel->Data(NodeOnStokesEnum)[penta_vertex_ids[i]-1]);
 					this->inputs->AddInput(new PentaVertexInput(VzPattynEnum,nodeinputs));
 				}
@@ -7615,10 +7615,10 @@
 				}
 			}
-			if(*(iomodel->f(ElementsTypeEnum)+index)==MacAyealStokesApproximationEnum){
+			if(*(iomodel->Data(ElementsTypeEnum)+index)==MacAyealStokesApproximationEnum){
 				/*Create VzMacAyeal and VzStokes Enums*/
-				if(iomodel->f(VzEnum) && iomodel->f(NodeOnStokesEnum)){
-					for(i=0;i<6;i++) nodeinputs[i]=iomodel->f(VzEnum)[penta_vertex_ids[i]-1]/yts*iomodel->f(NodeOnStokesEnum)[penta_vertex_ids[i]-1];
+				if(iomodel->Data(VzEnum) && iomodel->Data(NodeOnStokesEnum)){
+					for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]/yts*iomodel->Data(NodeOnStokesEnum)[penta_vertex_ids[i]-1];
 					this->inputs->AddInput(new PentaVertexInput(VzStokesEnum,nodeinputs));
-					for(i=0;i<6;i++) nodeinputs[i]=iomodel->f(VzEnum)[penta_vertex_ids[i]-1]/yts*(1-iomodel->f(NodeOnStokesEnum)[penta_vertex_ids[i]-1]);
+					for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]/yts*(1-iomodel->Data(NodeOnStokesEnum)[penta_vertex_ids[i]-1]);
 					this->inputs->AddInput(new PentaVertexInput(VzMacAyealEnum,nodeinputs));
 				}
@@ -7645,12 +7645,12 @@
 			this->inputs->AddInput(new PentaVertexInput(VyMeshEnum,nodeinputs));
 			this->inputs->AddInput(new PentaVertexInput(VzMeshEnum,nodeinputs));
-			if (iomodel->f(TemperatureEnum) && iomodel->f(WaterfractionEnum)) {
+			if (iomodel->Data(TemperatureEnum) && iomodel->Data(WaterfractionEnum)) {
 				for(i=0;i<6;i++){
-					if(iomodel->f(TemperatureEnum)[penta_vertex_ids[i]-1] < meltingpoint-beta*iomodel->f(PressureEnum)[penta_vertex_ids[i]-1]){
-						nodeinputs[i]=heatcapacity*(iomodel->f(TemperatureEnum)[penta_vertex_ids[i]-1]-referencetemperature);
+					if(iomodel->Data(TemperatureEnum)[penta_vertex_ids[i]-1] < meltingpoint-beta*iomodel->Data(PressureEnum)[penta_vertex_ids[i]-1]){
+						nodeinputs[i]=heatcapacity*(iomodel->Data(TemperatureEnum)[penta_vertex_ids[i]-1]-referencetemperature);
 					}
 					else nodeinputs[i]=heatcapacity*
-					 (meltingpoint-beta*iomodel->f(PressureEnum)[penta_vertex_ids[i]-1]-referencetemperature)
-						+latentheat*iomodel->f(WaterfractionEnum)[penta_vertex_ids[i]-1];
+					 (meltingpoint-beta*iomodel->Data(PressureEnum)[penta_vertex_ids[i]-1]-referencetemperature)
+						+latentheat*iomodel->Data(WaterfractionEnum)[penta_vertex_ids[i]-1];
 				}
 				this->inputs->AddInput(new PentaVertexInput(EnthalpyEnum,nodeinputs));
Index: /issm/trunk/src/c/objects/Elements/PentaHook.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/PentaHook.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Elements/PentaHook.cpp	(revision 9405)
@@ -51,5 +51,5 @@
 	
 	/*retrieve parameters: */
-	iomodel->constants->FindParam(&matpar_id,NumberOfElementsEnum); matpar_id++;
+	iomodel->Constant(&matpar_id,NumberOfElementsEnum); matpar_id++;
 
 	this->numanalyses=in_numanalyses;
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 9405)
@@ -52,5 +52,5 @@
 
 		/*Build horizontalneighborsids list: */
-		_assert_(iomodel->f(ElementconnectivityEnum));
+		_assert_(iomodel->Data(ElementconnectivityEnum));
 		//for (i=0;i<3;i++) this->horizontalneighborsids[i]=(int)iomodel->elementconnectivity[3*index+i]-1;
 
@@ -3279,47 +3279,47 @@
    
 	/*Get parameters: */
-	iomodel->constants->FindParam(&control_analysis,ControlAnalysisEnum);
-	iomodel->constants->FindParam(&num_control_type,NumControlTypeEnum);
-	iomodel->constants->FindParam(&yts,YtsEnum); 
-	iomodel->constants->FindParam(&num_cm_responses,NumCmResponsesEnum);
+	iomodel->Constant(&control_analysis,ControlAnalysisEnum);
+	iomodel->Constant(&num_control_type,NumControlTypeEnum);
+	iomodel->Constant(&yts,YtsEnum); 
+	iomodel->Constant(&num_cm_responses,NumCmResponsesEnum);
 
 	/*Recover vertices ids needed to initialize inputs*/
 	for(i=0;i<3;i++){ 
-		tria_vertex_ids[i]=(int)iomodel->f(ElementsEnum)[3*index+i]; //ids for vertices are in the elements array from Matlab
+		tria_vertex_ids[i]=(int)iomodel->Data(ElementsEnum)[3*index+i]; //ids for vertices are in the elements array from Matlab
 	}
 
 	/*Control Inputs*/
-	if (control_analysis && iomodel->f(ControlTypeEnum)){
+	if (control_analysis && iomodel->Data(ControlTypeEnum)){
 		for(i=0;i<num_control_type;i++){
-			switch((int)iomodel->f(ControlTypeEnum)[i]){
+			switch((int)iomodel->Data(ControlTypeEnum)[i]){
 				case DhdtEnum:
-					if (iomodel->f(DhdtEnum)){
-						for(j=0;j<3;j++)nodeinputs[j]=iomodel->f(DhdtEnum)[tria_vertex_ids[j]-1]/yts;
-						for(j=0;j<3;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
-						for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
+					if (iomodel->Data(DhdtEnum)){
+						for(j=0;j<3;j++)nodeinputs[j]=iomodel->Data(DhdtEnum)[tria_vertex_ids[j]-1]/yts;
+						for(j=0;j<3;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
+						for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
 						this->inputs->AddInput(new ControlInput(DhdtEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 					}
 					break;
 				case VxEnum:
-					if (iomodel->f(VxEnum)){
-						for(j=0;j<3;j++)nodeinputs[j]=iomodel->f(VxEnum)[tria_vertex_ids[j]-1]/yts;
-						for(j=0;j<3;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
-						for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
+					if (iomodel->Data(VxEnum)){
+						for(j=0;j<3;j++)nodeinputs[j]=iomodel->Data(VxEnum)[tria_vertex_ids[j]-1]/yts;
+						for(j=0;j<3;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
+						for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
 						this->inputs->AddInput(new ControlInput(VxEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 					}
 					break;
 				case VyEnum:
-					if (iomodel->f(VyEnum)){
-						for(j=0;j<3;j++)nodeinputs[j]=iomodel->f(VyEnum)[tria_vertex_ids[j]-1]/yts;
-						for(j=0;j<3;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
-						for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
+					if (iomodel->Data(VyEnum)){
+						for(j=0;j<3;j++)nodeinputs[j]=iomodel->Data(VyEnum)[tria_vertex_ids[j]-1]/yts;
+						for(j=0;j<3;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
+						for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[(tria_vertex_ids[j]-1)*num_control_type+i]/yts;
 						this->inputs->AddInput(new ControlInput(VyEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 					}
 					break;
 				case DragCoefficientEnum:
-					if (iomodel->f(DragCoefficientEnum)){
-						for(j=0;j<3;j++)nodeinputs[j]=iomodel->f(DragCoefficientEnum)[tria_vertex_ids[j]-1];
-						for(j=0;j<3;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[(tria_vertex_ids[j]-1)*num_control_type+i];
-						for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[(tria_vertex_ids[j]-1)*num_control_type+i];
+					if (iomodel->Data(DragCoefficientEnum)){
+						for(j=0;j<3;j++)nodeinputs[j]=iomodel->Data(DragCoefficientEnum)[tria_vertex_ids[j]-1];
+						for(j=0;j<3;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[(tria_vertex_ids[j]-1)*num_control_type+i];
+						for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[(tria_vertex_ids[j]-1)*num_control_type+i];
 						this->inputs->AddInput(new ControlInput(DragCoefficientEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 					}
@@ -3328,5 +3328,5 @@
 					/*Matice will take care of it*/ break;
 				default:
-					_error_("Control %s not implemented yet",EnumToStringx((int)iomodel->f(ControlTypeEnum)[i]));
+					_error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(ControlTypeEnum)[i]));
 			}
 		}
@@ -3334,10 +3334,10 @@
 
 	/*DatasetInputs*/
-	if (control_analysis && iomodel->f(WeightsEnum)){
+	if (control_analysis && iomodel->Data(WeightsEnum)){
 
 		/*Create inputs and add to DataSetInput*/
 		DatasetInput* datasetinput=new DatasetInput(WeightsEnum);
 		for(i=0;i<num_cm_responses;i++){
-			for(j=0;j<3;j++)nodeinputs[j]=iomodel->f(WeightsEnum)[(tria_vertex_ids[j]-1)*num_cm_responses+i];
+			for(j=0;j<3;j++)nodeinputs[j]=iomodel->Data(WeightsEnum)[(tria_vertex_ids[j]-1)*num_cm_responses+i];
 			datasetinput->inputs->AddObject(new TriaVertexInput(WeightsEnum,nodeinputs));
 		}
@@ -3906,7 +3906,7 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&yts,YtsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&yts,YtsEnum);
 
 	/*Branch on type of vector: nodal or elementary: */
@@ -3915,5 +3915,5 @@
 		/*Recover vertices ids needed to initialize inputs*/
 		for(i=0;i<3;i++){ 
-			tria_vertex_ids[i]=(int)iomodel->f(ElementsEnum)[3*index+i]; //ids for vertices are in the elements array from Matlab
+			tria_vertex_ids[i]=(int)iomodel->Data(ElementsEnum)[3*index+i]; //ids for vertices are in the elements array from Matlab
 		}
 
@@ -5223,11 +5223,11 @@
 	/*Checks if debuging*/
 	/*{{{2*/
-	_assert_(iomodel->f(ElementsEnum));
+	_assert_(iomodel->Data(ElementsEnum));
 	/*}}}*/
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&yts,YtsEnum);
-	iomodel->constants->FindParam(&prognostic_DG,PrognosticDGEnum);
-	iomodel->constants->FindParam(&qmu_analysis,QmuAnalysisEnum);
+	iomodel->Constant(&yts,YtsEnum);
+	iomodel->Constant(&prognostic_DG,PrognosticDGEnum);
+	iomodel->Constant(&qmu_analysis,QmuAnalysisEnum);
 
 	/*Recover element type*/
@@ -5244,5 +5244,5 @@
 	/*Recover vertices ids needed to initialize inputs*/
 	for(i=0;i<3;i++){ 
-		tria_vertex_ids[i]=(int)iomodel->f(ElementsEnum)[3*index+i]; //ids for vertices are in the elements array from Matlab
+		tria_vertex_ids[i]=(int)iomodel->Data(ElementsEnum)[3*index+i]; //ids for vertices are in the elements array from Matlab
 	}
 
@@ -5257,5 +5257,5 @@
 		/*Continuous Galerkin*/
 		for(i=0;i<3;i++){ 
-			tria_node_ids[i]=iomodel->nodecounter+(int)*(iomodel->f(ElementsEnum)+3*index+i); //ids for vertices are in the elements array from Matlab
+			tria_node_ids[i]=iomodel->nodecounter+(int)*(iomodel->Data(ElementsEnum)+3*index+i); //ids for vertices are in the elements array from Matlab
 		}
 	}
@@ -5273,6 +5273,6 @@
 
 			/*default vx,vy and vz: either observation or 0 */
-			if(!iomodel->f(VxEnum)){
-				if (iomodel->f(VxObsEnum)) for(i=0;i<3;i++)nodeinputs[i]=iomodel->f(VxObsEnum)[tria_vertex_ids[i]-1]/yts;
+			if(!iomodel->Data(VxEnum)){
+				if (iomodel->Data(VxObsEnum)) for(i=0;i<3;i++)nodeinputs[i]=iomodel->Data(VxObsEnum)[tria_vertex_ids[i]-1]/yts;
 				else                 for(i=0;i<3;i++)nodeinputs[i]=0;
 				this->inputs->AddInput(new TriaVertexInput(VxEnum,nodeinputs));
@@ -5280,6 +5280,6 @@
 				if(qmu_analysis) this->inputs->AddInput(new TriaVertexInput(QmuVxEnum,nodeinputs));
 			}
-			if(!iomodel->f(VyEnum)){
-				if (iomodel->f(VyObsEnum)) for(i=0;i<3;i++)nodeinputs[i]=iomodel->f(VyObsEnum)[tria_vertex_ids[i]-1]/yts;
+			if(!iomodel->Data(VyEnum)){
+				if (iomodel->Data(VyObsEnum)) for(i=0;i<3;i++)nodeinputs[i]=iomodel->Data(VyObsEnum)[tria_vertex_ids[i]-1]/yts;
 				else                 for(i=0;i<3;i++)nodeinputs[i]=0;
 				this->inputs->AddInput(new TriaVertexInput(VyEnum,nodeinputs));
@@ -5287,6 +5287,6 @@
 				if(qmu_analysis) this->inputs->AddInput(new TriaVertexInput(QmuVyEnum,nodeinputs));
 			}
-			if(!iomodel->f(VzEnum)){
-				if (iomodel->f(VzObsEnum)) for(i=0;i<3;i++)nodeinputs[i]=iomodel->f(VzObsEnum)[tria_vertex_ids[i]-1]/yts;
+			if(!iomodel->Data(VzEnum)){
+				if (iomodel->Data(VzObsEnum)) for(i=0;i<3;i++)nodeinputs[i]=iomodel->Data(VzObsEnum)[tria_vertex_ids[i]-1]/yts;
 				else                 for(i=0;i<3;i++)nodeinputs[i]=0;
 				this->inputs->AddInput(new TriaVertexInput(VzEnum,nodeinputs));
@@ -5294,5 +5294,5 @@
 				if(qmu_analysis) this->inputs->AddInput(new TriaVertexInput(QmuVzEnum,nodeinputs));
 			}
-			if(!iomodel->f(PressureEnum)){
+			if(!iomodel->Data(PressureEnum)){
 				for(i=0;i<3;i++)nodeinputs[i]=0;
 				if(qmu_analysis){
Index: /issm/trunk/src/c/objects/Elements/TriaHook.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/TriaHook.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Elements/TriaHook.cpp	(revision 9405)
@@ -49,5 +49,5 @@
 
 	/*retrieve parameters: */
-	iomodel->constants->FindParam(&matpar_id,NumberOfElementsEnum); matpar_id++;
+	iomodel->Constant(&matpar_id,NumberOfElementsEnum); matpar_id++;
 	
 	this->numanalyses=in_numanalyses;
Index: /issm/trunk/src/c/objects/IoModel.cpp
===================================================================
--- /issm/trunk/src/c/objects/IoModel.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/IoModel.cpp	(revision 9405)
@@ -46,5 +46,5 @@
 	/*Initialize and read constants:*/
 	this->constants=new Parameters();
-	this->FetchParameters(this->constants); /*this routine goes through the input file, and fetches bools, ints, doubles and strings only, nothing memory intensive*/
+	this->FetchConstants(); /*this routine goes through the input file, and fetches bools, ints, doubles and strings only, nothing memory intensive*/
 
 	/*Initialize data: */
@@ -62,5 +62,4 @@
 	this->loadcounter=0;
 	this->constraintcounter=0;
-
 }
 /*}}}*/
@@ -71,5 +70,5 @@
 
 	/*Some checks in debugging mode*/
-#ifdef _ISSM_DEBUG_
+	#ifdef _ISSM_DEBUG_
 	for(int i=0;i<MaximumNumberOfEnums;i++){
 		if(this->data[i]){
@@ -77,5 +76,5 @@
 		}
 	}
-#endif
+	#endif
 
 	xfree((void**)&this->data);
@@ -88,432 +87,49 @@
 }
 /*}}}*/
-/*FUNCTION IoModel::FetchData(bool*     pbool,int data_enum){{{1*/
-void  IoModel::FetchData(bool* pboolean,int data_enum){
-
-	extern int my_rank;
-	extern int num_procs;
-	
-
-	/*output: */
-	int   booleanint;
-	int   code;
-	
-	/*Set file pointer to beginning of the data: */
-	fid=this->SetFilePointerToData(&code,NULL,data_enum);
-
-	if(code!=1)_error_("expecting a boolean for enum %s",EnumToStringx(data_enum));
-	
-	/*We have to read a boolean from disk. */
-	if(my_rank==0){  
-		if(fread(&booleanint,sizeof(int),1,fid)!=1) _error_(" could not read boolean ");
-	}
-	MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*cast to bool: */
-	/*Assign output pointers: */
-	*pboolean=(bool)booleanint;
-
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchData(int*      pinteger,int data_enum){{{1*/
-void  IoModel::FetchData(int* pinteger,int data_enum){
-
-	extern int my_rank;
-	extern int num_procs;
-	
-
-	/*output: */
-	int   integer;
-	int   code;
-	
-	/*Set file pointer to beginning of the data: */
-	fid=this->SetFilePointerToData(&code,NULL,data_enum);
-	
-	if(code!=2)_error_("expecting an integer for enum %s",EnumToStringx(data_enum));
-	
-	/*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
-	if(my_rank==0){  
-		if(fread(&integer,sizeof(int),1,fid)!=1) _error_(" could not read integer ");
-	}
-
-	MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*Assign output pointers: */
-	*pinteger=integer;
-
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchData(double*   pscalar,int data_enum){{{1*/
-void  IoModel::FetchData(double* pscalar,int data_enum){
-
-
-	extern int my_rank;
-	extern int num_procs;
-	
-
-	/*output: */
-	double   scalar;
-	int      code;
-	
-	/*Set file pointer to beginning of the data: */
-	fid=this->SetFilePointerToData(&code,NULL,data_enum);
-	
-	if(code!=3)_error_("expecting a double for enum %s",EnumToStringx(data_enum));
-	
-	/*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
-	if(my_rank==0){
-		if(fread(&scalar,sizeof(double),1,fid)!=1)_error_(" could not read scalar ");
-	}
-	MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
-
-	/*Assign output pointers: */
-	*pscalar=scalar;
-		 
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchData(char**    pstring,int data_enum){{{1*/
-void  IoModel::FetchData(char** pstring,int data_enum){
-
-	extern int my_rank;
-	extern int num_procs;
-	
-
-	/*output: */
-	char* string=NULL;
-	int   string_size;
-	int code=0;
-	
-	/*Set file pointer to beginning of the data: */
-	fid=this->SetFilePointerToData(&code,NULL,data_enum);
-	
-	if(code!=4)_error_("expecting a string for enum %s",EnumToStringx(data_enum));
-	
-	/*Now fetch: */
-	
-	/*We have to read a string from disk. First read the dimensions of the string, then the string: */
-	if(my_rank==0){  
-		if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
-	}
-
-	MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*Now allocate string: */
-	if(string_size){
-		string=(char*)xmalloc((string_size+1)*sizeof(char));
-		string[string_size]='\0';
-
-		/*Read string on node 0, then broadcast: */
-		if(my_rank==0){  
-			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
-		}
-		MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
-	}
-	else{
-		string=(char*)xmalloc(sizeof(char));
-		string[0]='\0';
-	}
-
-
-	/*Assign output pointers: */
-	*pstring=string;
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchData(int**  pintegerematrix,int* pM,int* pN,int data_enum){{{1*/
-void  IoModel::FetchData(int** pmatrix,int* pM,int* pN,int data_enum){
-
-	extern int my_rank;
-	extern int num_procs;
-	int i,j;
-
-	/*output: */
-	int M,N;
-	double* matrix=NULL;
-	int*    integer_matrix=NULL;
-	int code=0;
-	int vector_type=0;
-	
-	
-	/*Set file pointer to beginning of the data: */
-	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
-
-	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a double, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
-	
-	/*Now fetch: */
-
-	/*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
-	/*numberofelements: */
-	if(my_rank==0){  
-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
-	}
-
-	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	if(my_rank==0){  
-		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
-	}
-	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*Now allocate matrix: */
-	if(M*N){
-		matrix=(double*)xmalloc(M*N*sizeof(double));
-
-		/*Read matrix on node 0, then broadcast: */
-		if(my_rank==0){  
-			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
-		}
-		
-		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
-	}
-
-	/*Now cast to integer: */
-	if(M*N){
-		integer_matrix=(int*)xmalloc(M*N*sizeof(int));
-		for (i=0;i<M;i++){
-			for (j=0;j<N;j++){
-				integer_matrix[i*N+j]=(int)matrix[i*N+j];
-			}
-		}
-	}
-	else{
-		integer_matrix=NULL;
-	}
-	/*Free ressources:*/
-	xfree((void**)&matrix);
-
-	/*Assign output pointers: */
-	*pmatrix=integer_matrix;
-	if (pM)*pM=M;
-	if (pN)*pN=N;
-
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchData(double**  pdoublematrix,int* pM,int* pN,int data_enum){{{1*/
-void  IoModel::FetchData(double** pmatrix,int* pM,int* pN,int data_enum){
-
-	extern int my_rank;
-	extern int num_procs;
-
-	/*output: */
-	int M,N;
-	double* matrix=NULL;
-	int code=0;
-	int vector_type=0;
-	
-	/*Set file pointer to beginning of the data: */
-	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
-	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a double, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
-	
-	/*Now fetch: */
-
-	/*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
-	/*numberofelements: */
-	if(my_rank==0){  
-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
-	}
-	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	if(my_rank==0){  
-		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
-	}
-	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*Now allocate matrix: */
-	if(M*N){
-		matrix=(double*)xmalloc(M*N*sizeof(double));
-
-		/*Read matrix on node 0, then broadcast: */
-		if(my_rank==0){  
-			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
-		}
-		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
-	}
-
-	/*Assign output pointers: */
-	*pmatrix=matrix;
-	if (pM)*pM=M;
-	if (pN)*pN=N;
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchData(char***   pstrings,int* pnumstrings,int data_enum){{{1*/
-void  IoModel::FetchData(char*** pstrings,int* pnumstrings,int data_enum){
-
-	extern int my_rank;
-	extern int num_procs;
-	
-	int i;
-
-	/*output: */
-	int   numstrings=0;
-	char** strings=NULL;
-	
-	/*intermediary: */
-	char* string=NULL;
-	int   string_size;
-	int   code;
-	
-	/*Set file pointer to beginning of the data: */
-	fid=this->SetFilePointerToData(&code,NULL,data_enum);
-	
-	if(code!=9)_error_("expecting a string array for enum %s",EnumToStringx(data_enum));
-	
-	/*We have to read a bunch of strings from disk. First read the number of strings, and allocate: */
-	if(my_rank==0){  
-		if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_(" could not read length of string array");
-	}
-	MPI_Bcast(&numstrings,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*Now allocate string array: */
-	if(numstrings){
-		strings=(char**)xmalloc(numstrings*sizeof(char*));
-		for(i=0;i<numstrings;i++)strings[i]=NULL;
-
-		/*Go through strings, and read: */
-		for(i=0;i<numstrings;i++){
-			
-			if(my_rank==0){  
-				if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
-			}
-			MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
-			if(string_size){
-				string=(char*)xmalloc((string_size+1)*sizeof(char));
-				string[string_size]='\0';
-
-				/*Read string on node 0, then broadcast: */
-				if(my_rank==0){  
-					if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
-				}
-				MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
-			}
-			else{
-				string=(char*)xmalloc(sizeof(char));
-				string[0]='\0';
-			}
-
-			strings[i]=string;
-		}
-	}
-
-	/*Assign output pointers: */
-	*pstrings=strings;
-	*pnumstrings=numstrings;
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{1*/
-void  IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
-
-	int i;
-
-	extern int my_rank;
-	extern int num_procs;
-
-	/*output: */
-	double** matrices=NULL;
-	int*     mdims=NULL;
-	int*     ndims=NULL;
-	int      numrecords=0;
-
-	/*intermediary: */
-	int     M, N;
-	double *matrix = NULL;
-	int     code;
-	
-	/*Set file pointer to beginning of the data: */
-	fid=this->SetFilePointerToData(&code,NULL,data_enum);
-	if(code!=8)_error_("expecting a double mat array for enum %s",EnumToStringx(data_enum));
-	
-	/*Now fetch: */
-	if(my_rank==0){  
-		if(fread(&numrecords,sizeof(int),1,fid)!=1) _error_("could not read number of records in matrix array ");
-	}
-	MPI_Bcast(&numrecords,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	if(numrecords){
-
-		/*Allocate matrices :*/
-		matrices=(double**)xmalloc(numrecords*sizeof(double*));
-		mdims=(int*)xmalloc(numrecords*sizeof(int));
-		ndims=(int*)xmalloc(numrecords*sizeof(int));
-
-		for(i=0;i<numrecords;i++){
-			matrices[i]=NULL;
-			mdims[i]=0;
-			ndims[i]=0;
-		}
-
-		/*Loop through records and fetch matrix: */
-		for(i=0;i<numrecords;i++){
-
-			if(my_rank==0){  
-				if(fread(&M,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of rows in ",i,"th matrix of matrix array");
-			}
-			MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-			if(my_rank==0){  
-				if(fread(&N,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of columns in ",i,"th matrix of matrix array");
-			}
-			MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-			/*Now allocate matrix: */
-			if(M*N){
-				matrix=(double*)xmalloc(M*N*sizeof(double));
-
-				/*Read matrix on node 0, then broadcast: */
-				if(my_rank==0){  
-					if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
-				}
-
-				MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
-			}
-
-			/*Assign: */
-			matrices[i]=matrix;
-			mdims[i]=M;
-			ndims[i]=N;
-		}
-	}
-
-	/*Assign output pointers: */
-	*pmatrices=matrices;
-	*pmdims=mdims;
-	*pndims=ndims;
-	*pnumrecords=numrecords;
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchData(int num,...){{{1*/
-void  IoModel::FetchData(int num,...){
-
-	va_list ap;
-	int     dataenum;
-	double* matrix=NULL;
-	int     M,N;
-	int     i;
-
-	/*Go through the entire list of enums and fetch the corresponding data. Add it to the iomodel->data dataset. Everything
-	 *we fetch is a double* : */
-	
-	va_start(ap,num);
-	for(i=0; i<num; i++){
-		
-		dataenum=va_arg(ap, int);
-
-		/*Some checks in debugging mode*/
-		/*{{{*/
-		#ifdef _ISSM_DEBUG_
-		_assert_(dataenum<MaximumNumberOfEnums);
-		if(this->data[dataenum]){
-			_error_("Info: trying to fetch %s but previous pointer has not been freed (DeleteData has not been called)",EnumToStringx(dataenum));
-		}
-		#endif
-		/*}}}*/
-
-		/*Add to this->data: */
-		this->FetchData(&matrix,&M,&N,dataenum);
-		this->data[dataenum]=matrix;
-	}
-	va_end(ap);
-
-}
-/*}}}*/
-/*FUNCTION IoModel::DeleteData(int num,...){{{1*/
+
+/*FUNCTION IoModel::Constant(bool* poutput,int constant_enum){{{1*/
+void IoModel::Constant(bool* poutput,int constant_enum){
+
+	_assert_(constant_enum>=0);
+	_assert_(this->constants);
+
+	this->constants->FindParam(poutput,constant_enum);
+}
+/*}}}*/
+/*FUNCTION IoModel::Constant(int* poutput,int constant_enum){{{1*/
+void IoModel::Constant(int* poutput,int constant_enum){
+
+	_assert_(constant_enum>=0);
+	_assert_(this->constants);
+
+	this->constants->FindParam(poutput,constant_enum);
+}
+/*}}}*/
+/*FUNCTION IoModel::Constant(double* poutput,int constant_enum){{{1*/
+void IoModel::Constant(double* poutput,int constant_enum){
+
+	_assert_(constant_enum>=0);
+	_assert_(this->constants);
+
+	this->constants->FindParam(poutput,constant_enum);
+}
+/*}}}*/
+/*FUNCTION IoModel::CopyConstants{{{1*/
+Parameters* IoModel::CopyConstants(void){
+
+	_assert_(this->constants);
+	return (Parameters*)this->constants->Copy();
+}
+/*}}}*/
+/*FUNCTION IoModel::Data{{{1*/
+double* IoModel::Data(int data_enum){
+
+	_assert_(data_enum<MaximumNumberOfEnums);
+	_assert_(data_enum>=0);
+
+	return this->data[data_enum];
+}
+/*}}}*/
+/*FUNCTION IoModel::DeleteData{{{1*/
 void  IoModel::DeleteData(int num,...){
 
@@ -524,5 +140,5 @@
 
 	/*Go through the entire list of enums and delete the corresponding data from the iomodel-data dataset: */
-	
+
 	va_start(ap,num);
 	for(i = 0; i <num; i++){
@@ -533,13 +149,6 @@
 	va_end(ap);
 } /*}}}*/
-/*FUNCTION IoModel::f(int dataenum){{{1*/
-double* IoModel::f(int dataenum){
-
-	_assert_(dataenum<MaximumNumberOfEnums);
-	return this->data[dataenum];
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchParameters(Parameters* parameters){{{1*/
-void  IoModel::FetchParameters(Parameters* parameters){
+/*FUNCTION IoModel::FetchConstants{{{1*/
+void  IoModel::FetchConstants(void){
 
 	extern int my_rank;
@@ -558,5 +167,8 @@
 	int   string_size;
 
- 
+	/*Check that some fields have been allocated*/
+	_assert_(this->fid);
+	_assert_(this->constants);
+
 	/*Go find in the binary file, the position of the data we want to fetch: */
 	if(my_rank==0){ //cpu 0{{{2
@@ -595,5 +207,5 @@
 
 						/*create BoolParam: */
-						parameters->AddObject(new BoolParam(record_enum,(bool)booleanint)); //cast to boolean
+						this->constants->AddObject(new BoolParam(record_enum,(bool)booleanint)); //cast to boolean
 
 						break;
@@ -604,5 +216,5 @@
 
 						/*create IntParam: */
-						parameters->AddObject(new IntParam(record_enum,integer));
+						this->constants->AddObject(new IntParam(record_enum,integer));
 
 						break;
@@ -613,5 +225,5 @@
 
 						/*create DoubleParam: */
-						parameters->AddObject(new DoubleParam(record_enum,scalar));
+						this->constants->AddObject(new DoubleParam(record_enum,scalar));
 
 						break;
@@ -635,5 +247,5 @@
 						
 						/*Add string to parameters: */
-						parameters->AddObject(new StringParam(record_enum,string));
+						this->constants->AddObject(new StringParam(record_enum,string));
 
 						/*Free string*/
@@ -696,5 +308,5 @@
 						
 					/*create BoolParam: */
-					parameters->AddObject(new BoolParam(record_enum,(bool)booleanint)); //cast to a boolean
+					this->constants->AddObject(new BoolParam(record_enum,(bool)booleanint)); //cast to a boolean
 					break;
 
@@ -704,5 +316,5 @@
 						
 					/*create IntParam: */
-					parameters->AddObject(new IntParam(record_enum,integer));
+					this->constants->AddObject(new IntParam(record_enum,integer));
 
 					break;
@@ -712,5 +324,5 @@
 						
 					/*create DoubleParam: */
-					parameters->AddObject(new DoubleParam(record_enum,scalar));
+					this->constants->AddObject(new DoubleParam(record_enum,scalar));
 
 					break;
@@ -729,5 +341,5 @@
 					}
 					/*Add string to parameters: */
-					parameters->AddObject(new StringParam(record_enum,string));
+					this->constants->AddObject(new StringParam(record_enum,string));
 
 					break;
@@ -749,66 +361,432 @@
 }
 /*}}}*/
-/*FUNCTION IoModel::SetFilePointerToData(int* pcode,int* pvector_type, int data_enum){{{1*/
-FILE* IoModel::SetFilePointerToData(int* pcode,int* pvector_type, int data_enum){
+/*FUNCTION IoModel::FetchData(bool*     pbool,int data_enum){{{1*/
+void  IoModel::FetchData(bool* pboolean,int data_enum){
 
 	extern int my_rank;
 	extern int num_procs;
 	
-	int found=0;
-	int record_enum;
-	int record_length;
-	int record_code; //1 to 7 number
-	int vector_type; //nodal or elementary
- 
-	/*Go find in the binary file, the position of the data we want to fetch: */
+
+	/*output: */
+	int   booleanint;
+	int   code;
+	
+	/*Set file pointer to beginning of the data: */
+	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+
+	if(code!=1)_error_("expecting a boolean for enum %s",EnumToStringx(data_enum));
+	
+	/*We have to read a boolean from disk. */
+	if(my_rank==0){  
+		if(fread(&booleanint,sizeof(int),1,fid)!=1) _error_(" could not read boolean ");
+	}
+	MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*cast to bool: */
+	/*Assign output pointers: */
+	*pboolean=(bool)booleanint;
+
+}
+/*}}}*/
+/*FUNCTION IoModel::FetchData(int*      pinteger,int data_enum){{{1*/
+void  IoModel::FetchData(int* pinteger,int data_enum){
+
+	extern int my_rank;
+	extern int num_procs;
+	
+
+	/*output: */
+	int   integer;
+	int   code;
+	
+	/*Set file pointer to beginning of the data: */
+	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+	
+	if(code!=2)_error_("expecting an integer for enum %s",EnumToStringx(data_enum));
+	
+	/*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
+	if(my_rank==0){  
+		if(fread(&integer,sizeof(int),1,fid)!=1) _error_(" could not read integer ");
+	}
+
+	MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*Assign output pointers: */
+	*pinteger=integer;
+
+}
+/*}}}*/
+/*FUNCTION IoModel::FetchData(double*   pscalar,int data_enum){{{1*/
+void  IoModel::FetchData(double* pscalar,int data_enum){
+
+
+	extern int my_rank;
+	extern int num_procs;
+	
+
+	/*output: */
+	double   scalar;
+	int      code;
+	
+	/*Set file pointer to beginning of the data: */
+	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+	
+	if(code!=3)_error_("expecting a double for enum %s",EnumToStringx(data_enum));
+	
+	/*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
 	if(my_rank==0){
-	
-		/*First set FILE* position to the beginning of the file: */
-		fseek(fid,0,SEEK_SET);
-
-		/*Now march through file looking for the correct data identifier: */
-		for(;;){
-			/*Read enum for this size of first string name: */
-			if(fread(&record_enum,sizeof(int),1,fid)==0){
-				/*Ok, we have reached the end of the file. break: */
-				found=0;
-				break;
-			}
+		if(fread(&scalar,sizeof(double),1,fid)!=1)_error_(" could not read scalar ");
+	}
+	MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+
+	/*Assign output pointers: */
+	*pscalar=scalar;
+		 
+}
+/*}}}*/
+/*FUNCTION IoModel::FetchData(char**    pstring,int data_enum){{{1*/
+void  IoModel::FetchData(char** pstring,int data_enum){
+
+	extern int my_rank;
+	extern int num_procs;
+	
+
+	/*output: */
+	char* string=NULL;
+	int   string_size;
+	int code=0;
+	
+	/*Set file pointer to beginning of the data: */
+	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+	
+	if(code!=4)_error_("expecting a string for enum %s",EnumToStringx(data_enum));
+	
+	/*Now fetch: */
+	
+	/*We have to read a string from disk. First read the dimensions of the string, then the string: */
+	if(my_rank==0){  
+		if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
+	}
+
+	MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*Now allocate string: */
+	if(string_size){
+		string=(char*)xmalloc((string_size+1)*sizeof(char));
+		string[string_size]='\0';
+
+		/*Read string on node 0, then broadcast: */
+		if(my_rank==0){  
+			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
+		}
+		MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
+	}
+	else{
+		string=(char*)xmalloc(sizeof(char));
+		string[0]='\0';
+	}
+
+
+	/*Assign output pointers: */
+	*pstring=string;
+}
+/*}}}*/
+/*FUNCTION IoModel::FetchData(int**  pintegerematrix,int* pM,int* pN,int data_enum){{{1*/
+void  IoModel::FetchData(int** pmatrix,int* pM,int* pN,int data_enum){
+
+	extern int my_rank;
+	extern int num_procs;
+	int i,j;
+
+	/*output: */
+	int M,N;
+	double* matrix=NULL;
+	int*    integer_matrix=NULL;
+	int code=0;
+	int vector_type=0;
+	
+	
+	/*Set file pointer to beginning of the data: */
+	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
+
+	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a double, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
+	
+	/*Now fetch: */
+
+	/*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
+	/*numberofelements: */
+	if(my_rank==0){  
+		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+	}
+
+	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	if(my_rank==0){  
+		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
+	}
+	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*Now allocate matrix: */
+	if(M*N){
+		matrix=(double*)xmalloc(M*N*sizeof(double));
+
+		/*Read matrix on node 0, then broadcast: */
+		if(my_rank==0){  
+			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+		}
+		
+		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+	}
+
+	/*Now cast to integer: */
+	if(M*N){
+		integer_matrix=(int*)xmalloc(M*N*sizeof(int));
+		for (i=0;i<M;i++){
+			for (j=0;j<N;j++){
+				integer_matrix[i*N+j]=(int)matrix[i*N+j];
+			}
+		}
+	}
+	else{
+		integer_matrix=NULL;
+	}
+	/*Free ressources:*/
+	xfree((void**)&matrix);
+
+	/*Assign output pointers: */
+	*pmatrix=integer_matrix;
+	if (pM)*pM=M;
+	if (pN)*pN=N;
+
+}
+/*}}}*/
+/*FUNCTION IoModel::FetchData(double**  pdoublematrix,int* pM,int* pN,int data_enum){{{1*/
+void  IoModel::FetchData(double** pmatrix,int* pM,int* pN,int data_enum){
+
+	extern int my_rank;
+	extern int num_procs;
+
+	/*output: */
+	int M,N;
+	double* matrix=NULL;
+	int code=0;
+	int vector_type=0;
+	
+	/*Set file pointer to beginning of the data: */
+	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
+	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a double, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
+	
+	/*Now fetch: */
+
+	/*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
+	/*numberofelements: */
+	if(my_rank==0){  
+		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+	}
+	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	if(my_rank==0){  
+		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
+	}
+	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*Now allocate matrix: */
+	if(M*N){
+		matrix=(double*)xmalloc(M*N*sizeof(double));
+
+		/*Read matrix on node 0, then broadcast: */
+		if(my_rank==0){  
+			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+		}
+		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+	}
+
+	/*Assign output pointers: */
+	*pmatrix=matrix;
+	if (pM)*pM=M;
+	if (pN)*pN=N;
+}
+/*}}}*/
+/*FUNCTION IoModel::FetchData(char***   pstrings,int* pnumstrings,int data_enum){{{1*/
+void  IoModel::FetchData(char*** pstrings,int* pnumstrings,int data_enum){
+
+	extern int my_rank;
+	extern int num_procs;
+	
+	int i;
+
+	/*output: */
+	int   numstrings=0;
+	char** strings=NULL;
+	
+	/*intermediary: */
+	char* string=NULL;
+	int   string_size;
+	int   code;
+	
+	/*Set file pointer to beginning of the data: */
+	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+	
+	if(code!=9)_error_("expecting a string array for enum %s",EnumToStringx(data_enum));
+	
+	/*We have to read a bunch of strings from disk. First read the number of strings, and allocate: */
+	if(my_rank==0){  
+		if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_(" could not read length of string array");
+	}
+	MPI_Bcast(&numstrings,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*Now allocate string array: */
+	if(numstrings){
+		strings=(char**)xmalloc(numstrings*sizeof(char*));
+		for(i=0;i<numstrings;i++)strings[i]=NULL;
+
+		/*Go through strings, and read: */
+		for(i=0;i<numstrings;i++){
 			
-			/*Is this the record sought for? : */
-			if (data_enum==record_enum){
-				/*Ok, we have found the correct string. Pass the record length, and read data type code: */
-				fseek(fid,sizeof(int),SEEK_CUR);
-				fread(&record_code,sizeof(int),1,fid);
-
-				/*if record_code points to a vector, get its type (nodal or elementary): */
-				if(5<=record_code && record_code<=7)fread(&vector_type,sizeof(int),1,fid);
-				found=1;
-				break;
+			if(my_rank==0){  
+				if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
+			}
+			MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
+			if(string_size){
+				string=(char*)xmalloc((string_size+1)*sizeof(char));
+				string[string_size]='\0';
+
+				/*Read string on node 0, then broadcast: */
+				if(my_rank==0){  
+					if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
+				}
+				MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
 			}
 			else{
-				/*This is not the correct string, read the record length, and use it to skip this record: */
-				fread(&record_length,sizeof(int),1,fid);
-				/*skip: */
-				fseek(fid,record_length,SEEK_CUR);
-			}
-		}
-	}
-	MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 
-	if(!found)_error_("%s %s ","could not find data with name",EnumToStringx(data_enum));
-
-	/*Broadcast code and vector type: */
-	MPI_Bcast(&record_code,1,MPI_INT,0,MPI_COMM_WORLD); 
-	MPI_Bcast(&vector_type,1,MPI_INT,0,MPI_COMM_WORLD); 
-	if(record_code==5) MPI_Bcast(&vector_type,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*Assign output pointers:*/
-	*pcode=record_code;
-	if(pvector_type)*pvector_type=vector_type;
-
-	return fid;
-}
-/*}}}*/
-/*FUNCTION IoModel::FetchDataToInput(Elements* elements,IoModel* iomodel,int vector_enum,int default_vector_enum,double default_value{{{1*/
+				string=(char*)xmalloc(sizeof(char));
+				string[0]='\0';
+			}
+
+			strings[i]=string;
+		}
+	}
+
+	/*Assign output pointers: */
+	*pstrings=strings;
+	*pnumstrings=numstrings;
+}
+/*}}}*/
+/*FUNCTION IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{1*/
+void  IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
+
+	int i;
+
+	extern int my_rank;
+	extern int num_procs;
+
+	/*output: */
+	double** matrices=NULL;
+	int*     mdims=NULL;
+	int*     ndims=NULL;
+	int      numrecords=0;
+
+	/*intermediary: */
+	int     M, N;
+	double *matrix = NULL;
+	int     code;
+	
+	/*Set file pointer to beginning of the data: */
+	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+	if(code!=8)_error_("expecting a double mat array for enum %s",EnumToStringx(data_enum));
+	
+	/*Now fetch: */
+	if(my_rank==0){  
+		if(fread(&numrecords,sizeof(int),1,fid)!=1) _error_("could not read number of records in matrix array ");
+	}
+	MPI_Bcast(&numrecords,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	if(numrecords){
+
+		/*Allocate matrices :*/
+		matrices=(double**)xmalloc(numrecords*sizeof(double*));
+		mdims=(int*)xmalloc(numrecords*sizeof(int));
+		ndims=(int*)xmalloc(numrecords*sizeof(int));
+
+		for(i=0;i<numrecords;i++){
+			matrices[i]=NULL;
+			mdims[i]=0;
+			ndims[i]=0;
+		}
+
+		/*Loop through records and fetch matrix: */
+		for(i=0;i<numrecords;i++){
+
+			if(my_rank==0){  
+				if(fread(&M,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of rows in ",i,"th matrix of matrix array");
+			}
+			MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+			if(my_rank==0){  
+				if(fread(&N,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of columns in ",i,"th matrix of matrix array");
+			}
+			MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+			/*Now allocate matrix: */
+			if(M*N){
+				matrix=(double*)xmalloc(M*N*sizeof(double));
+
+				/*Read matrix on node 0, then broadcast: */
+				if(my_rank==0){  
+					if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+				}
+
+				MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+			}
+
+			/*Assign: */
+			matrices[i]=matrix;
+			mdims[i]=M;
+			ndims[i]=N;
+		}
+	}
+
+	/*Assign output pointers: */
+	*pmatrices=matrices;
+	*pmdims=mdims;
+	*pndims=ndims;
+	*pnumrecords=numrecords;
+}
+/*}}}*/
+/*FUNCTION IoModel::FetchData(int num,...){{{1*/
+void  IoModel::FetchData(int num,...){
+
+	va_list ap;
+	int     dataenum;
+	double* matrix=NULL;
+	int     M,N;
+	int     i;
+
+	/*Go through the entire list of enums and fetch the corresponding data. Add it to the iomodel->data dataset. Everything
+	 *we fetch is a double* : */
+	
+	va_start(ap,num);
+	for(i=0; i<num; i++){
+		
+		dataenum=va_arg(ap, int);
+
+		/*Some checks in debugging mode*/
+		/*{{{*/
+		#ifdef _ISSM_DEBUG_
+		_assert_(dataenum<MaximumNumberOfEnums);
+		if(this->data[dataenum]){
+			_error_("Info: trying to fetch %s but previous pointer has not been freed (DeleteData has not been called)",EnumToStringx(dataenum));
+		}
+		#endif
+		/*}}}*/
+
+		/*Add to this->data: */
+		this->FetchData(&matrix,&M,&N,dataenum);
+		this->data[dataenum]=matrix;
+	}
+	va_end(ap);
+
+}
+/*}}}*/
+/*FUNCTION IoModel::FetchDataToInput{{{1*/
 void IoModel::FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum,double default_value){
 
@@ -1005,2 +983,63 @@
 	xfree((void**)&string);
 }
+/*FUNCTION IoModel::SetFilePointerToData{{{1*/
+FILE* IoModel::SetFilePointerToData(int* pcode,int* pvector_type, int data_enum){
+
+	extern int my_rank;
+	extern int num_procs;
+	
+	int found=0;
+	int record_enum;
+	int record_length;
+	int record_code; //1 to 7 number
+	int vector_type; //nodal or elementary
+ 
+	/*Go find in the binary file, the position of the data we want to fetch: */
+	if(my_rank==0){
+	
+		/*First set FILE* position to the beginning of the file: */
+		fseek(fid,0,SEEK_SET);
+
+		/*Now march through file looking for the correct data identifier: */
+		for(;;){
+			/*Read enum for this size of first string name: */
+			if(fread(&record_enum,sizeof(int),1,fid)==0){
+				/*Ok, we have reached the end of the file. break: */
+				found=0;
+				break;
+			}
+			
+			/*Is this the record sought for? : */
+			if (data_enum==record_enum){
+				/*Ok, we have found the correct string. Pass the record length, and read data type code: */
+				fseek(fid,sizeof(int),SEEK_CUR);
+				fread(&record_code,sizeof(int),1,fid);
+
+				/*if record_code points to a vector, get its type (nodal or elementary): */
+				if(5<=record_code && record_code<=7)fread(&vector_type,sizeof(int),1,fid);
+				found=1;
+				break;
+			}
+			else{
+				/*This is not the correct string, read the record length, and use it to skip this record: */
+				fread(&record_length,sizeof(int),1,fid);
+				/*skip: */
+				fseek(fid,record_length,SEEK_CUR);
+			}
+		}
+	}
+	MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 
+	if(!found)_error_("%s %s ","could not find data with name",EnumToStringx(data_enum));
+
+	/*Broadcast code and vector type: */
+	MPI_Bcast(&record_code,1,MPI_INT,0,MPI_COMM_WORLD); 
+	MPI_Bcast(&vector_type,1,MPI_INT,0,MPI_COMM_WORLD); 
+	if(record_code==5) MPI_Bcast(&vector_type,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*Assign output pointers:*/
+	*pcode=record_code;
+	if(pvector_type)*pvector_type=vector_type;
+
+	return fid;
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/IoModel.h
===================================================================
--- /issm/trunk/src/c/objects/IoModel.h	(revision 9404)
+++ /issm/trunk/src/c/objects/IoModel.h	(revision 9405)
@@ -17,10 +17,9 @@
 
 	private: 
-		FILE    *fid; //pointer to input file
-		double **data;//this dataset holds temporary data, memory intensive.
+		FILE        *fid;         //pointer to input file
+		double     **data;        //this dataset holds temporary data, memory intensive.
+		Parameters  *constants;   //this dataset holds all double, int, bool and char *parameters read in from the input file.*
 
 	public:
-		Parameters *constants;   //this dataset holds all double, int, bool and char*parameters read in from the input file.*
-
 		/*This data needs to stay memory resident at all time, even if it's memory intensive: */
 		bool *my_elements;
@@ -35,26 +34,28 @@
 		int constraintcounter;   //keep track of how many constraints are being created in each analysis type
 
-		/*Methods: {{{1*/
+		/*Methods*/
 		~IoModel();
 		IoModel();
 		IoModel(FILE* iomodel_handle);
-		/*}}}*/
-		/*Input/Output:{{{1*/
-		void  FetchData(bool*     pboolean,int data_enum);
-		void  FetchData(int*      pinteger,int data_enum);
-		void  FetchData(double*   pscalar,int data_enum);
-		void  FetchData(char**    pstring,int data_enum);
-		void  FetchData(int** pmatrix,int* pM,int* pN,int data_enum);
-		void  FetchData(double**  pscalarmatrix,int* pM,int* pN,int data_enum);
-		void  FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
-		void  FetchData(double*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
-		void  FetchParameters(Parameters* parameters);
-		FILE* SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
-		void  FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,double default_value=0);
-		void  FetchData(int num,...);
-		double* f(int dataenum);
-		void  DeleteData(int num,...);
-		/*}}}*/
 
+		/*Input/Output*/
+		void        Constant(bool   *poutput,int constant_enum);
+		void        Constant(int    *poutput,int constant_enum);
+		void        Constant(double *poutput,int constant_enum);
+		Parameters *CopyConstants(void);
+		double     *Data(int dataenum);
+		void        DeleteData(int num,...);
+		void        FetchConstants(void);
+		void        FetchData(bool*     pboolean,int data_enum);
+		void        FetchData(int*      pinteger,int data_enum);
+		void        FetchData(double*   pscalar,int data_enum);
+		void        FetchData(char**    pstring,int data_enum);
+		void        FetchData(int** pmatrix,int* pM,int* pN,int data_enum);
+		void        FetchData(double**  pscalarmatrix,int* pM,int* pN,int data_enum);
+		void        FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
+		void        FetchData(double*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
+		void        FetchData(int num,...);
+		void        FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,double default_value=0);
+		FILE*       SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
 };
 
Index: /issm/trunk/src/c/objects/Loads/Icefront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Icefront.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Loads/Icefront.cpp	(revision 9405)
@@ -54,6 +54,6 @@
 	
 	/*find parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 
 	/*First, retrieve element index and element type: */
@@ -64,20 +64,20 @@
 		segment_width=6;
 	}
-	_assert_(iomodel->f(PressureloadEnum));
-	element=(int)(*(iomodel->f(PressureloadEnum)+segment_width*i+segment_width-2)-1); //element is in the penultimate column (node1 node2 ... elem fill)
+	_assert_(iomodel->Data(PressureloadEnum));
+	element=(int)(*(iomodel->Data(PressureloadEnum)+segment_width*i+segment_width-2)-1); //element is in the penultimate column (node1 node2 ... elem fill)
 
 	/*Build ids for hook constructors: */
-	icefront_eid=(int) *(iomodel->f(PressureloadEnum)+segment_width*i+segment_width-2); //matlab indexing
+	icefront_eid=(int) *(iomodel->Data(PressureloadEnum)+segment_width*i+segment_width-2); //matlab indexing
 	icefront_mparid=numberofelements+1; //matlab indexing
 
 	if (in_icefront_type==MacAyeal2dIceFrontEnum || in_icefront_type==MacAyeal3dIceFrontEnum){
-		icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->f(PressureloadEnum)+segment_width*i+0);
-		icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->f(PressureloadEnum)+segment_width*i+1);
+		icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->Data(PressureloadEnum)+segment_width*i+0);
+		icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->Data(PressureloadEnum)+segment_width*i+1);
 	}
 	else if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum){
-		icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->f(PressureloadEnum)+segment_width*i+0);
-		icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->f(PressureloadEnum)+segment_width*i+1);
-		icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->f(PressureloadEnum)+segment_width*i+2);
-		icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->f(PressureloadEnum)+segment_width*i+3);
+		icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->Data(PressureloadEnum)+segment_width*i+0);
+		icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->Data(PressureloadEnum)+segment_width*i+1);
+		icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->Data(PressureloadEnum)+segment_width*i+2);
+		icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->Data(PressureloadEnum)+segment_width*i+3);
 	}
 	else _error_("in_icefront_type %s not supported yet!",EnumToStringx(in_icefront_type));
@@ -85,5 +85,5 @@
 	if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum) num_nodes=4;
 	else num_nodes=2;
-	icefront_fill=(int)*(iomodel->f(PressureloadEnum)+segment_width*i+segment_width-1); 
+	icefront_fill=(int)*(iomodel->Data(PressureloadEnum)+segment_width*i+segment_width-1); 
 	
 	/*Ok, we have everything to build the object: */
Index: /issm/trunk/src/c/objects/Loads/Numericalflux.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Numericalflux.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Loads/Numericalflux.cpp	(revision 9405)
@@ -54,5 +54,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 
 	/* Get MatPar id */
@@ -60,7 +60,7 @@
 
 	/*First, see wether this is an internal or boundary edge (if e2=NaN)*/
-	if (isnan((double)iomodel->f(EdgesEnum)[4*i+3])){ //edges are [node1 node2 elem1 elem2]
+	if (isnan((double)iomodel->Data(EdgesEnum)[4*i+3])){ //edges are [node1 node2 elem1 elem2]
 		/* Boundary edge, only one element */
-		e1=(int)iomodel->f(EdgesEnum)[4*i+2];
+		e1=(int)iomodel->Data(EdgesEnum)[4*i+2];
 		e2=(int)UNDEF;
 		num_elems=1;
@@ -71,6 +71,6 @@
 	else{
 		/* internal edge: connected to 2 elements */
-		e1=(int)iomodel->f(EdgesEnum)[4*i+2];
-		e2=(int)iomodel->f(EdgesEnum)[4*i+3];
+		e1=(int)iomodel->Data(EdgesEnum)[4*i+2];
+		e2=(int)iomodel->Data(EdgesEnum)[4*i+3];
 		num_elems=2;
 		num_nodes=4;
@@ -81,6 +81,6 @@
 
 	/*1: Get vertices ids*/
-	i1=(int)iomodel->f(EdgesEnum)[4*i+0];
-	i2=(int)iomodel->f(EdgesEnum)[4*i+1];
+	i1=(int)iomodel->Data(EdgesEnum)[4*i+0];
+	i2=(int)iomodel->Data(EdgesEnum)[4*i+1];
 
 	if (numericalflux_type==InternalEnum){
@@ -91,8 +91,8 @@
 		pos1=pos2=pos3=pos4=UNDEF;
 		for(j=0;j<3;j++){
-			if (iomodel->f(ElementsEnum)[3*(e1-1)+j]==i1) pos1=j+1;
-			if (iomodel->f(ElementsEnum)[3*(e1-1)+j]==i2) pos2=j+1;
-			if (iomodel->f(ElementsEnum)[3*(e2-1)+j]==i1) pos3=j+1;
-			if (iomodel->f(ElementsEnum)[3*(e2-1)+j]==i2) pos4=j+1;
+			if (iomodel->Data(ElementsEnum)[3*(e1-1)+j]==i1) pos1=j+1;
+			if (iomodel->Data(ElementsEnum)[3*(e1-1)+j]==i2) pos2=j+1;
+			if (iomodel->Data(ElementsEnum)[3*(e2-1)+j]==i1) pos3=j+1;
+			if (iomodel->Data(ElementsEnum)[3*(e2-1)+j]==i2) pos4=j+1;
 		}
 		_assert_(pos1!=UNDEF && pos2!=UNDEF && pos3!=UNDEF && pos4!=UNDEF);
@@ -110,6 +110,6 @@
 		pos1=pos2=UNDEF;
 		for(j=0;j<3;j++){
-			if (iomodel->f(ElementsEnum)[3*(e1-1)+j]==i1) pos1=j+1;
-			if (iomodel->f(ElementsEnum)[3*(e1-1)+j]==i2) pos2=j+1;
+			if (iomodel->Data(ElementsEnum)[3*(e1-1)+j]==i1) pos1=j+1;
+			if (iomodel->Data(ElementsEnum)[3*(e1-1)+j]==i2) pos2=j+1;
 		}
 		_assert_(pos1!=UNDEF && pos2!=UNDEF);
Index: /issm/trunk/src/c/objects/Loads/Pengrid.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 9405)
@@ -53,6 +53,6 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofvertices,NumberOfVerticesEnum);
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
 
 	/*Some checks if debugging activated*/
Index: /issm/trunk/src/c/objects/Loads/Riftfront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Riftfront.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Loads/Riftfront.cpp	(revision 9405)
@@ -56,13 +56,13 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&numberofelements,NumberOfElementsEnum);
-	iomodel->constants->FindParam(&penalty_lock,PenaltyLockEnum);
+	iomodel->Constant(&numberofelements,NumberOfElementsEnum);
+	iomodel->Constant(&penalty_lock,PenaltyLockEnum);
 
 	/*Ok, retrieve all the data needed to add a penalty between the two nodes: */
-	el1=(int)*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+2);
-	el2=(int)*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+3); 
-
-	node1=(int)*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+0); 
-	node2=(int)*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+1);
+	el1=(int)*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+2);
+	el2=(int)*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+3); 
+
+	node1=(int)*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+0); 
+	node2=(int)*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+1);
 
 	/*id: */
@@ -89,9 +89,9 @@
 	this->penalty_lock=penalty_lock;
 	this->material_converged=0;
-	this->normal[0]=*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+4);
-	this->normal[1]=*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+5);
-	this->length=*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+6);
-	this->fraction=*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+9);
-	this->state=(int)*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+11);
+	this->normal[0]=*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+4);
+	this->normal[1]=*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+5);
+	this->length=*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+6);
+	this->fraction=*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+9);
+	this->state=(int)*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+11);
 
 	//intialize inputs, and add as many inputs per element as requested: 
@@ -99,8 +99,8 @@
 		
 	riftfront_type=SegmentRiftfrontEnum;
-	riftfront_fill = (int)*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+7);
-	riftfront_friction=*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+8);
-	riftfront_fractionincrement=*(iomodel->f(RiftinfoEnum)+RIFTINFOSIZE*i+10);
-	riftfront_shelf=(bool)iomodel->f(NodeOnIceShelfEnum)[node1-1];
+	riftfront_fill = (int)*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+7);
+	riftfront_friction=*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+8);
+	riftfront_fractionincrement=*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+10);
+	riftfront_shelf=(bool)iomodel->Data(NodeOnIceShelfEnum)[node1-1];
 
 	this->inputs->AddInput(new IntInput(TypeEnum,riftfront_type));
Index: /issm/trunk/src/c/objects/Materials/Matice.cpp
===================================================================
--- /issm/trunk/src/c/objects/Materials/Matice.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Materials/Matice.cpp	(revision 9405)
@@ -660,7 +660,7 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
-	iomodel->constants->FindParam(&control_analysis,ControlAnalysisEnum);
-	iomodel->constants->FindParam(&num_control_type,NumControlTypeEnum);
+	iomodel->Constant(&dim,DimEnum);
+	iomodel->Constant(&control_analysis,ControlAnalysisEnum);
+	iomodel->Constant(&num_control_type,NumControlTypeEnum);
 
 	/*if 2d*/
@@ -674,25 +674,25 @@
 
 		/*Get B*/
-		if (iomodel->f(RheologyBEnum)) {
-			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->f(RheologyBEnum)[int(iomodel->f(ElementsEnum)[num_vertices*index+i]-1)];
+		if (iomodel->Data(RheologyBEnum)) {
+			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(RheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+i]-1)];
 			this->inputs->AddInput(new TriaVertexInput(RheologyBbarEnum,nodeinputs));
 		}
 
 		/*Get n*/
-		if (iomodel->f(RheologyNEnum)) {
-			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->f(RheologyNEnum)[index];
+		if (iomodel->Data(RheologyNEnum)) {
+			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(RheologyNEnum)[index];
 			this->inputs->AddInput(new TriaVertexInput(RheologyNEnum,nodeinputs));
 		}
 
 		/*Control Inputs*/
-		if (control_analysis && iomodel->f(ControlTypeEnum)){
+		if (control_analysis && iomodel->Data(ControlTypeEnum)){
 			for(i=0;i<num_control_type;i++){
-				switch((int)iomodel->f(ControlTypeEnum)[i]){
+				switch((int)iomodel->Data(ControlTypeEnum)[i]){
 					case RheologyBbarEnum:
-						if (iomodel->f(RheologyBEnum)){
-							_assert_(iomodel->f(RheologyBEnum));_assert_(iomodel->f(CmMinEnum)); _assert_(iomodel->f(CmMaxEnum)); 
-							for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->f(RheologyBEnum)[int(iomodel->f(ElementsEnum)[num_vertices*index+j]-1)];
-							for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[int(iomodel->f(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
-							for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[int(iomodel->f(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
+						if (iomodel->Data(RheologyBEnum)){
+							_assert_(iomodel->Data(RheologyBEnum));_assert_(iomodel->Data(CmMinEnum)); _assert_(iomodel->Data(CmMaxEnum)); 
+							for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(RheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)];
+							for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
+							for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
 							this->inputs->AddInput(new ControlInput(RheologyBbarEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 						}
@@ -713,25 +713,25 @@
 
 		/*Get B*/
-		if (iomodel->f(RheologyBEnum)) {
-			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->f(RheologyBEnum)[int(iomodel->f(ElementsEnum)[num_vertices*index+i]-1)];
+		if (iomodel->Data(RheologyBEnum)) {
+			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(RheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+i]-1)];
 			this->inputs->AddInput(new PentaVertexInput(RheologyBEnum,nodeinputs));
 		}
 
 		/*Get n*/
-		if (iomodel->f(RheologyNEnum)) {
-			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->f(RheologyNEnum)[index];
+		if (iomodel->Data(RheologyNEnum)) {
+			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(RheologyNEnum)[index];
 			this->inputs->AddInput(new PentaVertexInput(RheologyNEnum,nodeinputs));
 		}
 
 		/*Control Inputs*/
-		if (control_analysis && iomodel->f(ControlTypeEnum)){
+		if (control_analysis && iomodel->Data(ControlTypeEnum)){
 			for(i=0;i<num_control_type;i++){
-				switch((int)iomodel->f(ControlTypeEnum)[i]){
+				switch((int)iomodel->Data(ControlTypeEnum)[i]){
 					case RheologyBbarEnum:
-						if (iomodel->f(RheologyBEnum)){
-							_assert_(iomodel->f(RheologyBEnum));_assert_(iomodel->f(CmMinEnum)); _assert_(iomodel->f(CmMaxEnum)); 
-							for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->f(RheologyBEnum)[int(iomodel->f(ElementsEnum)[num_vertices*index+j]-1)];
-							for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->f(CmMinEnum)[int(iomodel->f(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
-							for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->f(CmMaxEnum)[int(iomodel->f(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
+						if (iomodel->Data(RheologyBEnum)){
+							_assert_(iomodel->Data(RheologyBEnum));_assert_(iomodel->Data(CmMinEnum)); _assert_(iomodel->Data(CmMaxEnum)); 
+							for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(RheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)];
+							for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
+							for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
 							this->inputs->AddInput(new ControlInput(RheologyBEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
 						}
Index: /issm/trunk/src/c/objects/Materials/Matpar.cpp
===================================================================
--- /issm/trunk/src/c/objects/Materials/Matpar.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Materials/Matpar.cpp	(revision 9405)
@@ -26,21 +26,21 @@
 
 	this->mid                       = matpar_mid;
-	iomodel->constants->FindParam(&this->rho_ice,RhoIceEnum);
-	iomodel->constants->FindParam(&this->rho_water,RhoWaterEnum);
-	iomodel->constants->FindParam(&this->heatcapacity,HeatcapacityEnum);
-	iomodel->constants->FindParam(&this->thermalconductivity,ThermalconductivityEnum);
-	iomodel->constants->FindParam(&this->latentheat,LatentheatEnum);
-	iomodel->constants->FindParam(&this->beta,BetaEnum);
-	iomodel->constants->FindParam(&this->meltingpoint,MeltingpointEnum);
-	iomodel->constants->FindParam(&this->referencetemperature,ReferencetemperatureEnum);
-	iomodel->constants->FindParam(&this->mixed_layer_capacity,MixedLayerCapacityEnum);
-	iomodel->constants->FindParam(&this->thermal_exchange_velocity,ThermalExchangeVelocityEnum);
-	iomodel->constants->FindParam(&this->g,GEnum);
-	
-	iomodel->constants->FindParam(&this->kn,HydroKnEnum);
-	iomodel->constants->FindParam(&this->hydro_p,HydroPEnum);
-	iomodel->constants->FindParam(&this->hydro_q,HydroQEnum);
-	iomodel->constants->FindParam(&this->hydro_CR,HydroCREnum);
-	iomodel->constants->FindParam(&this->hydro_n,HydroNEnum);
+	iomodel->Constant(&this->rho_ice,RhoIceEnum);
+	iomodel->Constant(&this->rho_water,RhoWaterEnum);
+	iomodel->Constant(&this->heatcapacity,HeatcapacityEnum);
+	iomodel->Constant(&this->thermalconductivity,ThermalconductivityEnum);
+	iomodel->Constant(&this->latentheat,LatentheatEnum);
+	iomodel->Constant(&this->beta,BetaEnum);
+	iomodel->Constant(&this->meltingpoint,MeltingpointEnum);
+	iomodel->Constant(&this->referencetemperature,ReferencetemperatureEnum);
+	iomodel->Constant(&this->mixed_layer_capacity,MixedLayerCapacityEnum);
+	iomodel->Constant(&this->thermal_exchange_velocity,ThermalExchangeVelocityEnum);
+	iomodel->Constant(&this->g,GEnum);
+	
+	iomodel->Constant(&this->kn,HydroKnEnum);
+	iomodel->Constant(&this->hydro_p,HydroPEnum);
+	iomodel->Constant(&this->hydro_q,HydroQEnum);
+	iomodel->Constant(&this->hydro_CR,HydroCREnum);
+	iomodel->Constant(&this->hydro_n,HydroNEnum);
 }
 /*}}}1*/
Index: /issm/trunk/src/c/objects/Node.cpp
===================================================================
--- /issm/trunk/src/c/objects/Node.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Node.cpp	(revision 9405)
@@ -37,5 +37,5 @@
 
 	/*Fetch parameters: */
-	iomodel->constants->FindParam(&dim,DimEnum);
+	iomodel->Constant(&dim,DimEnum);
 
 	/*id: */
@@ -46,5 +46,5 @@
 
 	/*indexing:*/
-	DistributeNumDofs(&this->indexing,analysis_type,iomodel->f(VerticesTypeEnum)+io_index); //number of dofs per node
+	DistributeNumDofs(&this->indexing,analysis_type,iomodel->Data(VerticesTypeEnum)+io_index); //number of dofs per node
 	gsize=this->indexing.gsize;
 
@@ -54,16 +54,16 @@
 	//intialize inputs, and add as many inputs per element as requested: 
 	this->inputs=new Inputs();
-	if (iomodel->f(NodeOnBedEnum))      this->inputs->AddInput(new BoolInput(NodeOnBedEnum,(IssmBool)iomodel->f(NodeOnBedEnum)[io_index]));
-	if (iomodel->f(NodeOnSurfaceEnum))  this->inputs->AddInput(new BoolInput(NodeOnSurfaceEnum,(IssmBool)iomodel->f(NodeOnSurfaceEnum)[io_index]));
-	if (iomodel->f(NodeOnIceShelfEnum)) this->inputs->AddInput(new BoolInput(NodeOnIceShelfEnum,(IssmBool)iomodel->f(NodeOnIceShelfEnum)[io_index]));
-	if (iomodel->f(NodeOnIceSheetEnum)) this->inputs->AddInput(new BoolInput(NodeOnIceSheetEnum,(IssmBool)iomodel->f(NodeOnIceSheetEnum)[io_index]));
+	if (iomodel->Data(NodeOnBedEnum))      this->inputs->AddInput(new BoolInput(NodeOnBedEnum,(IssmBool)iomodel->Data(NodeOnBedEnum)[io_index]));
+	if (iomodel->Data(NodeOnSurfaceEnum))  this->inputs->AddInput(new BoolInput(NodeOnSurfaceEnum,(IssmBool)iomodel->Data(NodeOnSurfaceEnum)[io_index]));
+	if (iomodel->Data(NodeOnIceShelfEnum)) this->inputs->AddInput(new BoolInput(NodeOnIceShelfEnum,(IssmBool)iomodel->Data(NodeOnIceShelfEnum)[io_index]));
+	if (iomodel->Data(NodeOnIceSheetEnum)) this->inputs->AddInput(new BoolInput(NodeOnIceSheetEnum,(IssmBool)iomodel->Data(NodeOnIceSheetEnum)[io_index]));
 	if (iomodel->numbernodetoelementconnectivity) this->inputs->AddInput(new IntInput(NumberNodeToElementConnectivityEnum,(IssmInt)iomodel->numbernodetoelementconnectivity[io_index]));
-	if (analysis_type==DiagnosticHorizAnalysisEnum) this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->f(VerticesTypeEnum)[io_index]));
+	if (analysis_type==DiagnosticHorizAnalysisEnum) this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->Data(VerticesTypeEnum)[io_index]));
 	
 	/*set single point constraints: */
 
 	/*spc all nodes on water*/
-	if (!iomodel->f(NodeOnWaterEnum)) _error_("iomodel->nodeonwater is NULL");
-	if (iomodel->f(NodeOnWaterEnum)[io_index]){
+	if (!iomodel->Data(NodeOnWaterEnum)) _error_("iomodel->nodeonwater is NULL");
+	if (iomodel->Data(NodeOnWaterEnum)[io_index]){
 		for(k=1;k<=gsize;k++){
 			this->FreezeDof(k);
@@ -75,16 +75,16 @@
 		if (dim==3){
 			/*We have a  3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */
-			if (!iomodel->f(NodeOnBedEnum)) _error_("iomodel->nodeonbed is NULL");
-			if (!iomodel->f(VerticesTypeEnum)) _error_("iomodel->vertices_type is NULL");
-			if (iomodel->f(VerticesTypeEnum)[io_index]==MacAyealApproximationEnum && !iomodel->f(NodeOnBedEnum)[io_index]){
+			if (!iomodel->Data(NodeOnBedEnum)) _error_("iomodel->nodeonbed is NULL");
+			if (!iomodel->Data(VerticesTypeEnum)) _error_("iomodel->vertices_type is NULL");
+			if (iomodel->Data(VerticesTypeEnum)[io_index]==MacAyealApproximationEnum && !iomodel->Data(NodeOnBedEnum)[io_index]){
 				for(k=1;k<=gsize;k++) this->FreezeDof(k);
 			}
-			if (iomodel->f(VerticesTypeEnum)[io_index]==MacAyealPattynApproximationEnum && iomodel->f(NodeOnMacayealEnum)[io_index]){
-				if(!iomodel->f(NodeOnBedEnum)[io_index]){
+			if (iomodel->Data(VerticesTypeEnum)[io_index]==MacAyealPattynApproximationEnum && iomodel->Data(NodeOnMacayealEnum)[io_index]){
+				if(!iomodel->Data(NodeOnBedEnum)[io_index]){
 					for(k=1;k<=gsize;k++) this->FreezeDof(k);
 				}
 			}
-			if (iomodel->f(VerticesTypeEnum)[io_index]==MacAyealStokesApproximationEnum && iomodel->f(NodeOnMacayealEnum)[io_index]){
-				if(!iomodel->f(NodeOnBedEnum)[io_index]){
+			if (iomodel->Data(VerticesTypeEnum)[io_index]==MacAyealStokesApproximationEnum && iomodel->Data(NodeOnMacayealEnum)[io_index]){
+				if(!iomodel->Data(NodeOnBedEnum)[io_index]){
 					for(k=1;k<=2;k++) this->FreezeDof(k);
 				}
@@ -92,6 +92,6 @@
 		}
 		/*spc all nodes on hutter*/
-		if (!iomodel->f(NodeOnHutterEnum)) _error_("iomodel->nodeonhutter is NULL");
-		if (iomodel->f(NodeOnHutterEnum)[io_index]){
+		if (!iomodel->Data(NodeOnHutterEnum)) _error_("iomodel->nodeonhutter is NULL");
+		if (iomodel->Data(NodeOnHutterEnum)[io_index]){
 			for(k=1;k<=gsize;k++){
 				this->FreezeDof(k);
@@ -104,6 +104,6 @@
 	if (analysis_type==DiagnosticHutterAnalysisEnum){
 		/*Constrain all nodes that are not Hutter*/
-		if (!iomodel->f(NodeOnHutterEnum)) _error_("iomodel->nodeonhutter is NULL");
-		if (!iomodel->f(NodeOnHutterEnum)[io_index]){
+		if (!iomodel->Data(NodeOnHutterEnum)) _error_("iomodel->nodeonhutter is NULL");
+		if (!iomodel->Data(NodeOnHutterEnum)[io_index]){
 			for(k=1;k<=gsize;k++){
 				this->FreezeDof(k);
@@ -122,6 +122,6 @@
 		if (dim==3){
 			/*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */
-			_assert_(iomodel->f(NodeOnBedEnum));
-			if (!iomodel->f(NodeOnBedEnum)[io_index]){
+			_assert_(iomodel->Data(NodeOnBedEnum));
+			if (!iomodel->Data(NodeOnBedEnum)[io_index]){
 				for(k=1;k<=gsize;k++){
 					this->FreezeDof(k);
Index: /issm/trunk/src/c/objects/Vertex.cpp
===================================================================
--- /issm/trunk/src/c/objects/Vertex.cpp	(revision 9404)
+++ /issm/trunk/src/c/objects/Vertex.cpp	(revision 9405)
@@ -31,5 +31,5 @@
 Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel){
 
-	this->Init(vertex_id, vertex_sid, iomodel->f(XEnum)[i],iomodel->f(YEnum)[i],iomodel->f(ZEnum)[i],(iomodel->f(ZEnum)[i]-iomodel->f(BedEnum)[i])/(iomodel->f(ThicknessEnum)[i]));
+	this->Init(vertex_id, vertex_sid, iomodel->Data(XEnum)[i],iomodel->Data(YEnum)[i],iomodel->Data(ZEnum)[i],(iomodel->Data(ZEnum)[i]-iomodel->Data(BedEnum)[i])/(iomodel->Data(ThicknessEnum)[i]));
 
 }
Index: /issm/trunk/src/m/classes/model.m
===================================================================
--- /issm/trunk/src/m/classes/model.m	(revision 9404)
+++ /issm/trunk/src/m/classes/model.m	(revision 9405)
@@ -253,4 +253,5 @@
 		 %Results fields
 		 output_frequency                    = {0,true,'Integer'};
+		 results_on_vertices                 = {0,true,'Boolean'};
 		 inputfilename                       = {'',true,'String'};
 		 outputfilename                      = {'',true,'String'};
Index: /issm/trunk/src/m/enum/ResultsOnVerticesEnum.m
===================================================================
--- /issm/trunk/src/m/enum/ResultsOnVerticesEnum.m	(revision 9405)
+++ /issm/trunk/src/m/enum/ResultsOnVerticesEnum.m	(revision 9405)
@@ -0,0 +1,11 @@
+function macro=ResultsOnVerticesEnum()
+%RESULTSONVERTICESENUM - Enum of ResultsOnVertices
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=ResultsOnVerticesEnum()
+
+macro=StringToEnum('ResultsOnVertices');
