Index: /issm/trunk/src/c/ControlConstrainx/ControlConstrainx.cpp
===================================================================
--- /issm/trunk/src/c/ControlConstrainx/ControlConstrainx.cpp	(revision 3750)
+++ /issm/trunk/src/c/ControlConstrainx/ControlConstrainx.cpp	(revision 3751)
@@ -10,5 +10,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void ControlConstrainx( double* p_g, int numdofnodes, double cm_min, double cm_max,char* control_type){
+void ControlConstrainx( double* p_g, int numdofnodes, double cm_min, double cm_max,int control_type){
 
 	int i;
Index: /issm/trunk/src/c/ControlConstrainx/ControlConstrainx.h
===================================================================
--- /issm/trunk/src/c/ControlConstrainx/ControlConstrainx.h	(revision 3750)
+++ /issm/trunk/src/c/ControlConstrainx/ControlConstrainx.h	(revision 3751)
@@ -9,5 +9,5 @@
 
 /* local prototypes: */
-void ControlConstrainx( double* p_g, int numberofnodes, double cm_min, double cm_max,char* control_type);
+void ControlConstrainx( double* p_g, int numberofnodes, double cm_min, double cm_max,int control_type);
 
 #endif  /* _CONTROLCONSTRAINX_H */
Index: /issm/trunk/src/c/DataSet/DataSet.cpp
===================================================================
--- /issm/trunk/src/c/DataSet/DataSet.cpp	(revision 3750)
+++ /issm/trunk/src/c/DataSet/DataSet.cpp	(revision 3751)
@@ -1402,4 +1402,24 @@
 }
 /*}}}*/
+/*FUNCTION DataSet::UpdateInputsFromVector{{{1*/
+void  DataSet::UpdateInputsFromVector(int* vec, int name, int type){
+
+	vector<Object*>::iterator object;
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		(*object)->UpdateInputsFromVector(vec,name,type);
+	}
+}
+/*}}}*/
+/*FUNCTION DataSet::UpdateInputsFromVector{{{1*/
+void  DataSet::UpdateInputsFromVector(bool* vec, int name, int type){
+
+	vector<Object*>::iterator object;
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		(*object)->UpdateInputsFromVector(vec,name,type);
+	}
+}
+/*}}}*/
 /*FUNCTION DataSet::UpdateVertexPositions{{{1*/
 void  DataSet::UpdateVertexPositions(double* thickness,double* bed){
Index: /issm/trunk/src/c/DataSet/DataSet.h
===================================================================
--- /issm/trunk/src/c/DataSet/DataSet.h	(revision 3750)
+++ /issm/trunk/src/c/DataSet/DataSet.h	(revision 3751)
@@ -75,4 +75,6 @@
 		void  UpdateInputsFromConstant(bool constant, int name);
 		void  UpdateInputsFromVector(double* vector,int name, int type);
+		void  UpdateInputsFromVector(int* vector,int name, int type);
+		void  UpdateInputsFromVector(bool* vector,int name, int type);
 		void  UpdateInputsFromSolution(double* solution,int analysis_type,int sub_analysis_type);
 		void  PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type);
Index: /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 3750)
+++ /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 3751)
@@ -41,7 +41,9 @@
 	SteadyAnalysisEnum,
 	//slope
+	SurfaceAnalysisEnum,
 	SlopecomputeAnalysisEnum,
 	BedXAnalysisEnum,
 	BedYAnalysisEnum,
+	BedAnalysisEnum,
 	SurfaceXAnalysisEnum,
 	SurfaceYAnalysisEnum,
@@ -200,4 +202,5 @@
 	SurfaceSlopeyEnum,
 	TemperatureEnum,
+	TemperatureAverageEnum,
 	ThicknessEnum,
 	TypeEnum,
Index: /issm/trunk/src/c/Makefile.am
===================================================================
--- /issm/trunk/src/c/Makefile.am	(revision 3750)
+++ /issm/trunk/src/c/Makefile.am	(revision 3751)
@@ -885,6 +885,5 @@
 bin_PROGRAMS = 
 else 
-dnl bin_PROGRAMS = diagnostic.exe thermal.exe prognostic.exe prognostic2.exe balancedthickness.exe balancedthickness2.exe balancedvelocities.exe transient.exe steadystate.exe slopecompute.exe
-bin_PROGRAMS = diagnostic.exe 
+bin_PROGRAMS = diagnostic.exe thermal.exe prognostic.exe prognostic2.exe balancedthickness.exe balancedthickness2.exe balancedvelocities.exe transient.exe steadystate.exe slopecompute.exe
 endif
 
Index: /issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.cpp
===================================================================
--- /issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.cpp	(revision 3750)
+++ /issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.cpp	(revision 3751)
@@ -9,4 +9,17 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
+void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,Vec vector, int NameEnum, int TypeEnum){
+
+	double* serial_vector=NULL;
+
+	VecToMPISerial(&serial_vector,vector);
+
+	UpdateInputsFromVectorx( elements,nodes, vertices, loads, materials, parameters,serial_vector,NameEnum, TypeEnum);
+
+	/*Free ressources:*/
+	xfree((void**)&serial_vector);
+}
+
+	
 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,double* vector, int NameEnum, int TypeEnum){
 
@@ -26,2 +39,38 @@
 
 }
+
+void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,int* vector, int NameEnum, int TypeEnum){
+
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
+	nodes->Configure(elements, loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	/*Update elements, nodes, loads and materials from inputs: */
+	elements->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	nodes->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	vertices->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	loads->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	materials->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	parameters->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+
+}
+
+void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,bool* vector, int NameEnum, int TypeEnum){
+
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
+	nodes->Configure(elements, loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	/*Update elements, nodes, loads and materials from inputs: */
+	elements->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	nodes->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	vertices->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	loads->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	materials->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	parameters->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+
+}
Index: /issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.h
===================================================================
--- /issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.h	(revision 3750)
+++ /issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.h	(revision 3751)
@@ -10,5 +10,8 @@
 
 /* local prototypes: */
+void	UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,Vec vector, int NameEnum,int TypeEnum);
 void	UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,double* vector, int NameEnum,int TypeEnum);
+void	UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,int* vector, int NameEnum,int TypeEnum);
+void	UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,bool* vector, int NameEnum,int TypeEnum);
 
 #endif  /* _UPDATEINPUTSFROMVECTORXX_H */
Index: /issm/trunk/src/c/objects/Constraints/Rgb.h
===================================================================
--- /issm/trunk/src/c/objects/Constraints/Rgb.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Constraints/Rgb.h	(revision 3751)
@@ -35,4 +35,6 @@
 		int    MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Constraints/Spc.h
===================================================================
--- /issm/trunk/src/c/objects/Constraints/Spc.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Constraints/Spc.h	(revision 3751)
@@ -40,4 +40,6 @@
 		Object* copy();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/DofVec.h
===================================================================
--- /issm/trunk/src/c/objects/DofVec.h	(revision 3750)
+++ /issm/trunk/src/c/objects/DofVec.h	(revision 3751)
@@ -48,4 +48,6 @@
 		int   Size();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Elements/Beam.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Beam.cpp	(revision 3750)
+++ /issm/trunk/src/c/objects/Elements/Beam.cpp	(revision 3751)
@@ -774,3 +774,12 @@
 }
 /*}}}*/
-
+/*FUNCTION Beam::UpdateInputsFromVector(int* vector, int name, int type);{{{1*/
+void  Beam::UpdateInputsFromVector(int* vector, int name, int type){
+	ISSMERROR(" not supported yet!");
+}
+/*}}}*/
+/*FUNCTION Beam::UpdateInputsFromVector(bool* vector, int name, int type);{{{1*/
+void  Beam::UpdateInputsFromVector(bool* vector, int name, int type){
+	ISSMERROR(" not supported yet!");
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Elements/Beam.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Beam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Elements/Beam.h	(revision 3751)
@@ -54,4 +54,6 @@
 		void  SetClone(int* minranks);
 		void    UpdateInputsFromVector(double* vector, int name, int type);
+		void    UpdateInputsFromVector(int* vector, int name, int type);
+		void    UpdateInputsFromVector(bool* vector, int name, int type);
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 3750)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 3751)
@@ -4485,2 +4485,12 @@
 }
 /*}}}*/
+/*FUNCTION Penta::UpdateInputsFromVector(int* vector, int name, int type);{{{1*/
+void  Penta::UpdateInputsFromVector(int* vector, int name, int type){
+	ISSMERROR(" not supported yet!");
+}
+/*}}}*/
+/*FUNCTION Penta::UpdateInputsFromVector(bool* vector, int name, int type);{{{1*/
+void  Penta::UpdateInputsFromVector(bool* vector, int name, int type){
+	ISSMERROR(" not supported yet!");
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 3751)
@@ -141,4 +141,6 @@
 		void  UpdateInputsFromSolutionBalancedvelocities( double* solution,int analysis_type,int sub_analysis_type);
 		void  UpdateInputsFromVector(double* vector, int name, int type);
+		void  UpdateInputsFromVector(int* vector, int name, int type);
+		void  UpdateInputsFromVector(bool* vector, int name, int type);
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Elements/Sing.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Sing.cpp	(revision 3750)
+++ /issm/trunk/src/c/objects/Elements/Sing.cpp	(revision 3751)
@@ -562,2 +562,12 @@
 }
 /*}}}*/
+/*FUNCTION Sing::UpdateInputsFromVector(int* vector, int name, int type);{{{1*/
+void  Sing::UpdateInputsFromVector(int* vector, int name, int type){
+	ISSMERROR(" not supported yet!");
+}
+/*}}}*/
+/*FUNCTION Sing::UpdateInputsFromVector(bool* vector, int name, int type);{{{1*/
+void  Sing::UpdateInputsFromVector(bool* vector, int name, int type){
+	ISSMERROR(" not supported yet!");
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Elements/Sing.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Sing.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Elements/Sing.h	(revision 3751)
@@ -54,4 +54,6 @@
 		int   MyRank();
 		void  UpdateInputsFromVector(double* vector, int name, int type);
+		void  UpdateInputsFromVector(int* vector, int name, int type);
+		void  UpdateInputsFromVector(bool* vector, int name, int type);
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 3750)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 3751)
@@ -5177,2 +5177,12 @@
 }
 /*}}}*/
+/*FUNCTION Tria::UpdateInputsFromVector(int* vector, int name, int type);{{{1*/
+void  Tria::UpdateInputsFromVector(int* vector, int name, int type){
+	ISSMERROR(" not supported yet!");
+}
+/*}}}*/
+/*FUNCTION Tria::UpdateInputsFromVector(bool* vector, int name, int type);{{{1*/
+void  Tria::UpdateInputsFromVector(bool* vector, int name, int type){
+	ISSMERROR(" not supported yet!");
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Elements/Tria.h	(revision 3751)
@@ -51,4 +51,6 @@
 		void  SetClone(int* minranks);
 		void    UpdateInputsFromVector(double* vector, int name, int type);
+		void    UpdateInputsFromVector(int* vector, int name, int type);
+		void    UpdateInputsFromVector(bool* vector, int name, int type);
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/FemModel.cpp
===================================================================
--- /issm/trunk/src/c/objects/FemModel.cpp	(revision 3750)
+++ /issm/trunk/src/c/objects/FemModel.cpp	(revision 3751)
@@ -319,4 +319,19 @@
 }
 /*}}}*/
+/*FUNCTION FemModel::UpdateInputsFromVector(Vec vector, int name, int type){{{1*/
+void FemModel::UpdateInputsFromVector(Vec vector, int name, int type){
+
+	double* serial_vector=NULL;
+
+	if(vector==NULL)return; //don't bother
+
+	VecToMPISerial(&serial_vector,vector);
+
+	this->UpdateInputsFromVector(serial_vector,name,type);
+
+	/*Free ressources:*/
+	xfree((void**)&serial_vector);
+}
+/*}}}*/
 /*FUNCTION FemModel::UpdateInputsFromVector(double* vector, int name, int type){{{1*/
 void FemModel::UpdateInputsFromVector(double* vector, int name, int type){
@@ -333,4 +348,32 @@
 }
 /*}}}*/
+/*FUNCTION FemModel::UpdateInputsFromVector(int* vector, int name, int type){{{1*/
+void FemModel::UpdateInputsFromVector(int* vector, int name, int type){
+
+	if(vector==NULL)return; //don't bother
+
+	elements->UpdateInputsFromVector(vector,name,type);
+	nodes->UpdateInputsFromVector(vector,name,type);
+	vertices->UpdateInputsFromVector(vector,name,type);
+	loads->UpdateInputsFromVector(vector,name,type);
+	materials->UpdateInputsFromVector(vector,name,type);
+	parameters->UpdateInputsFromVector(vector,name,type);
+
+}
+/*}}}*/
+/*FUNCTION FemModel::UpdateInputsFromVector(bool* vector, int name, int type){{{1*/
+void FemModel::UpdateInputsFromVector(bool* vector, int name, int type){
+
+	if(vector==NULL)return; //don't bother
+
+	elements->UpdateInputsFromVector(vector,name,type);
+	nodes->UpdateInputsFromVector(vector,name,type);
+	vertices->UpdateInputsFromVector(vector,name,type);
+	loads->UpdateInputsFromVector(vector,name,type);
+	materials->UpdateInputsFromVector(vector,name,type);
+	parameters->UpdateInputsFromVector(vector,name,type);
+
+}
+/*}}}*/
 /*FUNCTION FemModel::UpdateInputsFromConstant(double constant, int name){{{1*/
 void    FemModel::UpdateInputsFromConstant(double constant, int name){
Index: /issm/trunk/src/c/objects/FemModel.h
===================================================================
--- /issm/trunk/src/c/objects/FemModel.h	(revision 3750)
+++ /issm/trunk/src/c/objects/FemModel.h	(revision 3751)
@@ -81,8 +81,13 @@
 		Mat      get_Gmn(void);
 
+		void    UpdateInputsFromVector(Vec vector, int name, int type);
 		void    UpdateInputsFromVector(double* vector, int name, int type);
+		void    UpdateInputsFromVector(bool* vector, int name, int type);
+		void    UpdateInputsFromVector(int* vector, int name, int type);
+
 		void    UpdateInputsFromConstant(double constant, int name);
 		void    UpdateInputsFromConstant(int constant, int name);
 		void    UpdateInputsFromConstant(bool constant, int name);
+
 		void    UpdateInputsFromSolution(Vec solution, int analysis_type, int sub_analysis_type);
 		void    UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type);
Index: /issm/trunk/src/c/objects/Inputs/BeamVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/BeamVertexInput.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Inputs/BeamVertexInput.h	(revision 3751)
@@ -39,4 +39,6 @@
 		int   EnumType();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Inputs/BoolInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/BoolInput.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Inputs/BoolInput.h	(revision 3751)
@@ -39,4 +39,6 @@
 		int   EnumType();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Inputs/DoubleInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/DoubleInput.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Inputs/DoubleInput.h	(revision 3751)
@@ -39,4 +39,6 @@
 		int   EnumType();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Inputs/IntInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/IntInput.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Inputs/IntInput.h	(revision 3751)
@@ -39,4 +39,6 @@
 		int   EnumType();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Inputs/PentaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/PentaVertexInput.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Inputs/PentaVertexInput.h	(revision 3751)
@@ -38,4 +38,6 @@
 		int   EnumType();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Inputs/SingVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/SingVertexInput.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Inputs/SingVertexInput.h	(revision 3751)
@@ -38,4 +38,6 @@
 		int   EnumType();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Inputs/TriaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TriaVertexInput.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Inputs/TriaVertexInput.h	(revision 3751)
@@ -38,4 +38,6 @@
 		int   EnumType();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Loads/Icefront.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Icefront.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Loads/Icefront.h	(revision 3751)
@@ -51,4 +51,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Loads/Load.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Load.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Loads/Load.h	(revision 3751)
@@ -34,7 +34,4 @@
 		virtual void  PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type)=0;
 		virtual void  PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type)=0;
-
-		int           Enum();
-
 };
 #endif
Index: /issm/trunk/src/c/objects/Loads/Numericalflux.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Numericalflux.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Loads/Numericalflux.h	(revision 3751)
@@ -46,4 +46,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Loads/Pengrid.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 3751)
@@ -52,4 +52,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Loads/Penpair.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Penpair.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Loads/Penpair.h	(revision 3751)
@@ -44,4 +44,6 @@
 		Object* copy();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Loads/Riftfront.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Riftfront.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Loads/Riftfront.h	(revision 3751)
@@ -61,4 +61,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Materials/Material.h
===================================================================
--- /issm/trunk/src/c/objects/Materials/Material.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Materials/Material.h	(revision 3751)
@@ -27,11 +27,7 @@
 		virtual void  UpdateFromInputs(void* inputs)=0;
 		virtual void  UpdateInputsFromVector(double* vector, int name, int type)=0;
-		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
-		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
-		void    UpdateInputsFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");}
-
+		virtual void  UpdateInputsFromVector(int* vector, int name, int type)=0;
+		virtual void  UpdateInputsFromVector(bool* vector, int name, int type)=0;
 		virtual void  UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type)=0;
-
-		int           Enum();
 		
 };
Index: /issm/trunk/src/c/objects/Materials/Matice.h
===================================================================
--- /issm/trunk/src/c/objects/Materials/Matice.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Materials/Matice.h	(revision 3751)
@@ -46,8 +46,9 @@
 		double GetN();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");}
-
 		void    UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type){ISSMERROR("Not implemented yet!");}
 
Index: /issm/trunk/src/c/objects/Materials/Matpar.h
===================================================================
--- /issm/trunk/src/c/objects/Materials/Matpar.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Materials/Matpar.h	(revision 3751)
@@ -58,4 +58,6 @@
 		Object* copy();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Model.cpp
===================================================================
--- /issm/trunk/src/c/objects/Model.cpp	(revision 3750)
+++ /issm/trunk/src/c/objects/Model.cpp	(revision 3751)
@@ -313,6 +313,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type){
+/*FUNCTION Model::FindParamByAnalysisAndSub(bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
+int   Model::FindParamByAnalysisAndSub(bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type){
 	
 	FemModel* femmodel=NULL;
@@ -327,6 +327,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(int* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(int* pparameter,int enum_type,int analysis_type,int sub_analysis_type){
+/*FUNCTION Model::FindParamByAnalysisAndSub(int* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
+int   Model::FindParamByAnalysisAndSub(int* pparameter,int enum_type,int analysis_type,int sub_analysis_type){
 	
 	FemModel* femmodel=NULL;
@@ -341,6 +341,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(double* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(double* pparameter,int enum_type,int analysis_type,int sub_analysis_type){
+/*FUNCTION Model::FindParamByAnalysisAndSub(double* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
+int   Model::FindParamByAnalysisAndSub(double* pparameter,int enum_type,int analysis_type,int sub_analysis_type){
 	
 	FemModel* femmodel=NULL;
@@ -355,6 +355,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type){
+/*FUNCTION Model::FindParamByAnalysisAndSub(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
+int   Model::FindParamByAnalysisAndSub(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type){
 
 	FemModel* femmodel=NULL;
@@ -369,6 +369,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type){
+/*FUNCTION Model::FindParamByAnalysisAndSub(double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
+int   Model::FindParamByAnalysisAndSub(double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type){
 
 	FemModel* femmodel=NULL;
@@ -383,6 +383,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(char** pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(char** pparameter,int enum_type,int analysis_type,int sub_analysis_type){
+/*FUNCTION Model::FindParamByAnalysisAndSub(char** pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/
+int   Model::FindParamByAnalysisAndSub(char** pparameter,int enum_type,int analysis_type,int sub_analysis_type){
 
 	FemModel* femmodel=NULL;
@@ -397,6 +397,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(bool* pparameter,int enum_type,int analysis_type) {{{1*/
-int   Model::FindParam(bool* pparameter,int enum_type,int analysis_type){
+/*FUNCTION Model::FindParamByAnalysis(bool* pparameter,int enum_type,int analysis_type) {{{1*/
+int   Model::FindParamByAnalysis(bool* pparameter,int enum_type,int analysis_type){
 	
 	FemModel* femmodel=NULL;
@@ -411,6 +411,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(int* pparameter,int enum_type,int analysis_type) {{{1*/
-int   Model::FindParam(int* pparameter,int enum_type,int analysis_type){
+/*FUNCTION Model::FindParamByAnalysis(int* pparameter,int enum_type,int analysis_type) {{{1*/
+int   Model::FindParamByAnalysis(int* pparameter,int enum_type,int analysis_type){
 	
 	FemModel* femmodel=NULL;
@@ -425,6 +425,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(double* pparameter,int enum_type,int analysis_type) {{{1*/
-int   Model::FindParam(double* pparameter,int enum_type,int analysis_type){
+/*FUNCTION Model::FindParamByAnalysis(double* pparameter,int enum_type,int analysis_type) {{{1*/
+int   Model::FindParamByAnalysis(double* pparameter,int enum_type,int analysis_type){
 	
 	FemModel* femmodel=NULL;
@@ -439,6 +439,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type) {{{1*/
-int   Model::FindParam(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type){
+/*FUNCTION Model::FindParamByAnalysis(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type) {{{1*/
+int   Model::FindParamByAnalysis(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type){
 
 	FemModel* femmodel=NULL;
@@ -453,6 +453,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(double** pparameter,int* pM, int enum_type,int analysis_type) {{{1*/
-int   Model::FindParam(double** pparameter,int* pM, int enum_type,int analysis_type){
+/*FUNCTION Model::FindParamByAnalysis(double** pparameter,int* pM, int enum_type,int analysis_type) {{{1*/
+int   Model::FindParamByAnalysis(double** pparameter,int* pM, int enum_type,int analysis_type){
 
 	FemModel* femmodel=NULL;
@@ -467,6 +467,6 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(char** pparameter,int enum_type,int analysis_type) {{{1*/
-int   Model::FindParam(char** pparameter,int enum_type,int analysis_type){
+/*FUNCTION Model::FindParamByAnalysis(char** pparameter,int enum_type,int analysis_type) {{{1*/
+int   Model::FindParamByAnalysis(char** pparameter,int enum_type,int analysis_type){
 
 	FemModel* femmodel=NULL;
@@ -600,4 +600,22 @@
 }
 /*}}}1*/
+/*FUNCTION Model::UpdateInputsFromVector(Vec vector,int name, int type);{{{1*/
+void  Model::UpdateInputsFromVector(Vec vector,int name, int type){
+
+	int i;
+	FemModel* femmodel=NULL;
+	double* serial_vector=NULL;
+
+	if(vector==NULL)return; //don't bother
+
+	VecToMPISerial(&serial_vector,vector);
+
+	//call double* idential routine.
+	this->UpdateInputsFromVector(serial_vector,name,type);
+
+	/*Free ressources:*/
+	xfree((void**)&serial_vector);
+}
+/*}}}1*/
 /*FUNCTION Model::UpdateInputsFromSolution(double* vector,int analysis_type, int sub_analysis_type);{{{1*/
 void  Model::UpdateInputsFromSolution(double* vector,int analysis_type, int sub_analysis_type){
Index: /issm/trunk/src/c/objects/Model.h
===================================================================
--- /issm/trunk/src/c/objects/Model.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Model.h	(revision 3751)
@@ -42,22 +42,25 @@
 		int   FindParam(char** pparameter,int enum_type);
 
-		int   FindParam(bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type);
-		int   FindParam(int* pparameter,int enum_type,int analysis_type,int sub_analysis_type);
-		int   FindParam(double* pparameter,int enum_type,int analysis_type,int sub_analysis_type);
-		int   FindParam(double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type);
-		int   FindParam(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type);
-		int   FindParam(char** pparameter,int enum_type,int analysis_type,int sub_analysis_type);
+		int   FindParamByAnalysisAndSub(bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type);
+		int   FindParamByAnalysisAndSub(int* pparameter,int enum_type,int analysis_type,int sub_analysis_type);
+		int   FindParamByAnalysisAndSub(double* pparameter,int enum_type,int analysis_type,int sub_analysis_type);
+		int   FindParamByAnalysisAndSub(double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type);
+		int   FindParamByAnalysisAndSub(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type);
+		int   FindParamByAnalysisAndSub(char** pparameter,int enum_type,int analysis_type,int sub_analysis_type);
 
-		int   FindParam(bool* pparameter,int enum_type,int analysis_type);
-		int   FindParam(int* pparameter,int enum_type,int analysis_type);
-		int   FindParam(double* pparameter,int enum_type,int analysis_type);
-		int   FindParam(double** pparameter,int* pM,int enum_type,int analysis_type);
-		int   FindParam(double** pparameter,int* pM,int* pN,int enum_type,int analysis_type);
-		int   FindParam(char** pparameter,int enum_type,int analysis_type);
+		int   FindParamByAnalysis(bool* pparameter,int enum_type,int analysis_type);
+		int   FindParamByAnalysis(int* pparameter,int enum_type,int analysis_type);
+		int   FindParamByAnalysis(double* pparameter,int enum_type,int analysis_type);
+		int   FindParamByAnalysis(double** pparameter,int* pM,int enum_type,int analysis_type);
+		int   FindParamByAnalysis(double** pparameter,int* pM,int* pN,int enum_type,int analysis_type);
+		int   FindParamByAnalysis(char** pparameter,int enum_type,int analysis_type);
 
 		FemModel* GetFormulation(int analysis_type,int sub_analysis_type);
 		FemModel* GetFormulation(int analysis_type);
 
+		void    UpdateInputsFromVector(Vec vector, int name, int type);
 		void    UpdateInputsFromVector(double* vector, int name, int type);
+		void    UpdateInputsFromVector(int* vector, int name, int type);
+		void    UpdateInputsFromVector(bool* vector, int name, int type);
 		void    UpdateInputsFromConstant(double constant, int name);
 		void    UpdateInputsFromConstant(int constant, int name);
Index: /issm/trunk/src/c/objects/Node.h
===================================================================
--- /issm/trunk/src/c/objects/Node.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Node.h	(revision 3751)
@@ -52,4 +52,6 @@
 		void  SetVertexDof(int in_dof);
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Object.h
===================================================================
--- /issm/trunk/src/c/objects/Object.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Object.h	(revision 3751)
@@ -26,4 +26,6 @@
 		virtual Object* copy()=0;
 		virtual void  UpdateInputsFromVector(double* vector, int name, int type)=0;
+		virtual void  UpdateInputsFromVector(int* vector, int name, int type)=0;
+		virtual void  UpdateInputsFromVector(bool* vector, int name, int type)=0;
 		virtual void  UpdateInputsFromConstant(double constant, int name)=0;
 		virtual void  UpdateInputsFromConstant(int constant, int name)=0;
Index: /issm/trunk/src/c/objects/Params/BoolParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/BoolParam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Params/BoolParam.h	(revision 3751)
@@ -30,10 +30,9 @@
 class BoolParam: public Param{
 
-	private: 
+	public:
 		/*just hold 3 values for 3 vertices: */
 		int enum_type;
 		IssmBool value;
 
-	public:
 		/*constructors, destructors: {{{1*/
 		BoolParam();
@@ -52,4 +51,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Params/DoubleMatParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleMatParam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Params/DoubleMatParam.h	(revision 3751)
@@ -54,4 +54,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Params/DoubleParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleParam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Params/DoubleParam.h	(revision 3751)
@@ -52,4 +52,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Params/DoubleVecParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleVecParam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Params/DoubleVecParam.h	(revision 3751)
@@ -53,4 +53,6 @@
 		int   MyRank();
 		void  UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void  UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void  UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Params/IntParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/IntParam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Params/IntParam.h	(revision 3751)
@@ -52,4 +52,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Params/PetscMatParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/PetscMatParam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Params/PetscMatParam.h	(revision 3751)
@@ -52,4 +52,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Params/PetscVecParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/PetscVecParam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Params/PetscVecParam.h	(revision 3751)
@@ -52,4 +52,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Params/StringArrayParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/StringArrayParam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Params/StringArrayParam.h	(revision 3751)
@@ -54,4 +54,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Params/StringParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/StringParam.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Params/StringParam.h	(revision 3751)
@@ -52,4 +52,6 @@
 		int   MyRank();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Result.h
===================================================================
--- /issm/trunk/src/c/objects/Result.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Result.h	(revision 3751)
@@ -44,4 +44,6 @@
 		Object* copy();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/SolPar.h
===================================================================
--- /issm/trunk/src/c/objects/SolPar.h	(revision 3750)
+++ /issm/trunk/src/c/objects/SolPar.h	(revision 3751)
@@ -40,4 +40,6 @@
 		Object* copy();
 		void    UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/objects/Vertex.h
===================================================================
--- /issm/trunk/src/c/objects/Vertex.h	(revision 3750)
+++ /issm/trunk/src/c/objects/Vertex.h	(revision 3751)
@@ -51,4 +51,6 @@
 		void  UpdatePosition(double* thickness,double* bed);
 		void  UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void  UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void  UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");}
 		void    UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
Index: /issm/trunk/src/c/parallel/ControlInitialization.cpp
===================================================================
--- /issm/trunk/src/c/parallel/ControlInitialization.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/ControlInitialization.cpp	(revision 3751)
@@ -29,4 +29,8 @@
 	Vec slopex=NULL;
 	Vec slopey=NULL;
+	double* vx=NULL;
+	double* vy=NULL;
+	double* vz=NULL;
+	double* pressure=NULL;
 
 	/*flags: */
@@ -87,6 +91,6 @@
 
 	//Add in inputs
-	inputs->Add("bedslopex",slopex,numberofdofspernode_sl,numberofnodes);
-	inputs->Add("bedslopey",slopey,numberofdofspernode_sl,numberofnodes);
+	model->UpdateInputsFromVector(slopex,BedSlopexEnum,VertexEnum);
+	model->UpdateInputsFromVector(slopey,BedSlopeyEnum,VertexEnum);
 	VecFree(&slopex); VecFree(&slopey);
 
@@ -99,7 +103,12 @@
 	VecDuplicatePatch(&ug_horiz,ug); FieldExtrudex( ug_horiz,fem_dh->elements,fem_dh->nodes, fem_dh->vertices,fem_dh->loads,fem_dh-> materials,fem_dh->parameters,"velocity",1);
 
+	//Add to inputs:
+	SplitSolutionVector(ug_horiz,numberofnodes,numberofdofspernode_dh,&vx,&vy);
+	model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+	model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
+	
+
 	//vertical velocity
 	if(verbose)_printf_("%s\n"," computing vertical velocities...");
-	inputs->Add("velocity",ug_horiz,numberofdofspernode_dh,numberofnodes);
 	diagnostic_core_linear(&ug_vert,fem_dv,DiagnosticAnalysisEnum,VertAnalysisEnum);
 
@@ -120,5 +129,9 @@
 
 	//Add in inputs
-	inputs->Add("velocity",ug_stokes,numberofdofspernode_ds,numberofnodes);
+	SplitSolutionVector(ug_stokes,numberofnodes,numberofdofspernode_ds,&vx,&vy,&vz,&pressure);
+	model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+	model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
+	model->UpdateInputsFromVector(vz,VzEnum,VertexEnum);
+	model->UpdateInputsFromVector(pressure,PressureEnum,VertexEnum);
 	VecFree(&ug_stokes);
 
@@ -136,5 +149,10 @@
 
 	//Add in inputs
-	inputs->Add("velocity",ug,numberofdofspernode_ds,numberofnodes);
+	xfree((void**)&vx); xfree((void**)&vy); xfree((void**)&vz); xfree((void**)&pressure);
+	SplitSolutionVector(ug,numberofnodes,numberofdofspernode_ds,&vx,&vy,&vz,&pressure);
+	model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+	model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
+	model->UpdateInputsFromVector(vz,VzEnum,VertexEnum);
+	model->UpdateInputsFromVector(pressure,PressureEnum,VertexEnum);
 
 	/*Assign output*/
@@ -143,4 +161,8 @@
 	/*Free ressources:*/
 	xfree((void**)&dofset);
+	xfree((void**)&vx);
+	xfree((void**)&vy);
+	xfree((void**)&vz);
+	xfree((void**)&pressure);
 	VecFree(&ug);
 	VecFree(&ug_horiz);
Index: /issm/trunk/src/c/parallel/ControlRestart.cpp
===================================================================
--- /issm/trunk/src/c/parallel/ControlRestart.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/ControlRestart.cpp	(revision 3751)
@@ -6,4 +6,5 @@
 #include "./parallel.h"
 #include "../modules.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
 
 void ControlRestart(Model* model,double* param_g){
Index: /issm/trunk/src/c/parallel/balancedthickness.cpp
===================================================================
--- /issm/trunk/src/c/parallel/balancedthickness.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/balancedthickness.cpp	(revision 3751)
@@ -2,8 +2,4 @@
  * \brief: balancedthickness solution
  */ 
-
-#include "../modules.h"
-#include "./parallel.h"
-
 #ifdef HAVE_CONFIG_H
 	#include "config.h"
@@ -12,4 +8,10 @@
 #endif
 
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 int main(int argc,char* *argv){
Index: /issm/trunk/src/c/parallel/balancedthickness2.cpp
===================================================================
--- /issm/trunk/src/c/parallel/balancedthickness2.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/balancedthickness2.cpp	(revision 3751)
@@ -2,7 +2,4 @@
  * \brief: balancedthickness2 solution
  */ 
-
-#include "../modules.h"
-#include "./parallel.h"
 
 #ifdef HAVE_CONFIG_H
@@ -12,4 +9,10 @@
 #endif
 
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 int main(int argc,char* *argv){
Index: /issm/trunk/src/c/parallel/balancedthickness2_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/balancedthickness2_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/balancedthickness2_core.cpp	(revision 3751)
@@ -45,12 +45,13 @@
 
 	_printf_("depth averaging velocity...\n");
-	vx_g=inputs->Get("vx",&dofs[0],1);
-	vy_g=inputs->Get("vy",&dofs[0],1);
+	//vx_g=inputs->Get("vx",&dofs[0],1);
+	//vy_g=inputs->Get("vy",&dofs[0],1);
 	/* NOT WORKING YET....
 	FieldDepthAveragex(vx_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"vx");
 	FieldDepthAveragex(vy_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"vy");
 	*/
-	inputs->Add("vx_average",vx_g,1,numberofvertices);
-	inputs->Add("vy_average",vy_g,1,numberofvertices);
+	//inputs->Add("vx_average",vx_g,1,numberofvertices);
+	//inputs->Add("vy_average",vy_g,1,numberofvertices);
+	ISSMERROR("not supported yet!");
 	
 	_printf_("call computational core:\n");
Index: /issm/trunk/src/c/parallel/balancedthickness_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/balancedthickness_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/balancedthickness_core.cpp	(revision 3751)
@@ -43,7 +43,8 @@
 
 	_printf_("depth averaging velocity...\n");
-	u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity
-	FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity");
-	inputs->Add("velocity_average",u_g,2,numberofnodes);
+	//u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity
+	//FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity");
+	//inputs->Add("velocity_average",u_g,2,numberofnodes);
+	ISSMERROR("not supported yet!");
 	
 	_printf_("call computational core:\n");
Index: /issm/trunk/src/c/parallel/balancedvelocities.cpp
===================================================================
--- /issm/trunk/src/c/parallel/balancedvelocities.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/balancedvelocities.cpp	(revision 3751)
@@ -2,7 +2,4 @@
  * \brief: balancedvelocities solution
  */ 
-
-#include "../modules.h"
-#include "./parallel.h"
 
 #ifdef HAVE_CONFIG_H
@@ -12,4 +9,10 @@
 #endif
 
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 int main(int argc,char* *argv){
Index: /issm/trunk/src/c/parallel/balancedvelocities_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/balancedvelocities_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/balancedvelocities_core.cpp	(revision 3751)
@@ -42,7 +42,8 @@
 
 	_printf_("depth averaging velocity...\n");
-	u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity
-	FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity");
-	inputs->Add("velocity_average",u_g,2,numberofnodes);
+	//u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity
+	//FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity");
+	//inputs->Add("velocity_average",u_g,2,numberofnodes);
+	ISSMERROR(" not supported yet!");
 	
 	_printf_("call computational core:\n");
Index: /issm/trunk/src/c/parallel/control_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/control_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/control_core.cpp	(revision 3751)
@@ -25,5 +25,5 @@
 	Vec     m_g=NULL;
 	double  search_scalar;
-	int     control_type=NULL;
+	int     control_type;
 	double* fit=NULL;
 	double* optscal=NULL;
@@ -52,5 +52,5 @@
 	int     control_steady;
 	int verbose=0;
-	int convergence=0;
+	int converged=0;
 	int numberofnodes;
 
@@ -86,5 +86,5 @@
 		_printf_("\n%s%i%s%i\n","   control method step ",n+1,"/",nsteps);
 		model->UpdateInputsFromVector(param_g,control_type,VertexEnum);
-		model->UpdateInputsFromVector(&fit[n],FitEnum,ConstantEnum);
+		model->UpdateInputsFromConstant(fit[n],FitEnum);
 		
 		/*In case we are running a steady state control method, compute new temperature field using new parameter 
@@ -169,5 +169,5 @@
 					if ((J[i]-J[n])/J[n] <= eps_cm){
 						//convergence if convergence criteria fullfilled
-						convergence=1;
+						converged=1;
 						_printf_("%s%g%s%g\n","      Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],"<",eps_cm);
 					}
@@ -181,5 +181,5 @@
 		}
 		//stop if convergence has been reached
-		if(convergence) break;
+		if(converged) break;
 
 		//some temporary saving
@@ -206,5 +206,5 @@
 	}
 	else{
-		inputs->Add(control_type,param_g,1,numberofnodes);
+		model->UpdateInputsFromVector(param_g,control_type,VertexEnum);
 		diagnostic_results=new DataSet(ResultsEnum); 
 		diagnostic_core(diagnostic_results,model);
Index: /issm/trunk/src/c/parallel/convergence.cpp
===================================================================
--- /issm/trunk/src/c/parallel/convergence.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/convergence.cpp	(revision 3751)
@@ -7,5 +7,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void convergence(double* pconverged, Mat Kff,Vec pf,Vec uf,Vec old_uf,Parameters* parameters){
+void convergence(int* pconverged, Mat Kff,Vec pf,Vec uf,Vec old_uf,Parameters* parameters){
 
 	/*output*/
Index: /issm/trunk/src/c/parallel/diagnostic.cpp
===================================================================
--- /issm/trunk/src/c/parallel/diagnostic.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/diagnostic.cpp	(revision 3751)
@@ -2,9 +2,4 @@
  * \brief: diagnostic solution
  */ 
-
-#include "../objects/objects.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "./parallel.h"
 
 #ifdef HAVE_CONFIG_H
@@ -14,4 +9,10 @@
 #endif
 
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 int main(int argc,char* *argv){
Index: /issm/trunk/src/c/parallel/diagnostic_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/diagnostic_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/diagnostic_core.cpp	(revision 3751)
@@ -31,6 +31,4 @@
 	Vec ug_stokes=NULL;
 	Vec pg=NULL;
-	Vec slopex=NULL;
-	Vec slopey=NULL;
 	Vec riftproperties=NULL;
 	double* u_g_initial=NULL;
@@ -52,4 +50,10 @@
 	int numrifts=0;
 
+	/*slopes: */
+	Vec surfaceslopex=NULL;
+	Vec surfaceslopey=NULL;
+	Vec bedslopex=NULL;
+	Vec bedslopey=NULL;
+
 	double stokesreconditioning;
 
@@ -87,12 +91,12 @@
 	//for qmu analysis, be sure the velocity input we are starting from  is the one in the parameters: */
 	if(qmu_analysis){
-		model->FindParam(&vx,&dummy,VxEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
-		model->FindParam(&vy,&dummy,VyEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
-		model->FindParam(&vz,&dummy,VzEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vz,VzEnum,VertexEnum);
+		model->FindParamByAnalysisAndSub(&vx,&dummy,VxEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+		model->FindParamByAnalysisAndSub(&vy,&dummy,VyEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
+		model->FindParamByAnalysisAndSub(&vz,&dummy,VzEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vz,VzEnum,VertexEnum);
 	}
 
 	/*Compute slopes: */
-	slope_core(&surfaceslopex,&surfaceslopey,model,SurfaceAnalysisEnum);
-	slope_core(&bedslopex,&bedslopey,model,BedAnalysisEnum);
+	slope_core(&surfaceslopex,&surfaceslopey,fem_sl,SurfaceAnalysisEnum);
+	slope_core(&bedslopex,&bedslopey,fem_sl,BedAnalysisEnum);
 		
 	/*Update: */
@@ -102,4 +106,5 @@
 	model->UpdateInputsFromVector(bedslopey,BedSlopeyEnum,VertexEnum);
 
+	
 	if(ishutter){
 			
@@ -189,4 +194,10 @@
 	xfree((void**)&dofset);
 	xfree((void**)&u_g_initial);
+	
+	VecFree(&surfaceslopex);
+	VecFree(&surfaceslopey);
+	VecFree(&bedslopex);
+	VecFree(&bedslopey);
+
 
 }
Index: /issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp
===================================================================
--- /issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp	(revision 3751)
@@ -110,5 +110,5 @@
 		
 		/*add converged to inputs: */
-		fem->UpdateInputsFromVector(&converged,ConvergedEnum,ConstantEnum);
+		fem->UpdateInputsFromConstant(converged,ConvergedEnum);
 
 		//rift convergence
Index: /issm/trunk/src/c/parallel/gradjcompute_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/gradjcompute_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/gradjcompute_core.cpp	(revision 3751)
@@ -13,5 +13,5 @@
 #endif
 
-void gradjcompute_core(DataSet* results,Model* model, ParameterInputs* inputs){
+void gradjcompute_core(DataSet* results,Model* model){
 	
 	
@@ -28,5 +28,4 @@
 	
 	Vec u_g=NULL;
-	double* u_g_double=NULL;
 
 	Vec du_g=NULL;
@@ -36,5 +35,9 @@
 	Vec lambda_f=NULL;
 	Vec lambda_g=NULL;
-	double* lambda_g_double=NULL;
+	double* lambdax=NULL;
+	double* lambday=NULL;
+	double* vx=NULL;
+	double* vy=NULL;
+	double* vz=NULL;
 
 	Mat K_ff0=NULL;
@@ -63,10 +66,8 @@
 
 	_printf_("%s\n","      recover solution for this stiffness and right hand side:");
-	diagnostic_core_nonlinear(&u_g,&K_ff0,&K_fs0,NULL, femmodel,inputs,DiagnosticAnalysisEnum,sub_analysis_type);
-	VecToMPISerial(&u_g_double,u_g); VecFree(&u_g);
-	inputs->Add("velocity",u_g_double,numberofdofspernode,numberofnodes);
+	diagnostic_core_nonlinear(&u_g,&K_ff0,&K_fs0,NULL, femmodel,DiagnosticAnalysisEnum,sub_analysis_type);
 
 	_printf_("%s\n","      buid Du, difference between observed velocity and model velocity:");
-	Dux( &du_g, femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,inputs,analysis_type,sub_analysis_type);
+	Dux( &du_g, femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,analysis_type,sub_analysis_type);
 
 	_printf_("%s\n","      reduce adjoint load from g-set to f-set:");
@@ -82,10 +83,13 @@
 	VecFree(&lambda_f);
 
+	/*add to inputs: */
+	SplitSolutionVector(lambda_g,numberofnodes,numberofdofspernode,&lambdax,&lambday);
+	model->UpdateInputsFromVector(lambdax,AdjointxEnum,VertexEnum);
+	model->UpdateInputsFromVector(lambday,AdjointyEnum,VertexEnum);
+	VecFree(&lambda_g);
+	
 	_printf_("%s\n","      compute gradJ:");
-	VecToMPISerial(&lambda_g_double,lambda_g);VecFree(&lambda_g);
-	inputs->Add("adjoint",lambda_g_double,numberofdofspernode,numberofnodes);
-
 	Gradjx( &grad_g, numberofnodes,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters, 
-				inputs,analysis_type,sub_analysis_type,control_type);
+				analysis_type,sub_analysis_type,control_type);
 
 	if (dim==3 && extrude_param){
@@ -97,9 +101,14 @@
 	if(control_steady){
 		diagnostic_results=new DataSet(ResultsEnum); 
-		diagnostic_core(diagnostic_results,model, inputs);
+		diagnostic_core(diagnostic_results,model);
 
 		//extract u_g and add it to input (3d velocity needed by thermal_core)
 		diagnostic_results->FindResult(&u_g,"u_g");
-		inputs->Add("velocity",u_g,3,numberofnodes);
+		
+		SplitSolutionVector(u_g,numberofnodes,3,&vx,&vy,&vz);
+		model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+		model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
+		model->UpdateInputsFromVector(vz,VzEnum,VertexEnum);
+
 		delete diagnostic_results;
 	}
@@ -114,6 +123,9 @@
 	xfree((void**)&solverstring);
 	xfree((void**)&control_type);
-	xfree((void**)&u_g_double);
-	xfree((void**)&lambda_g_double);
+	xfree((void**)&lambdax);
+	xfree((void**)&lambday);
+	xfree((void**)&vx);
+	xfree((void**)&vy);
+	xfree((void**)&vz);
 
 }
Index: /issm/trunk/src/c/parallel/objectivefunctionC.cpp
===================================================================
--- /issm/trunk/src/c/parallel/objectivefunctionC.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/objectivefunctionC.cpp	(revision 3751)
@@ -5,4 +5,5 @@
 #include "../modules.h"
 #include "./parallel.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
 
 #ifdef HAVE_CONFIG_H
@@ -25,5 +26,4 @@
 	double* param_g=NULL;
 	double* grad_g=NULL;
-	ParameterInputs* inputs=NULL;
 	int numberofdofspernode;
 	int n;
@@ -35,5 +35,5 @@
 	double  cm_min;
 	double  cm_max;
-	char*   control_type=NULL;
+	int   control_type;
 	double* param_g_copy=NULL;
 	int     analysis_type;
@@ -43,4 +43,7 @@
 	Vec     u_g_full=NULL;
 	double* u_g_double=NULL;
+	double* vx=NULL;
+	double* vy=NULL;
+	double* vz=NULL;
 	int     numberofnodes;
 		
@@ -59,10 +62,8 @@
 	param_g=optargs->param_g;
 	grad_g=optargs->grad_g;
-	inputs=optargs->inputs;
 	n=optargs->n;
 
 	gsize=femmodel->nodesets->GetGSize();
 	femmodel->parameters->FindParam(&optscal,NULL,NULL,OptScalEnum);
-	femmodel->parameters->FindParam(&control_type,ControlTypeEnum);
 	femmodel->parameters->FindParam(&fit,NULL,NULL,FitEnum);
 	femmodel->parameters->FindParam(&cm_min,CmMinEnum);
@@ -87,34 +88,40 @@
 
 	/*Add new parameter to inputs: */
-	inputs->Add(control_type,param_g_copy,1,numberofnodes);
+	femmodel->UpdateInputsFromVector(param_g_copy,control_type,VertexEnum);
 
 	/*Run diagnostic with updated parameters.*/
 	if(!control_steady){
-		diagnostic_core_nonlinear(&u_g,NULL,NULL,NULL,femmodel,inputs,DiagnosticAnalysisEnum,sub_analysis_type);
-		VecToMPISerial(&u_g_double,u_g); VecFree(&u_g);
-		inputs->Add("velocity",u_g_double,numberofdofspernode,numberofnodes);
+		diagnostic_core_nonlinear(&u_g,NULL,NULL,NULL,femmodel,DiagnosticAnalysisEnum,sub_analysis_type); 
+		femmodel->UpdateInputsFromSolution(u_g,DiagnosticAnalysisEnum,sub_analysis_type);
+		VecFree(&u_g);
 	}
 	else{
 		//We need a 3D velocity!! (vz is required for the next thermal run)
 		diagnostic_results=new DataSet(ResultsEnum); 
-		diagnostic_core(diagnostic_results,model, inputs);
+		diagnostic_core(diagnostic_results,model);
 
 		//extract u_g and add it to input (3d velocity needed by thermal_core)
 		diagnostic_results->FindResult(&u_g,"u_g");
-		inputs->Add("velocity",u_g,3,numberofnodes);
+		
+		SplitSolutionVector(u_g,numberofnodes,3,&vx,&vy,&vz);
+		femmodel->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+		femmodel->UpdateInputsFromVector(vy,VxEnum,VertexEnum);
+		femmodel->UpdateInputsFromVector(vz,VxEnum,VertexEnum);
+		
 		delete diagnostic_results;
 	}
 
 	/*Compute misfit for this velocity field.*/
-	inputs->Add("fit",fit[n]);
-	CostFunctionx( &J, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters,inputs,analysis_type,sub_analysis_type);
+	femmodel->UpdateInputsFromConstant(fit[n],FitEnum);
+	CostFunctionx( &J, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters,analysis_type,sub_analysis_type);
 
 	/*Free ressources:*/
 	xfree((void**)&fit);
 	xfree((void**)&optscal);
-	xfree((void**)&control_type);
 	xfree((void**)&param_g_copy);
-	xfree((void**)&u_g_double);
 	xfree((void**)&dofset);
+	xfree((void**)&vx);
+	xfree((void**)&vy);
+	xfree((void**)&vz);
 
 	return J;
Index: /issm/trunk/src/c/parallel/prognostic.cpp
===================================================================
--- /issm/trunk/src/c/parallel/prognostic.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/prognostic.cpp	(revision 3751)
@@ -2,7 +2,4 @@
  * \brief: prognostic solution
  */ 
-
-#include "../modules.h"
-#include "./parallel.h"
 
 #ifdef HAVE_CONFIG_H
@@ -12,4 +9,10 @@
 #endif
 
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 int main(int argc,char* *argv){
@@ -32,5 +35,4 @@
 	Result*  result=NULL;
 
-	ParameterInputs* inputs=NULL;
 	Param*   param=NULL;
 
@@ -83,5 +85,5 @@
 		_printf_("call computational core:\n");
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-		prognostic_core(results,model,inputs);
+		prognostic_core(results,model);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 
@@ -94,5 +96,5 @@
 		#ifdef _HAVE_DAKOTA_ 
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-		Qmux(model,inputs,PrognosticAnalysisEnum,NoneAnalysisEnum);
+		Qmux(model,PrognosticAnalysisEnum,NoneAnalysisEnum);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 	 	#else
@@ -120,5 +122,4 @@
 	delete results;
 	delete model;
-	delete inputs;
 
 	/*Get finish time and close*/
Index: /issm/trunk/src/c/parallel/prognostic2.cpp
===================================================================
--- /issm/trunk/src/c/parallel/prognostic2.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/prognostic2.cpp	(revision 3751)
@@ -2,7 +2,4 @@
  * \brief: prognostic2 solution
  */ 
-
-#include "../modules.h"
-#include "./parallel.h"
 
 #ifdef HAVE_CONFIG_H
@@ -12,4 +9,10 @@
 #endif
 
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 int main(int argc,char* *argv){
@@ -32,5 +35,4 @@
 	Result*  result=NULL;
 
-	ParameterInputs* inputs=NULL;
 	Param*   param=NULL;
 
@@ -84,5 +86,5 @@
 		_printf_("call computational core:\n");
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-		prognostic2_core(results,model,inputs);
+		prognostic2_core(results,model);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 
@@ -95,5 +97,5 @@
 		#ifdef _HAVE_DAKOTA_ 
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-		Qmux(model,inputs,Prognostic2AnalysisEnum,NoneAnalysisEnum);
+		Qmux(model,Prognostic2AnalysisEnum,NoneAnalysisEnum);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 	 	#else
@@ -121,5 +123,4 @@
 	delete results;
 	delete model;
-	delete inputs;
 
 	/*Get finish time and close*/
Index: /issm/trunk/src/c/parallel/prognostic2_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/prognostic2_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/prognostic2_core.cpp	(revision 3751)
@@ -10,5 +10,5 @@
 #include "../modules.h"
 
-void prognostic2_core(DataSet* results,Model* model,ParameterInputs* inputs){
+void prognostic2_core(DataSet* results,Model* model){
 
 	extern int my_rank;
@@ -47,5 +47,5 @@
 	
 	_printf_("call computational core:\n");
-	diagnostic_core_linear(&h_g,fem_p,inputs,Prognostic2AnalysisEnum,NoneAnalysisEnum);
+	diagnostic_core_linear(&h_g,fem_p,Prognostic2AnalysisEnum,NoneAnalysisEnum);
 
 	_printf_("Averaging over vertices:\n");
Index: /issm/trunk/src/c/parallel/prognostic_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/prognostic_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/prognostic_core.cpp	(revision 3751)
@@ -10,5 +10,5 @@
 #include "../modules.h"
 
-void prognostic_core(DataSet* results,Model* model,ParameterInputs* inputs){
+void prognostic_core(DataSet* results,Model* model){
 
 	extern int my_rank;
@@ -42,10 +42,11 @@
 
 	_printf_("depth averaging velocity...\n");
-	u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity
+	//u_g=inputs->Get("velocity",&dofs[0],2); 
+	ISSMERROR("not supported yet!");
 	FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity");
-	inputs->Add("velocity_average",u_g,2,numberofnodes);
+	//inputs->Add("velocity_average",u_g,2,numberofnodes);
 	
 	_printf_("call computational core:\n");
-	diagnostic_core_linear(&h_g,fem_p,inputs,PrognosticAnalysisEnum,NoneAnalysisEnum);
+	diagnostic_core_linear(&h_g,fem_p,PrognosticAnalysisEnum,NoneAnalysisEnum);
 
 	_printf_("extrude computed thickness on all layers:\n");
Index: /issm/trunk/src/c/parallel/slope_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/slope_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/slope_core.cpp	(revision 3751)
@@ -3,4 +3,5 @@
  */ 
 
+#include "./parallel.h"
 #include "../toolkits/toolkits.h"
 #include "../objects/objects.h"
@@ -8,9 +9,11 @@
 #include "../modules.h"
 
-void slope_core(Vec* pslopex,Vec* pslopey,Model* model,int AnalysisEnum){
+void slope_core(Vec* pslopex,Vec* pslopey,FemModel* fem, int AnalysisEnum){
 
 	/*parameters: */
 	int verbose;
 	int dim;
+	bool isstokes;
+	bool ishutter;
 	int xanalysis;
 	int yanalysis;
@@ -20,16 +23,9 @@
 	Vec slopey=NULL; 
 
-	/*femmodel used to compute slopes: */
-	FemModel* fem=NULL;
-
-	/*Recover fem model: */
-	fem=model->fem_sl;
-
-
 	/*Recover some parameters: */
-	model->parameters->FindParam(&verbose,VerboseEnum);
-	model->parameters->FindParam(&dim,DimEnum);
-	model->parameters->FindParam(&isstokes,DimEnum);
-	model->parameters->FindParam(&ishutter,DimEnum);
+	fem->parameters->FindParam(&verbose,VerboseEnum);
+	fem->parameters->FindParam(&dim,DimEnum);
+	fem->parameters->FindParam(&isstokes,DimEnum);
+	fem->parameters->FindParam(&ishutter,DimEnum);
 
 	if(verbose)_printf_("%s\n","computing surface slope (x and y derivatives)...");
Index: /issm/trunk/src/c/parallel/slopecompute.cpp
===================================================================
--- /issm/trunk/src/c/parallel/slopecompute.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/slopecompute.cpp	(revision 3751)
@@ -2,7 +2,4 @@
  * \brief: slopecompute solution
  */ 
-
-#include "../modules.h"
-#include "./parallel.h"
 
 #ifdef HAVE_CONFIG_H
@@ -11,4 +8,11 @@
 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
 #endif
+
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 
@@ -30,5 +34,4 @@
 	Result*  result=NULL;
 
-	ParameterInputs* inputs=NULL;
 	Param*   param=NULL;
 
@@ -80,5 +83,5 @@
 	_printf_("call computational core:\n");
 	MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-	slopecompute_core(results,model,inputs);
+	slopecompute_core(results,model);
 	MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 
@@ -102,5 +105,4 @@
 	delete results;
 	delete model;
-	delete inputs;
 
 	/*Get finish time and close*/
Index: /issm/trunk/src/c/parallel/slopecompute_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/slopecompute_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/slopecompute_core.cpp	(revision 3751)
@@ -10,5 +10,5 @@
 #include "../modules.h"
 
-void slopecompute_core(DataSet* results,Model* model,ParameterInputs* inputs){
+void slopecompute_core(DataSet* results,Model* model){
 
 	extern int my_rank;
@@ -39,6 +39,6 @@
 
 	_printf_("call computational core:\n");
-	diagnostic_core_linear(&sx_g,fem_sl,inputs,SlopecomputeAnalysisEnum,SurfaceXAnalysisEnum);
-	diagnostic_core_linear(&sy_g,fem_sl,inputs,SlopecomputeAnalysisEnum,SurfaceYAnalysisEnum);
+	diagnostic_core_linear(&sx_g,fem_sl,SlopecomputeAnalysisEnum,SurfaceXAnalysisEnum);
+	diagnostic_core_linear(&sy_g,fem_sl,SlopecomputeAnalysisEnum,SurfaceYAnalysisEnum);
 
 	_printf_("extrude computed slope on all layers:\n");
Index: /issm/trunk/src/c/parallel/steadystate.cpp
===================================================================
--- /issm/trunk/src/c/parallel/steadystate.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/steadystate.cpp	(revision 3751)
@@ -2,7 +2,4 @@
  * \brief: steadystate solution
  */ 
-
-#include "../modules.h"
-#include "./parallel.h"
 
 #ifdef HAVE_CONFIG_H
@@ -12,4 +9,10 @@
 #endif
 
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 int main(int argc,char* *argv){
@@ -35,5 +38,4 @@
 	Result* result=NULL;
 	
-	ParameterInputs* inputs=NULL;
 	double           waitonlock=0;
 	
@@ -43,5 +45,5 @@
 	double* weights=NULL;
 	double  dt;
-	Param*  param=NULL;
+	BoolParam*  param=NULL;
 
 	/*time*/
@@ -114,5 +116,5 @@
 			_printf_("call computational core:\n");
 			MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-			steadystate_core(results,model,inputs);
+			steadystate_core(results,model);
 			MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 
@@ -128,12 +130,12 @@
 			fem_dh=model->GetFormulation(DiagnosticAnalysisEnum,HorizAnalysisEnum);
 			fem_ds=model->GetFormulation(DiagnosticAnalysisEnum,StokesAnalysisEnum);
-			param=(Param*)fem_dh->parameters->FindParamObject(ControlSteadyEnum);
-			param->SetDouble(1);
-			param=(Param*)fem_ds->parameters->FindParamObject(ControlSteadyEnum);
-			param->SetDouble(1);
+
+			param=(BoolParam*)fem_dh->parameters->FindParamObject(ControlSteadyEnum); param->value=true;
+			param=(BoolParam*)fem_ds->parameters->FindParamObject(ControlSteadyEnum); param->value=true;
+
 			/*run control analysis: */
 			_printf_("call computational core:\n");
 			MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-			control_core(results,model,inputs);
+			control_core(results,model);
 			MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 
@@ -159,5 +161,5 @@
 		#ifdef _HAVE_DAKOTA_ 
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-		Qmux(model,inputs,SteadystateAnalysisEnum,NoneAnalysisEnum);
+		Qmux(model,SteadystateAnalysisEnum,NoneAnalysisEnum);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 	 	#else
@@ -178,5 +180,4 @@
 	delete results;
 	delete processed_results;
-	delete inputs;
 
 	/*Get finish time and close*/
Index: /issm/trunk/src/c/parallel/steadystate_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/steadystate_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/steadystate_core.cpp	(revision 3751)
@@ -10,5 +10,5 @@
 #include "../modules.h"
 
-void steadystate_core(DataSet* results,Model* model, ParameterInputs* inputs){
+void steadystate_core(DataSet* results,Model* model){
 
 	extern int my_rank;
@@ -78,9 +78,6 @@
 
 		//first compute temperature at steady state.
-		if (step>1){
-			inputs->Add("velocity",u_g,ndof,numberofnodes);
-		}
 		results_thermal=new DataSet(ResultsEnum); 
-		thermal_core(results_thermal,model,inputs);
+		thermal_core(results_thermal,model);
 	
 		//get t_g and m_g;
@@ -93,11 +90,11 @@
 		VecDuplicatePatch(&t_g_average,t_g); 
 		FieldDepthAveragex( t_g_average, fem_t->elements,fem_t->nodes, fem_t->vertices,fem_t->loads, fem_t->materials,fem_t->parameters,"temperature");
-		inputs->Add("temperature_average",t_g_average,1,numberofnodes);
-		inputs->Add("temperature",t_g,1,numberofnodes);
+		model->UpdateInputsFromVector(t_g_average,TemperatureAverageEnum,VertexEnum);
+		model->UpdateInputsFromVector(t_g,TemperatureEnum,VertexEnum);
 		VecFree(&t_g_average); //not needed anymore
 
 		//now compute diagnostic velocity using the steady state temperature.
 		results_diagnostic=new DataSet(ResultsEnum);
-		diagnostic_core(results_diagnostic,model, inputs);
+		diagnostic_core(results_diagnostic,model);
 
 		//get p_g and u_g
Index: /issm/trunk/src/c/parallel/thermal.cpp
===================================================================
--- /issm/trunk/src/c/parallel/thermal.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/thermal.cpp	(revision 3751)
@@ -2,7 +2,4 @@
  * \brief: thermal solution
  */ 
-
-#include "../modules.h"
-#include "./parallel.h"
 
 #ifdef HAVE_CONFIG_H
@@ -11,4 +8,11 @@
 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
 #endif
+
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 int main(int argc,char* *argv){
@@ -33,5 +37,4 @@
 	Result*  result=NULL;
 	
-	ParameterInputs* inputs=NULL;
 	Param*           param=NULL;
 	double  dt;
@@ -87,5 +90,5 @@
 		_printf_("call computational core:\n");
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-		thermal_core(results,model,inputs);
+		thermal_core(results,model);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 
@@ -106,5 +109,5 @@
 		#ifdef _HAVE_DAKOTA_ 
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-		Qmux(model,inputs,ThermalAnalysisEnum,NoneAnalysisEnum);
+		Qmux(model,ThermalAnalysisEnum,NoneAnalysisEnum);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 	 	#else
@@ -122,5 +125,4 @@
 	delete results;
 	delete processed_results;
-	delete inputs;
 
 	/*Get finish time and close*/
Index: /issm/trunk/src/c/parallel/thermal_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/thermal_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/thermal_core.cpp	(revision 3751)
@@ -10,5 +10,5 @@
 #include "../modules.h"
 
-void thermal_core(DataSet* results,Model* model, ParameterInputs* inputs){
+void thermal_core(DataSet* results,Model* model){
 
 	extern int my_rank;
@@ -65,10 +65,10 @@
 
 		if(verbose)_printf_("computing temperatures:\n");
-		thermal_core_nonlinear(&t_g[0],&melting_offset,fem_t,inputs,ThermalAnalysisEnum,NoneAnalysisEnum);
-		inputs->Add("temperature",t_g[0],1,numberofnodes);
-		inputs->Add("melting_offset",melting_offset);
+		thermal_core_nonlinear(&t_g[0],&melting_offset,fem_t,ThermalAnalysisEnum,NoneAnalysisEnum);
+		model->UpdateInputsFromVector(t_g[0],TemperatureEnum,VertexEnum);
+		model->UpdateInputsFromConstant(melting_offset,MeltingOffsetEnum);
 		
 		if(verbose)_printf_("computing melting:\n");
-		diagnostic_core_linear(&m_g[0],fem_m,inputs,MeltingAnalysisEnum,NoneAnalysisEnum);
+		diagnostic_core_linear(&m_g[0],fem_m,MeltingAnalysisEnum,NoneAnalysisEnum);
 	}
 	else{
@@ -86,5 +86,5 @@
 		t_g[0]=SerialToVec(t_g_serial,numberofnodes);
 		xfree((void**)&t_g_serial);
-		fem_m->FindParam(&m_g_serial,NULL,NULL,MeltingEnum);
+		fem_m->FindParam(&m_g_serial,NULL,NULL,MeltingRateEnum);
 		m_g[0]=SerialToVec(m_g_serial,numberofnodes);
 		xfree((void**)&m_g_serial);
@@ -95,11 +95,11 @@
 			
 			if(verbose)_printf_("computing temperatures:\n");
-			inputs->Add("temperature",t_g[i],1,numberofnodes);
-			thermal_core_nonlinear(&t_g[i+1],&melting_offset,fem_t,inputs,ThermalAnalysisEnum,NoneAnalysisEnum);
+			model->UpdateInputsFromVector(t_g[i],TemperatureEnum,VertexEnum);
+			thermal_core_nonlinear(&t_g[i+1],&melting_offset,fem_t,ThermalAnalysisEnum,NoneAnalysisEnum);
 			
 			if(verbose)_printf_("computing melting:\n");
-			inputs->Add("temperature",t_g[i+1],1,numberofnodes);
-			inputs->Add("melting_offset",melting_offset);
-			diagnostic_core_linear(&m_g[i+1],fem_m,inputs,MeltingAnalysisEnum,NoneAnalysisEnum);
+			model->UpdateInputsFromVector(t_g[i+1],TemperatureEnum,VertexEnum);
+			model->UpdateInputsFromConstant(melting_offset,MeltingOffsetEnum);
+			diagnostic_core_linear(&m_g[i+1],fem_m,MeltingAnalysisEnum,NoneAnalysisEnum);
 		}
 	}
Index: /issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp
===================================================================
--- /issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp	(revision 3751)
@@ -31,4 +31,5 @@
 	int numberofnodes;
 	int min_thermal_constraints;
+	bool reset_penalties;
 
 	/*parameters:*/
@@ -57,5 +58,5 @@
 
 		if(count==1) reset_penalties=1; else reset_penalties=0;
-		fem->UpdateInputsFromVector(&reset_penalties,ResetPenaltiesEnum,ConstantEnum);
+		fem->UpdateInputsFromConstant(reset_penalties,ResetPenaltiesEnum);
 
 		//*Generate system matrices
@@ -109,7 +110,7 @@
 		//Deal with penalty loads
 		if (verbose) _printf_("   penalty constraints\n");
-		PenaltyConstraintsx(&constraints_converged, &num_unstable_constraints, fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,inputs,analysis_type,sub_analysis_type); 
+		PenaltyConstraintsx(&constraints_converged, &num_unstable_constraints, fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,analysis_type,sub_analysis_type); 
 		
-		inputs->Add("temperature",tg,numberofdofspernode,numberofnodes);
+		fem->UpdateInputsFromVector(tg,TemperatureEnum,VertexEnum);
 
 		if (!converged){
Index: /issm/trunk/src/c/parallel/transient.cpp
===================================================================
--- /issm/trunk/src/c/parallel/transient.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/transient.cpp	(revision 3751)
@@ -2,7 +2,4 @@
  * \brief: transient solution
  */ 
-
-#include "../modules.h"
-#include "./parallel.h"
 
 #ifdef HAVE_CONFIG_H
@@ -12,4 +9,10 @@
 #endif
 
+#include "../objects/objects.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../include/globals.h"
+#include "./parallel.h"
 
 int main(int argc,char* *argv){
@@ -33,7 +36,4 @@
 	Result*  result=NULL;
 	
-	ParameterInputs* inputs=NULL;
-	
-	/*inputs: */
 	Param*  param=NULL;
 
@@ -111,5 +111,5 @@
 		_printf_("call computational core:\n");
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-		transient_core(results,model,inputs);
+		transient_core(results,model);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 	
@@ -130,5 +130,5 @@
 		#ifdef _HAVE_DAKOTA_ 
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
-		Qmux(model,inputs,TransientAnalysisEnum,NoneAnalysisEnum);
+		Qmux(model,TransientAnalysisEnum,NoneAnalysisEnum);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 	 	#else
@@ -146,5 +146,4 @@
 	delete processed_results;
 	delete model;
-	delete inputs;
 
 	/*Get finish time and close*/
Index: /issm/trunk/src/c/parallel/transient_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/transient_core.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/transient_core.cpp	(revision 3751)
@@ -10,5 +10,5 @@
 #include "../modules.h"
 
-void transient_core(DataSet* results,Model* model, ParameterInputs* inputs){
+void transient_core(DataSet* results,Model* model){
 
 	extern int my_rank;
@@ -21,8 +21,8 @@
 	//branch out 
 	if(dim==2){
-		transient_core_2d(results,model,inputs);
+		transient_core_2d(results,model);
 	}
 	else if(dim==3){
-		transient_core_3d(results,model,inputs);
+		transient_core_3d(results,model);
 	}
 	else ISSMERROR("%s%i%s"," dimension ",dim," not supported yet!");
Index: /issm/trunk/src/c/parallel/transient_core_2d.cpp
===================================================================
--- /issm/trunk/src/c/parallel/transient_core_2d.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/transient_core_2d.cpp	(revision 3751)
@@ -10,5 +10,5 @@
 #include "../modules.h"
 
-void transient_core_2d(DataSet* results,Model* model, ParameterInputs* inputs){
+void transient_core_2d(DataSet* results,Model* model){
 
 	extern int my_rank;
@@ -38,4 +38,6 @@
 	Vec b_g=NULL;
 	Vec new_b_g=NULL;
+	double* vx=NULL;
+	double* vy=NULL;
 
 	/*intermediary: */
@@ -85,5 +87,5 @@
 		_printf_("%s\n","computing new velocity");
 		diagnostic_results=new DataSet(ResultsEnum); 
-		diagnostic_core(diagnostic_results,model, inputs);
+		diagnostic_core(diagnostic_results,model);
 
 		//extract u_g and p_g from diagnostic_results, and erase diagnostic_results;
@@ -95,7 +97,11 @@
 		_printf_("%s\n","computing new thickness");
 		
-		inputs->Add("velocity",u_g,2,numberofnodes);
+		SplitSolutionVector(u_g,numberofnodes,2,&vx,&vy);
+		model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+		model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
+		xfree((void**)&vx); xfree((void**)&vy);
+		
 		prognostic_results=new DataSet(ResultsEnum); 
-		prognostic_core(prognostic_results,model, inputs);
+		prognostic_core(prognostic_results,model);
 	
 		//extract h_g prognostic_results, and erase prognostic_results;
@@ -120,8 +126,11 @@
 
 		//update inputs
-		inputs->Add("thickness",h_g,1,numberofnodes);
-		inputs->Add("surface",s_g,1,numberofnodes);
-		inputs->Add("bed",b_g,1,numberofnodes);
-		inputs->Add("velocity",u_g,2,numberofnodes);
+		model->UpdateInputsFromVector(h_g,ThicknessEnum,VertexEnum);
+		model->UpdateInputsFromVector(s_g,SurfaceEnum,VertexEnum);
+		model->UpdateInputsFromVector(b_g,BedEnum,VertexEnum);
+	
+		SplitSolutionVector(u_g,numberofnodes,2,&vx,&vy);
+		model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+		model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
 
 	}
@@ -133,3 +142,5 @@
 	VecFree(&s_g);
 	VecFree(&b_g);
+	xfree((void**)&vx);
+	xfree((void**)&vy);
 }
Index: /issm/trunk/src/c/parallel/transient_core_3d.cpp
===================================================================
--- /issm/trunk/src/c/parallel/transient_core_3d.cpp	(revision 3750)
+++ /issm/trunk/src/c/parallel/transient_core_3d.cpp	(revision 3751)
@@ -10,5 +10,5 @@
 #include "../modules.h"
 
-void transient_core_3d(DataSet* results,Model* model, ParameterInputs* inputs){
+void transient_core_3d(DataSet* results,Model* model){
 
 	extern int my_rank;
@@ -30,4 +30,8 @@
 	int step;
 	double time;
+	
+	double* vx=NULL;
+	double* vy=NULL;
+	double* vz=NULL;
 	
 	Vec u_g=NULL;
@@ -89,9 +93,9 @@
 		//Deal with temperature first 
 		if(verbose)_printf_("%s\n","computing temperature");
-		thermal_core_nonlinear(&t_g,&melting_offset,fem_t,inputs,ThermalAnalysisEnum,TransientAnalysisEnum);
+		thermal_core_nonlinear(&t_g,&melting_offset,fem_t,ThermalAnalysisEnum,TransientAnalysisEnum);
 		if(verbose)_printf_("%s\n","computing melting");
-		inputs->Add("temperature",t_g,1,numberofnodes);
-		inputs->Add("melting_offset",melting_offset);
-		diagnostic_core_linear(&m_g,fem_m,inputs,MeltingAnalysisEnum,TransientAnalysisEnum);
+		model->UpdateInputsFromVector(t_g,TemperatureEnum,VertexEnum);
+		model->UpdateInputsFromConstant(melting_offset,MeltingOffsetEnum);
+		diagnostic_core_linear(&m_g,fem_m,MeltingAnalysisEnum,TransientAnalysisEnum);
 
 		//Compute depth averaged temperature and add to inputs
@@ -99,10 +103,10 @@
 		VecDuplicatePatch(&t_g_average,t_g); 
 		FieldDepthAveragex( t_g_average, fem_t->elements,fem_t->nodes, fem_t->vertices,fem_t->loads, fem_t->materials,fem_t->parameters,"temperature");
-		inputs->Add("temperature_average",t_g_average,1,numberofnodes);
+		model->UpdateInputsFromVector(t_g_average,TemperatureAverageEnum,VertexEnum);
 		VecFree(&t_g_average); //not needed anymore
 
 		//Deal with velocities.
 		diagnostic_results=new DataSet(ResultsEnum); 
-		diagnostic_core(diagnostic_results,model, inputs);
+		diagnostic_core(diagnostic_results,model);
 
 		//extract u_g and p_g from diagnostic_results, and erase diagnostic_results;
@@ -113,7 +117,12 @@
 		//compute new thickness
 		if(verbose)_printf_("%s\n","computing new thickness");
-		
-		inputs->Add("velocity",u_g,3,numberofnodes);
-		prognostic_results=new DataSet(ResultsEnum); prognostic_core(prognostic_results,model, inputs);
+	
+		SplitSolutionVector(u_g,numberofnodes,3,&vx,&vy,&vz);
+		model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+		model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
+		model->UpdateInputsFromVector(vz,VzEnum,VertexEnum);
+		xfree((void**)&vx); xfree((void**)&vy); xfree((void**)&vz);
+	
+		prognostic_results=new DataSet(ResultsEnum); prognostic_core(prognostic_results,model);
 	
 		//extract h_g prognostic_results, and erase prognostic_results;
@@ -146,10 +155,16 @@
 
 		//update inputs
-		inputs->Add("thickness",h_g,1,numberofnodes);
-		inputs->Add("surface",s_g,1,numberofnodes);
-		inputs->Add("bed",b_g,1,numberofnodes);
-		inputs->Add("velocity",u_g,3,numberofnodes);
-		inputs->Add("pressure",p_g,1,numberofnodes);
-		inputs->Add("temperature",t_g,1,numberofnodes);
+		model->UpdateInputsFromVector(h_g,ThicknessEnum,VertexEnum);
+		model->UpdateInputsFromVector(s_g,SurfaceEnum,VertexEnum);
+		model->UpdateInputsFromVector(b_g,BedEnum,VertexEnum);
+	
+		SplitSolutionVector(u_g,numberofnodes,3,&vx,&vy,&vz);
+		model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);
+		model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);
+		model->UpdateInputsFromVector(vz,VzEnum,VertexEnum);
+		xfree((void**)&vx); xfree((void**)&vy); xfree((void**)&vz);
+		
+		model->UpdateInputsFromVector(p_g,PressureEnum,VertexEnum);
+		model->UpdateInputsFromVector(t_g,TemperatureEnum,VertexEnum);
 
 		//Save temporary results every 5 steps
@@ -179,3 +194,6 @@
 	VecFree(&t_g);
 	VecFree(&m_g);
+	xfree((void**)&vx); 
+	xfree((void**)&vy); 
+	xfree((void**)&vz);
 }
Index: /issm/trunk/src/mex/ControlConstrain/ControlConstrain.cpp
===================================================================
--- /issm/trunk/src/mex/ControlConstrain/ControlConstrain.cpp	(revision 3750)
+++ /issm/trunk/src/mex/ControlConstrain/ControlConstrain.cpp	(revision 3751)
@@ -14,5 +14,5 @@
 	double   cm_min;
 	double   cm_max;
-	char*    control_type=NULL;
+	int      control_type=NULL;
 	int      gsize;
 	Parameters* parameters=NULL;
@@ -39,5 +39,4 @@
 
 	/*Free ressources: */
-	xfree((void**)&control_type);
 	delete parameters;
 
