Index: /issm/trunk/configs/macosx32/macosx32.sh.petsc2
===================================================================
--- /issm/trunk/configs/macosx32/macosx32.sh.petsc2	(revision 3672)
+++ /issm/trunk/configs/macosx32/macosx32.sh.petsc2	(revision 3673)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-./configure --prefix=$ISSM_DIR --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/fblaslapack/$ISSM_ARCH  --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32/$ISSM_ARCH -lPLAPACK"  --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32/$ISSM_ARCH/INCLUDE"  --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH/ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3/$ISSM_ARCH --with-fortran-lib="/usr/local/lib/libgfortran.a" --with-math-lib="/usr/lib/libm.dylib" --with-graphics-lib="/usr/X11/lib/libX11.dylib" --with-petsc-version=2
+./configure --prefix=$ISSM_DIR --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a" --with-petsc-arch=$ISSM_ARCH --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/fblaslapack/$ISSM_ARCH  --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32/$ISSM_ARCH -lPLAPACK"  --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32/$ISSM_ARCH/INCLUDE"  --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH/ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3/$ISSM_ARCH --with-fortran-lib="/usr/local/lib/libgfortran.a" --with-math-lib="/usr/lib/libm.dylib" --with-graphics-lib="/usr/X11/lib/libX11.dylib" --with-petsc-version=2
Index: /issm/trunk/etc/environment_variables.csh
===================================================================
--- /issm/trunk/etc/environment_variables.csh	(revision 3672)
+++ /issm/trunk/etc/environment_variables.csh	(revision 3673)
@@ -1,85 +1,0 @@
-#
-#
-#This routine can only be run if the ISSM_DIR variable has been correctly set!
-#
-#
-
-#MATLAB
-set MATLAB_DIR={$ISSM_DIR}/externalpackages/matlab/install
-set MATLAB_VERSION=
-
-#MPI
-set MPI_DIR={$ISSM_DIR}/externalpackages/mpich2/install
-
-#PETSC
-set PETSC_DIR={$ISSM_DIR}/externalpackages/petsc/install
-
-#SLEPC
-set SLEPC_DIR={$ISSM_DIR}/externalpackages/slepc/install
-
-#Dakota
-set DAKOTA_DIR={$ISSM_DIR}/externalpackages/dakota/install
-
-#Qhull
-set QHULL_DIR={$ISSM_DIR}/externalpackages/qhull/install
-
-#Doxygen
-set DOXYGEN_DIR={$ISSM_DIR}/externalpackages/doxygen/install
-
-#MTOC
-set MTOC_DIR={$ISSM_DIR}/externalpackages/mtoc/install
-
-#Triangle
-set TRIANGLE_DIR={$ISSM_DIR}/externalpackages/triangle/install
-
-#METIS
-set METIS_DIR={$ISSM_DIR}/externalpackages/metis/install
-
-#BLAS
-set BLAS_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/fblaslapack
-
-#LAPACK
-set LAPACK_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/fblaslapack/$ISSM_ARCH
-
-#SCALAPACK
-set SCALAPACK_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/SCALAPACK/$ISSM_ARCH
-
-#PLAPACK
-set PLAPACK_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/PLAPACKR32
-
-#BLACS
-set BLACS_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/blacs-dev/$ISSM_ARCH
-
-#sowing
-set SOWING_DIR={$ISSM_DIR}/externalpackages/sowing/install
-
-#YAMS
-set YAMS_DIR={$ISSM_DIR}/externalpackages/yams/install
-
-#TEX2IM
-set TEX2IM_DIR={$ISSM_DIR}/externalpackages/tex2im/install
-
-#Chaco
-set CHACO_DIR={$ISSM_DIR}/externalpackages/chaco/install
-
-#MeshPart
-set MESHPART_DIR={$ISSM_DIR}/externalpackages/meshpart/install
-
-#SCOTCH
-set SCOTCH_DIR={$ISSM_DIR}/externalpackages/scotch/install
-
-#Development packages
-#automake
-set AUTOMAKE_DIR={$ISSM_DIR}/devpackages/automake/install
-
-#autoconf
-set AUTOCONF_DIR={$ISSM_DIR}/devpackages/autoconf/install
-
-#borland
-set BORLAND_DIR=/cygdrive/c/Borland
-
-#ssh
-set SSH_DIR={$ISSM_DIR}/externalpackages/ssh
-
-#valgrind
-set VALGRIND_DIR={$ISSM_DIR}/externalpackages/valgrind/install/bin
Index: /issm/trunk/etc/environment_variables.sh
===================================================================
--- /issm/trunk/etc/environment_variables.sh	(revision 3672)
+++ /issm/trunk/etc/environment_variables.sh	(revision 3673)
@@ -1,103 +1,0 @@
-#
-#
-#This routine can only be run if the ISSM_DIR variable has been correctly set!
-#
-#
-
-#MATLAB
-MATLAB_DIR="$ISSM_DIR/externalpackages/matlab/install"
-MATLAB_VERSION=
-
-#MPI
-MPI_DIR="$ISSM_DIR/externalpackages/mpich2/install"
-
-#PETSC
-PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install"
-
-#SLEPC
-SLEPC_DIR="$ISSM_DIR/externalpackages/slepc/install"
-
-#Dakota
-DAKOTA_DIR="$ISSM_DIR/externalpackages/dakota/install"
-
-#Qhull
-QHULL_DIR="$ISSM_DIR/externalpackages/qhull/install"
-
-#Doxygen
-DOXYGEN_DIR="$ISSM_DIR/externalpackages/doxygen/install"
-
-#MTOC
-MTOC_DIR="$ISSM_DIR/externalpackages/mtoc/install"
-
-#Triangle
-TRIANGLE_DIR="$ISSM_DIR/externalpackages/triangle/install"
-
-#METIS
-METIS_DIR="$ISSM_DIR/externalpackages/metis/install"
-
-#BLAS
-BLAS_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/fblaslapack"
-
-#LAPACK
-LAPACK_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/fblaslapack/$ISSM_ARCH"
-
-#SCALAPACK
-SCALAPACK_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH"
-
-#PLAPACK
-PLAPACK_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32"
-
-#BLACS
-BLACS_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH"
-
-#sowing
-SOWING_DIR="$ISSM_DIR/externalpackages/sowing/install"
-
-#BLACS
-BLACS_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH"
-
-#YAMS
-YAMS_DIR="$ISSM_DIR/externalpackages/yams/install"
-
-#BAMG
-BAMG_DIR="$ISSM_DIR/externalpackages/bamg/install"
-
-#Chaco
-CHACO_DIR="$ISSM_DIR/externalpackages/chaco/install"
-
-#MeshPart
-MESHPART_DIR="$ISSM_DIR/externalpackages/meshpart/install"
-
-#SCOTCH
-SCOTCH_DIR="$ISSM_DIR/externalpackages/scotch/install"
-
-#Development packages
-#automake
-AUTOMAKE_DIR="$ISSM_DIR/devpackages/automake/install"
-
-#autoconf
-AUTOCONF_DIR="$ISSM_DIR/devpackages/autoconf/install"
-
-#borland
-#BORLAND_DIR="/cygdrive/c/Borland/"
-
-#intel
-#INTEL_DIR="C:/IntelInstall/Compiler/11.1/038/bin/ia32/"
-
-#TEX2IM			 
-TEX2IM_DIR="$ISSM_DIR/externalpackages/tex2im/install" 
-
-#sdk
-SDK_DIR="C:/MicrosoftVisualStudio 9.0/Microsoft Visual C++ 2008 Express Edition with SP1 - ENU"
-
-#ssh 
-SSH_DIR="$ISSM_DIR/externalpackages/ssh"
-
-#valgrind
-VALGRIND_DIR="$ISSM_DIR/externalpackages/valgrind/install/bin"
-
-#graphviz
-GRAPHVIZ_DIR="$ISSM_DIR/externalpackages/graphviz/install/bin"
-
-#cppcheck
-CPPCHECK_DIR="$ISSM_DIR/externalpackages/cppcheck/install"
Index: /issm/trunk/externalpackages/matlab/install.sh
===================================================================
--- /issm/trunk/externalpackages/matlab/install.sh	(revision 3672)
+++ /issm/trunk/externalpackages/matlab/install.sh	(revision 3673)
@@ -8,5 +8,7 @@
 
 #symlink matlab to root matlab
-ln -s /usr/local/pkgs/matlab-$MATLAB_VERSION/ install
+ln -s /Applications/MATLAB_R2008a/ install
+
+export MATLAB_VERSION=R2008a
 
 #initialize MATLAB_VERSION in etc/environment_variables
Index: /issm/trunk/externalpackages/mpich2/install.sh
===================================================================
--- /issm/trunk/externalpackages/mpich2/install.sh	(revision 3672)
+++ /issm/trunk/externalpackages/mpich2/install.sh	(revision 3673)
@@ -5,5 +5,5 @@
 
 #version of mpich2
-version=1.1.1p1
+version=1.0.2p1
 
 #Some cleanup
Index: /issm/trunk/m4/matlab.m4
===================================================================
--- /issm/trunk/m4/matlab.m4	(revision 3672)
+++ /issm/trunk/m4/matlab.m4	(revision 3673)
@@ -306,4 +306,5 @@
     fi
 fi])
+echo $ax_cv_matlab_version
 case $ax_cv_matlab_version in
   @<:@1-9@:>@.@<:@0-9@:>@ | @<:@1-9@:>@@<:@0-9@:>@.@<:@0-9@:>@)
@@ -317,4 +318,10 @@
     MATLAB_MINOR=a
 	;;
+	R2008a)
+	MATLAB_VERSION=R2008a
+    MATLAB_MAJOR=R2008
+    MATLAB_MINOR=a
+	;;
+
   *)
     if test x$ax_enable_matlab = xyes ; then
Index: /issm/trunk/src/c/ComputeBasalStressx/ComputeBasalStressx.cpp
===================================================================
--- /issm/trunk/src/c/ComputeBasalStressx/ComputeBasalStressx.cpp	(revision 3672)
+++ /issm/trunk/src/c/ComputeBasalStressx/ComputeBasalStressx.cpp	(revision 3673)
@@ -10,6 +10,6 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void	ComputeBasalStressx( Vec* psigma,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,DataSet* parameters,
-			ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+void	ComputeBasalStressx( Vec* psigma,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,Parameters* parameters,
+			int analysis_type,int sub_analysis_type){
 
 	int i;
@@ -34,5 +34,5 @@
 
 	/*Call on dataset driver: */
-	elements->ComputeBasalStress(sigma,inputs,analysis_type,sub_analysis_type);
+	elements->ComputeBasalStress(sigma,analysis_type,sub_analysis_type);
 
 	/*Assemble vector: */
Index: /issm/trunk/src/c/ComputeBasalStressx/ComputeBasalStressx.h
===================================================================
--- /issm/trunk/src/c/ComputeBasalStressx/ComputeBasalStressx.h	(revision 3672)
+++ /issm/trunk/src/c/ComputeBasalStressx/ComputeBasalStressx.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void	ComputeBasalStressx( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  DataSet* parameters,
+void	ComputeBasalStressx( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,
 			int analysis_type,int sub_analysis_type);
 
Index: /issm/trunk/src/c/ComputePressurex/ComputePressurex.cpp
===================================================================
--- /issm/trunk/src/c/ComputePressurex/ComputePressurex.cpp	(revision 3672)
+++ /issm/trunk/src/c/ComputePressurex/ComputePressurex.cpp	(revision 3673)
@@ -10,6 +10,6 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void	ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,DataSet* parameters,
-			ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+void	ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,Parameters* parameters,
+			int analysis_type,int sub_analysis_type){
 
 	int i;
@@ -32,5 +32,5 @@
 
 	/*Call on dataset driver: */
-	elements->ComputePressure(p_g,inputs,analysis_type,sub_analysis_type);
+	elements->ComputePressure(p_g,analysis_type,sub_analysis_type);
 
 	/*Assemble vector: */
Index: /issm/trunk/src/c/ComputePressurex/ComputePressurex.h
===================================================================
--- /issm/trunk/src/c/ComputePressurex/ComputePressurex.h	(revision 3672)
+++ /issm/trunk/src/c/ComputePressurex/ComputePressurex.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void	ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  DataSet* parameters,
+void	ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,
 			int analysis_type,int sub_analysis_type);
 
Index: /issm/trunk/src/c/ComputeStrainRatex/ComputeStrainRatex.cpp
===================================================================
--- /issm/trunk/src/c/ComputeStrainRatex/ComputeStrainRatex.cpp	(revision 3672)
+++ /issm/trunk/src/c/ComputeStrainRatex/ComputeStrainRatex.cpp	(revision 3673)
@@ -10,6 +10,6 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void	ComputeStrainRatex( Vec* peps,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,DataSet* parameters,
-			ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+void	ComputeStrainRatex( Vec* peps,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,Parameters* parameters,
+			int analysis_type,int sub_analysis_type){
 
 	int i;
@@ -33,5 +33,5 @@
 
 	/*Call on dataset driver: */
-	elements->ComputeStrainRate(eps,inputs,analysis_type,sub_analysis_type);
+	elements->ComputeStrainRate(eps,analysis_type,sub_analysis_type);
 
 	/*Assemble vector: */
Index: /issm/trunk/src/c/ComputeStrainRatex/ComputeStrainRatex.h
===================================================================
--- /issm/trunk/src/c/ComputeStrainRatex/ComputeStrainRatex.h	(revision 3672)
+++ /issm/trunk/src/c/ComputeStrainRatex/ComputeStrainRatex.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void	ComputeStrainRatex(Vec* eps_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  DataSet* parameters,
+void	ComputeStrainRatex(Vec* eps_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,
 			int analysis_type,int sub_analysis_type);
 
Index: /issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.cpp
===================================================================
--- /issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.cpp	(revision 3672)
+++ /issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.cpp	(revision 3673)
@@ -10,5 +10,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-int	ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials,DataSet* parameters){
+int	ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials,Parameters* parameters){
 
 	int noerr=1;
@@ -23,7 +23,7 @@
 	loads->Configure(elements,loads,nodes,vertices,materials,parameters);
 	//_printf_("      Configuring nodes...\n");
-	nodes->Configure(nodes);
+	nodes->Configure(elements,loads,nodes,vertices,materials,parameters);
 	//_printf_("      Configuring parameters...\n");
-	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads,nodes,vertices,materials,parameters);
 
 	return noerr;
Index: /issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.h
===================================================================
--- /issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.h	(revision 3672)
+++ /issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.h	(revision 3673)
@@ -9,5 +9,5 @@
 
 /* local prototypes: */
-int		ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials, DataSet* parameters);
+int		ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials, Parameters* parameters);
 
 #endif  /* _CONFIGUREOBJECTSX_H */
Index: /issm/trunk/src/c/CostFunctionx/CostFunctionx.cpp
===================================================================
--- /issm/trunk/src/c/CostFunctionx/CostFunctionx.cpp	(revision 3672)
+++ /issm/trunk/src/c/CostFunctionx/CostFunctionx.cpp	(revision 3673)
@@ -11,6 +11,6 @@
 #include "../SurfaceAreax/SurfaceAreax.h"
 
-void CostFunctionx( double* pJ, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials,DataSet* parameters,
-			ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+void CostFunctionx( double* pJ, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials,Parameters* parameters,
+			int analysis_type,int sub_analysis_type){
 
 	/*Intermediary*/
@@ -27,14 +27,12 @@
 	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
 
-	/*If fit=3, compute Surface Area*/
-	if(!inputs->Recover("fit",&fit)) ISSMERROR(" missing fit input parameter");
-	if (fit==3 && !inputs->IsPresent("surfacearea")){
+	/*Compute surface area: */
+	SurfaceAreax(&S,elements,nodes,vertices, loads,materials,parameters,analysis_type,sub_analysis_type);
 
-		SurfaceAreax(&S,elements,nodes,vertices,loads,materials,parameters,inputs,analysis_type,sub_analysis_type);
-		inputs->Add("surfacearea",S);
-	}
-
+	/*add surface area to elements :*/
+	elements->AddInput(S,SurfaceAreaEnum);
+	
 	/*Compute gradients: */
-	elements->CostFunction(&J,inputs,analysis_type,sub_analysis_type);
+	elements->CostFunction(&J,analysis_type,sub_analysis_type);
 
 	/*Sum all J from all cpus of the cluster:*/
Index: /issm/trunk/src/c/CostFunctionx/CostFunctionx.h
===================================================================
--- /issm/trunk/src/c/CostFunctionx/CostFunctionx.h	(revision 3672)
+++ /issm/trunk/src/c/CostFunctionx/CostFunctionx.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void CostFunctionx( double* pJ, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters, 
+void CostFunctionx( double* pJ, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters, 
 			int analysis_type,int sub_analysis_type);
 
Index: /issm/trunk/src/c/DataSet/DataSet.cpp
===================================================================
--- /issm/trunk/src/c/DataSet/DataSet.cpp	(revision 3672)
+++ /issm/trunk/src/c/DataSet/DataSet.cpp	(revision 3673)
@@ -207,15 +207,9 @@
 			dataset->AddObject(vertex);
 		}
-		else if(enum_type==ParamEnum){
-			Param* param=NULL;
-			param=new Param();
-			param->Demarshall(&marshalled_dataset);
-			dataset->AddObject(param);
-		}
-		else if(enum_type==NumparEnum){
-			Numpar* numpar=NULL;
-			numpar=new Numpar();
-			numpar->Demarshall(&marshalled_dataset);
-			dataset->AddObject(numpar);
+		else if(enum_type==DoubleParamEnum){
+			DoubleParam* doubleparam=NULL;
+			doubleparam=new DoubleParam();
+			doubleparam->Demarshall(&marshalled_dataset);
+			dataset->AddObject(doubleparam);
 		}
 		else if(enum_type==TriaEnum){
@@ -512,5 +506,5 @@
 
 		/*Which id does it have: */
-		id=(*object)->GetId();
+		id=(*object)->Id();
 
 		/*Plug rank into ranks, according to id: */
@@ -532,5 +526,5 @@
 		for(i=0;i<objects.size();i++){
 			id_offsets[i]=i;
-			sorted_ids[i]=objects[i]->GetId();
+			sorted_ids[i]=objects[i]->Id();
 		}
 	}
@@ -1364,5 +1358,22 @@
 			element->UpdateInputs(solution,analysis_type,sub_analysis_type);
 		}
-		else ISSMERROR("%s%i%s"," object with id: ",(*object)->GetId()," is not an element, in a function that deals only with elements!");
+		else ISSMERROR("%s%i%s"," object with id: ",(*object)->Id()," is not an element, in a function that deals only with elements!");
+	}
+}
+/*}}}*/
+/*FUNCTION DataSet::AddInput{{{1*/
+void  DataSet::AddInput(double value, int enum_type){
+
+	vector<Object*>::iterator object;
+	Element* element=NULL;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		if(EnumIsElement((*object)->Enum())){
+
+			element=(Element*)(*object);
+			element->AddInput(value,enum_type);
+		}
+		else ISSMERROR("%s%i%s"," object with id: ",(*object)->Id()," is not an element, in a function that deals only with elements!");
 	}
 }
Index: /issm/trunk/src/c/DataSet/DataSet.h
===================================================================
--- /issm/trunk/src/c/DataSet/DataSet.h	(revision 3672)
+++ /issm/trunk/src/c/DataSet/DataSet.h	(revision 3673)
@@ -71,4 +71,5 @@
 		void  CreatePVector(Vec pg, int analysis_type,int sub_analysis_type);
 		void  UpdateInputs(double* solution,int analysis_type,int sub_analysis_type);
+		void  AddInput(double value, int enum_type);
 		void  PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type);
 		void  PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type);
Index: /issm/trunk/src/c/DataSet/Inputs.cpp
===================================================================
--- /issm/trunk/src/c/DataSet/Inputs.cpp	(revision 3672)
+++ /issm/trunk/src/c/DataSet/Inputs.cpp	(revision 3673)
@@ -64,5 +64,5 @@
 
 	/*Ok, we have an input if we made it here, request the input to return the values: */
-	input->GetParameterValues(pvalue,gauss);
+	input->GetParameterValue(pvalue,gauss);
 
 }
@@ -165,6 +165,7 @@
 /*}}}*/
 /*FUNCTION Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues){{{1*/
-void GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues){
-
+void Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues){
+
+	int i;
 	vector<Object*>::iterator object;
 	Input* input=NULL;
@@ -188,5 +189,5 @@
 /*}}}*/
 /*FUNCTION Inputs::GetParameterValue(bool* pvalue,int enum-type){{{1*/
-void GetParameterValue(bool* pvalue,int enum_type){
+void Inputs::GetParameterValue(bool* pvalue,int enum_type){
 
 	vector<Object*>::iterator object;
@@ -212,5 +213,5 @@
 /*}}}*/
 /*FUNCTION Inputs::GetParameterValue(int* pvalue,int enum-type){{{1*/
-void GetParameterValue(int* pvalue,int enum_type){
+void Inputs::GetParameterValue(int* pvalue,int enum_type){
 
 	vector<Object*>::iterator object;
@@ -236,5 +237,5 @@
 /*}}}*/
 /*FUNCTION Inputs::GetParameterValue(double* pvalue,int enum-type){{{1*/
-void GetParameterValue(double* pvalue,int enum_type){
+void Inputs::GetParameterValue(double* pvalue,int enum_type){
 
 	vector<Object*>::iterator object;
@@ -279,5 +280,5 @@
 
 	/*Ok, we have an input if we made it here, request the input to return the value: */
-	input->GetParameterValue(derivativevalues,xyz_list,gauss);
+	input->GetParameterDerivativeValue(derivativevalues,xyz_list,gauss);
 }
 /*}}}*/
@@ -312,10 +313,10 @@
 /*}}}*/
 /*FUNCTION Inputs::GetStrainRateStokes(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int zenum){{{1*/
-void Inputs::GetStrainRate(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int zenum){
+void Inputs::GetStrainRateStokes(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int zenum){
 
 	vector<Object*>::iterator object;
 	Input* xinput=NULL;
 	Input* yinput=NULL;
-	Input* yinput=NULL;
+	Input* zinput=NULL;
 
 	/*Go through inputs and find data for xenum: */
Index: /issm/trunk/src/c/DataSet/Inputs.h
===================================================================
--- /issm/trunk/src/c/DataSet/Inputs.h	(revision 3672)
+++ /issm/trunk/src/c/DataSet/Inputs.h	(revision 3673)
@@ -6,7 +6,7 @@
 #define _INPUTS_H_
 
+#include "./DataSet.h"
 class Input;
-class Node;
-#include "./DataSet.h"
+#include "../objects/Input.h"
 #include "../objects/Node.h"
 
Index: /issm/trunk/src/c/DataSet/Parameters.cpp
===================================================================
--- /issm/trunk/src/c/DataSet/Parameters.cpp	(revision 3672)
+++ /issm/trunk/src/c/DataSet/Parameters.cpp	(revision 3673)
@@ -9,6 +9,18 @@
 #endif
 
+#include <vector>
+#include <functional>
+#include <algorithm>
+#include <iostream>
+
 #include "./DataSet.h"
 #include "./Parameters.h"
+
+#include "../shared/shared.h"
+#include "../include/macros.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+using namespace std;
+
 
 /*Object constructors and destructor*/
@@ -20,5 +32,4 @@
 /*FUNCTION Parameters::Parameters(int in_enum){{{1*/
 Parameters::Parameters(int in_enum): DataSet(in_enum){
-{
 	//do nothing;
 	return;
@@ -32,24 +43,24 @@
 
 /*Object management*/
-/*FUNCTION Parameters::FindParam(double* pscalar, char* name){{{1*/
-int   Parameters::FindParam(double* pscalar, char* name){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if (strcmp(param->GetParameterName(),name)==0){
+/*FUNCTION Parameters::FindParam(double* pscalar, int enum_type){{{1*/
+int   Parameters::FindParam(double* pscalar, int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
 				/*Ok, this is the one! Recover the value of this parameter: */
 				param->GetParameterValue(pscalar);
@@ -62,25 +73,25 @@
 }
 /*}}}*/
-/*FUNCTION Parameters::FindParam(int* pinteger,char* name){{{1*/
-int   Parameters::FindParam(int* pinteger,char* name){
-	
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if (strcmp(param->GetParameterName(),name)==0){
+/*FUNCTION Parameters::FindParam(int* pinteger,int enum_type){{{1*/
+int   Parameters::FindParam(int* pinteger,int enum_type){
+	
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
 				/*Ok, this is the one! Recover the value of this parameter: */
 				param->GetParameterValue(pinteger);
@@ -93,24 +104,24 @@
 }
 /*}}}*/
-/*FUNCTION Parameters::FindParam(char** pstring,char* name){{{1*/
-int   Parameters::FindParam(char** pstring,char* name){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if (strcmp(param->GetParameterName(),name)==0){
+/*FUNCTION Parameters::FindParam(char** pstring,int enum_type){{{1*/
+int   Parameters::FindParam(char** pstring,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
 				/*Ok, this is the one! Recover the value of this parameter: */
 				param->GetParameterValue(pstring);
@@ -124,89 +135,117 @@
 }
 /*}}}*/
-/*FUNCTION Parameters::FindParam(char*** pstringarray,int* pM,char* name){{{1*/
-int   Parameters::FindParam(char*** pstringarray,int* pM,char* name){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if (strcmp(param->GetParameterName(),name)==0){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pstringarray);
-				if(pM)*pM=param->GetM();
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM, int* pN,char* name){{{1*/
-int   Parameters::FindParam(double** pdoublearray,int* pM, int* pN,char* name){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if (strcmp(param->GetParameterName(),name)==0){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pdoublearray);
-				if(pM)param->GetM();
-				if(pN)param->GetN();
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParam(Vec* pvec,char* name){{{1*/
-int   Parameters::FindParam(Vec* pvec,char* name){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if (strcmp(param->GetParameterName(),name)==0){
+/*FUNCTION Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){{{1*/
+int   Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pstringarray,pM);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM,int enum_type){{{1*/
+int   Parameters::FindParam(double** pdoublearray,int* pM, int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pdoublearray,pM)
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){{{1*/
+int   Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pdoublearray,pM,pN);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParam(Vec* pvec,int enum_type){{{1*/
+int   Parameters::FindParam(Vec* pvec,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
 				/*Ok, this is the one! Recover the value of this parameter: */
 				param->GetParameterValue(pvec);
@@ -220,24 +259,24 @@
 }
 /*}}}*/
-/*FUNCTION Parameters::FindParamMat* pmat,char* name){{{1*/
-int   Parameters::FindParam(Mat* pmat,char* name){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if (strcmp(param->GetParameterName(),name)==0){
+/*FUNCTION Parameters::FindParamMat* pmat,int enum_type){{{1*/
+int   Parameters::FindParam(Mat* pmat,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
 				/*Ok, this is the one! Recover the value of this parameter: */
 				param->GetParameterValue(pmat);
@@ -252,21 +291,21 @@
 /*}}}*/
 /*FUNCTION Parameters::FindParamObject{{{1*/
-Object*   Parameters::FindParamObject(char* name){
-
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if (strcmp(param->GetParameterName(),name)==0){
+Object* Parameters::FindParamObject(int enum_type){
+
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
 				/*Ok, this is the one! Return the object: */
 				return (*object);
Index: /issm/trunk/src/c/DataSet/Parameters.h
===================================================================
--- /issm/trunk/src/c/DataSet/Parameters.h	(revision 3672)
+++ /issm/trunk/src/c/DataSet/Parameters.h	(revision 3673)
@@ -18,11 +18,13 @@
 		/*}}}*/
 		/*numerics: {{{1*/
-		int   FindParam(double* pscalar, char* name);
-		int   FindParam(int* pinteger,char* name);
-		int   FindParam(char** pstring,char* name);
-		int   FindParam(char*** pstringarray,int* pM,char* name);
-		int   FindParam(double** pdoublearray,int* pM,int* pN,char* name);
-		int   FindParam(Vec* pvec,char* name);
-		int   FindParam(Mat* pmat,char* name);
+		int   FindParam(double* pscalar, int enum_type);
+		int   FindParam(int* pinteger,int enum_type);
+		int   FindParam(char** pstring,int enum_type);
+		int   FindParam(char*** pstringarray,int* pM,int enum_type);
+		int   FindParam(double** pdoublearray,int* pM,int enum_type);
+		int   FindParam(double** pdoublearray,int* pM,int* pN,int enum_type);
+		int   FindParam(Vec* pvec,int enum_type);
+		int   FindParam(Mat* pmat,int enum_type);
+		Object* FindParamObject(int enum_type);
 		/*}}}*/
 
Index: /issm/trunk/src/c/Dofx/Dofx.cpp
===================================================================
--- /issm/trunk/src/c/Dofx/Dofx.cpp	(revision 3672)
+++ /issm/trunk/src/c/Dofx/Dofx.cpp	(revision 3673)
@@ -10,5 +10,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-int Dofx( DofVec** ppartition, DofVec** ptpartition, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* params) {
+int Dofx( DofVec** ppartition, DofVec** ptpartition, DataSet* elements,DataSet* nodes, DataSet* vertices, Parameters* parameters) {
 
 	int noerr=1;
@@ -36,12 +36,12 @@
 
 	/*First, recover number of vertices and nodes from parameters: */
-	found=params->FindParam(&numberofvertices,"numberofvertices");
+	found=parameters->FindParam(&numberofvertices,"numberofvertices");
 	if(!found)ISSMERROR(" could not find numberofvertices in parameters");
 	
-	found=params->FindParam(&numberofnodes,"numberofnodes");
+	found=parameters->FindParam(&numberofnodes,"numberofnodes");
 	if(!found)ISSMERROR(" could not find numberofnodes in parameters");
 
 	/*Recover number of dofs per node: */
-	found=params->FindParam(&numberofdofspernode,"numberofdofspernode");
+	found=parameters->FindParam(&numberofdofspernode,"numberofdofspernode");
 	if(!found)ISSMERROR(" could not find numberofdofspernode in parameters");
 
Index: /issm/trunk/src/c/Dofx/Dofx.h
===================================================================
--- /issm/trunk/src/c/Dofx/Dofx.h	(revision 3672)
+++ /issm/trunk/src/c/Dofx/Dofx.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-int		Dofx( DofVec** partition, DofVec** ptpartition,DataSet* elements,DataSet* nodesin, DataSet* verticesin, DataSet* params);
+int		Dofx( DofVec** partition, DofVec** ptpartition,DataSet* elements,DataSet* nodesin, DataSet* verticesin, Parameters* parameters);
 
 #endif  /* _DOFX_H */
Index: /issm/trunk/src/c/Dux/Dux.cpp
===================================================================
--- /issm/trunk/src/c/Dux/Dux.cpp	(revision 3672)
+++ /issm/trunk/src/c/Dux/Dux.cpp	(revision 3673)
@@ -11,6 +11,6 @@
 #include "../SurfaceAreax/SurfaceAreax.h"
 
-void Dux( Vec* pdu_g, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters,
-			ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+void Dux( Vec* pdu_g, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,
+			int analysis_type,int sub_analysis_type){
 
 	/*Intermediary*/
@@ -29,12 +29,10 @@
 	parameters->Configure(elements,loads, nodes, vertices, materials,parameters);
 
-	/*If fit=3, compute Surface Area*/
-	if(!inputs->Recover("fit",&fit)) ISSMERROR(" missing fit input parameter");
-	if (fit==3 && !inputs->IsPresent("surfacearea")){
+	/*Compute surface area: */
+	SurfaceAreax(&S,elements,nodes,vertices, loads,materials,parameters,analysis_type,sub_analysis_type);
 
-		SurfaceAreax(&S,elements,nodes,vertices, loads,materials,parameters,inputs,analysis_type,sub_analysis_type);
-		inputs->Add("surfacearea",S);
-	}
-
+	/*add surface area to elements :*/
+	elements->AddInput(S,SurfaceAreaEnum);
+	
 	/*Get size of matrix: */
 	gsize=nodes->NumberOfDofs();
@@ -44,5 +42,5 @@
 
 	/*Compute velocity difference: */
-	elements->Du(du_g,inputs,analysis_type,sub_analysis_type);
+	elements->Du(du_g,analysis_type,sub_analysis_type);
 
 	/*Assemble vector: */
Index: /issm/trunk/src/c/Dux/Dux.h
===================================================================
--- /issm/trunk/src/c/Dux/Dux.h	(revision 3672)
+++ /issm/trunk/src/c/Dux/Dux.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void Dux( Vec* pdu_g, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters, 
+void Dux( Vec* pdu_g, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters, 
 			int analysis_type,int sub_analysis_type);
 
Index: /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.cpp
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.cpp	(revision 3672)
+++ /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.cpp	(revision 3673)
@@ -17,5 +17,5 @@
 }
 int EnumIsMaterial(int en){
-	if ((en>=MaterialEnum) && (en<=NumparEnum))return 1;
+	if ((en>=MaterialEnum) && (en<=MatparEnum))return 1;
 	else return 0;
 }
Index: /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 3672)
+++ /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 3673)
@@ -22,4 +22,6 @@
 	/*Analysis types {{{1 */
 	AnalysisEnum,
+	AnalysisTypeEnum,
+	SubAnalysisTypeEnum,
 	//diagnostic
 	DiagnosticAnalysisEnum,
@@ -99,5 +101,4 @@
 	MaticeEnum,
 	MatparEnum,
-	NumparEnum,
 	/*Inputs: */
 	InputEnum,
@@ -111,4 +112,7 @@
 	/*Params: */
 	ParamEnum,
+	BoolParamEnum,
+	IntParamEnum,
+	DoubleParamEnum,
 	/*Results: */
 	ResultEnum,
@@ -187,5 +191,20 @@
 	FillEnum,
 	InternalEnum,
-	BoundaryEnum
+	MaxPenetrationEnum,
+	BoundaryEnum,
+	DtEnum,
+	ArtDiffEnum,
+	CmNoiseDmpEnum,
+	CmMinDmpValueEnum,
+	CmMaxDmpValueEnum,
+	CmMinDmpSlopeEnum,
+	CmMaxDmpSlopeEnum,
+	ControlTypeEnum,
+	ViscosityOvershootEnum,
+	MeanVelEnum,
+	EpsVelEnum,
+	StokesReconditioningEnum,
+	StabilizeConstraintsEnum,
+	PenaltyOffsetEnum
 	/*}}}*/
 
Index: /issm/trunk/src/c/FieldAverageOntoVerticesx/FieldAverageOntoVerticesx.cpp
===================================================================
--- /issm/trunk/src/c/FieldAverageOntoVerticesx/FieldAverageOntoVerticesx.cpp	(revision 3672)
+++ /issm/trunk/src/c/FieldAverageOntoVerticesx/FieldAverageOntoVerticesx.cpp	(revision 3673)
@@ -10,5 +10,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void FieldAverageOntoVerticesx(Vec* pfield, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters){
+void FieldAverageOntoVerticesx(Vec* pfield, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters){
 
 	extern int my_rank;
Index: /issm/trunk/src/c/FieldAverageOntoVerticesx/FieldAverageOntoVerticesx.h
===================================================================
--- /issm/trunk/src/c/FieldAverageOntoVerticesx/FieldAverageOntoVerticesx.h	(revision 3672)
+++ /issm/trunk/src/c/FieldAverageOntoVerticesx/FieldAverageOntoVerticesx.h	(revision 3673)
@@ -9,5 +9,5 @@
 
 /* local prototypes: */
-void FieldAverageOntoVerticesx(Vec* field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters);
+void FieldAverageOntoVerticesx(Vec* field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters);
 
 #endif  /* _FIELDDEPTHAVERAGEX_H */
Index: /issm/trunk/src/c/FieldDepthAveragex/FieldDepthAveragex.cpp
===================================================================
--- /issm/trunk/src/c/FieldDepthAveragex/FieldDepthAveragex.cpp	(revision 3672)
+++ /issm/trunk/src/c/FieldDepthAveragex/FieldDepthAveragex.cpp	(revision 3673)
@@ -10,5 +10,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void FieldDepthAveragex( Vec field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters,char* fieldname){
+void FieldDepthAveragex( Vec field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,char* fieldname){
 
 	double* field_serial=NULL;
Index: /issm/trunk/src/c/FieldDepthAveragex/FieldDepthAveragex.h
===================================================================
--- /issm/trunk/src/c/FieldDepthAveragex/FieldDepthAveragex.h	(revision 3672)
+++ /issm/trunk/src/c/FieldDepthAveragex/FieldDepthAveragex.h	(revision 3673)
@@ -9,5 +9,5 @@
 
 /* local prototypes: */
-void FieldDepthAveragex( Vec field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters,char* fieldname);
+void FieldDepthAveragex( Vec field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,char* fieldname);
 
 #endif  /* _FIELDDEPTHAVERAGEX_H */
Index: /issm/trunk/src/c/FieldExtrudex/FieldExtrudex.cpp
===================================================================
--- /issm/trunk/src/c/FieldExtrudex/FieldExtrudex.cpp	(revision 3672)
+++ /issm/trunk/src/c/FieldExtrudex/FieldExtrudex.cpp	(revision 3673)
@@ -10,5 +10,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void FieldExtrudex( Vec field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters,char* field_name,int collapse){
+void FieldExtrudex( Vec field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,char* field_name,int collapse){
 
 	double* field_serial=NULL;
Index: /issm/trunk/src/c/FieldExtrudex/FieldExtrudex.h
===================================================================
--- /issm/trunk/src/c/FieldExtrudex/FieldExtrudex.h	(revision 3672)
+++ /issm/trunk/src/c/FieldExtrudex/FieldExtrudex.h	(revision 3673)
@@ -9,5 +9,5 @@
 
 /* local prototypes: */
-void FieldExtrudex( Vec field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters,char* field_name, int collapse);
+void FieldExtrudex( Vec field, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,char* field_name, int collapse);
 
 #endif  /* _FIELDEXTRUDEX_H */
Index: /issm/trunk/src/c/Gradjx/Gradjx.cpp
===================================================================
--- /issm/trunk/src/c/Gradjx/Gradjx.cpp	(revision 3672)
+++ /issm/trunk/src/c/Gradjx/Gradjx.cpp	(revision 3673)
@@ -10,6 +10,6 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void Gradjx( Vec* pgrad_g, int numberofnodes, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters,
-			ParameterInputs* inputs,int analysis_type,int sub_analysis_type,char* control_type){
+void Gradjx( Vec* pgrad_g, int numberofnodes, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,
+			int analysis_type,int sub_analysis_type,char* control_type){
 
 	/*output: */
@@ -25,5 +25,5 @@
 
 	/*Compute gradients: */
-	elements->Gradj(grad_g,inputs,analysis_type,sub_analysis_type,control_type);
+	elements->Gradj(grad_g,analysis_type,sub_analysis_type,control_type);
 
 	/*Assemble vector: */
Index: /issm/trunk/src/c/Gradjx/Gradjx.h
===================================================================
--- /issm/trunk/src/c/Gradjx/Gradjx.h	(revision 3672)
+++ /issm/trunk/src/c/Gradjx/Gradjx.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void Gradjx( Vec* pgrad_g, int numberofnodes, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials,  DataSet* parameters,
+void Gradjx( Vec* pgrad_g, int numberofnodes, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials,  Parameters* parameters,
 			int analysis_type,int sub_analysis_type,char* control_type);
 
Index: /issm/trunk/src/c/Makefile.am
===================================================================
--- /issm/trunk/src/c/Makefile.am	(revision 3672)
+++ /issm/trunk/src/c/Makefile.am	(revision 3673)
@@ -61,18 +61,19 @@
 					./objects/Tria.h\
 					./objects/Tria.cpp\
-					./objects/TriaVertexInput.h\
-					./objects/TriaVertexInput.cpp\
-					./objects/SingVertexInput.h\
-					./objects/SingVertexInput.cpp\
-					./objects/BeamVertexInput.h\
-					./objects/BeamVertexInput.cpp\
-					./objects/PentaVertexInput.h\
-					./objects/PentaVertexInput.cpp\
-					./objects/BoolInput.h\
-					./objects/BoolInput.cpp\
-					./objects/IntInput.h\
-					./objects/IntInput.cpp\
-					./objects/DoubleInput.h\
-					./objects/DoubleInput.cpp\
+					./objects/InputObjects/Input.h\
+					./objects/InputObjects/TriaVertexInput.h\
+					./objects/InputObjects/TriaVertexInput.cpp\
+					./objects/InputObjects/SingVertexInput.h\
+					./objects/InputObjects/SingVertexInput.cpp\
+					./objects/InputObjects/BeamVertexInput.h\
+					./objects/InputObjects/BeamVertexInput.cpp\
+					./objects/InputObjects/PentaVertexInput.h\
+					./objects/InputObjects/PentaVertexInput.cpp\
+					./objects/InputObjects/BoolInput.h\
+					./objects/InputObjects/BoolInput.cpp\
+					./objects/InputObjects/IntInput.h\
+					./objects/InputObjects/IntInput.cpp\
+					./objects/InputObjects/DoubleInput.h\
+					./objects/InputObjects/DoubleInput.cpp\
 					./objects/Sing.h\
 					./objects/Sing.cpp\
@@ -85,5 +86,4 @@
 					./objects/Matpar.h\
 					./objects/Matpar.cpp\
-					./objects/Input.h\
 					./objects/Spc.cpp\
 					./objects/Spc.h\
@@ -100,6 +100,23 @@
 					./objects/Numericalflux.cpp\
 					./objects/Numericalflux.h\
-					./objects/Param.cpp\
-					./objects/Param.h\
+					./objects/ParamObjects/Param.h\
+					./objects/ParamObjects/BoolParam.cpp\
+					./objects/ParamObjects/BoolParam.h\
+					./objects/ParamObjects/IntParam.cpp\
+					./objects/ParamObjects/IntParam.h\
+					./objects/ParamObjects/DoubleParam.cpp\
+					./objects/ParamObjects/DoubleParam.h\
+					./objects/ParamObjects/PetscMatParam.cpp\
+					./objects/ParamObjects/PetscMatParam.h\
+					./objects/ParamObjects/StringArrayParam.cpp\
+					./objects/ParamObjects/StringArrayParam.h\
+					./objects/ParamObjects/DoubleMatParam.cpp\
+					./objects/ParamObjects/DoubleMatParam.h\
+					./objects/ParamObjects/DoubleVecParam.cpp\
+					./objects/ParamObjects/DoubleVecParam.h\
+					./objects/ParamObjects/PetscVecParam.cpp\
+					./objects/ParamObjects/PetscVecParam.h\
+					./objects/ParamObjects/StringParam.cpp\
+					./objects/ParamObjects/StringParam.h\
 					./objects/NodeSets.cpp\
 					./objects/NodeSets.h\
@@ -476,18 +493,19 @@
 					./objects/Tria.h\
 					./objects/Tria.cpp\
-					./objects/TriaVertexInput.h\
-					./objects/TriaVertexInput.cpp\
-					./objects/SingVertexInput.h\
-					./objects/SingVertexInput.cpp\
-					./objects/BeamVertexInput.h\
-					./objects/BeamVertexInput.cpp\
-					./objects/PentaVertexInput.h\
-					./objects/PentaVertexInput.cpp\
-					./objects/BoolInput.h\
-					./objects/BoolInput.cpp\
-					./objects/IntInput.h\
-					./objects/IntInput.cpp\
-					./objects/DoubleInput.h\
-					./objects/DoubleInput.cpp\
+					./objects/InputObjects/Input.h\
+					./objects/InputObjects/TriaVertexInput.h\
+					./objects/InputObjects/TriaVertexInput.cpp\
+					./objects/InputObjects/SingVertexInput.h\
+					./objects/InputObjects/SingVertexInput.cpp\
+					./objects/InputObjects/BeamVertexInput.h\
+					./objects/InputObjects/BeamVertexInput.cpp\
+					./objects/InputObjects/PentaVertexInput.h\
+					./objects/InputObjects/PentaVertexInput.cpp\
+					./objects/InputObjects/BoolInput.h\
+					./objects/InputObjects/BoolInput.cpp\
+					./objects/InputObjects/IntInput.h\
+					./objects/InputObjects/IntInput.cpp\
+					./objects/InputObjects/DoubleInput.h\
+					./objects/InputObjects/DoubleInput.cpp\
 					./objects/Sing.h\
 					./objects/Sing.cpp\
@@ -500,5 +518,4 @@
 					./objects/Matpar.h\
 					./objects/Matpar.cpp\
-					./objects/Input.h\
 					./objects/Spc.cpp\
 					./objects/Spc.h\
@@ -515,6 +532,23 @@
 					./objects/Numericalflux.cpp\
 					./objects/Numericalflux.h\
-					./objects/Param.cpp\
-					./objects/Param.h\
+					./objects/ParamObjects/Param.h\
+					./objects/ParamObjects/BoolParam.cpp\
+					./objects/ParamObjects/BoolParam.h\
+					./objects/ParamObjects/IntParam.cpp\
+					./objects/ParamObjects/IntParam.h\
+					./objects/ParamObjects/DoubleParam.cpp\
+					./objects/ParamObjects/DoubleParam.h\
+					./objects/ParamObjects/PetscMatParam.cpp\
+					./objects/ParamObjects/PetscMatParam.h\
+					./objects/ParamObjects/StringArrayParam.cpp\
+					./objects/ParamObjects/StringArrayParam.h\
+					./objects/ParamObjects/DoubleMatParam.cpp\
+					./objects/ParamObjects/DoubleMatParam.h\
+					./objects/ParamObjects/DoubleVecParam.cpp\
+					./objects/ParamObjects/DoubleVecParam.h\
+					./objects/ParamObjects/PetscVecParam.cpp\
+					./objects/ParamObjects/PetscVecParam.h\
+					./objects/ParamObjects/StringParam.cpp\
+					./objects/ParamObjects/StringParam.h\
 					./objects/NodeSets.cpp\
 					./objects/NodeSets.h\
Index: /issm/trunk/src/c/MassFluxx/MassFluxx.cpp
===================================================================
--- /issm/trunk/src/c/MassFluxx/MassFluxx.cpp	(revision 3672)
+++ /issm/trunk/src/c/MassFluxx/MassFluxx.cpp	(revision 3673)
@@ -10,5 +10,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void MassFluxx(double* pmass_flux, DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials,DataSet* parameters,  double* segments,int num_segments,double* ug){
+void MassFluxx(double* pmass_flux, DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials,Parameters* parameters,  double* segments,int num_segments,double* ug){
 
 	int i,j;
@@ -35,5 +35,5 @@
 		for(j=0;j<elements->Size();j++){
 			element=(Element*)elements->GetObjectByOffset(j);
-			if (element->GetId()==element_id){
+			if (element->Id()==element_id){
 				/*We found the element which owns this segment, use it to compute the mass flux: */
 				mass_flux+=element->MassFlux(segments+5*i+0,ug);
Index: /issm/trunk/src/c/MassFluxx/MassFluxx.h
===================================================================
--- /issm/trunk/src/c/MassFluxx/MassFluxx.h	(revision 3672)
+++ /issm/trunk/src/c/MassFluxx/MassFluxx.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void MassFluxx(double* pmass_flux, DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, DataSet* parameters,double* segments,int num_segments,double* ug);
+void MassFluxx(double* pmass_flux, DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, Parameters* parameters,double* segments,int num_segments,double* ug);
 
 
Index: /issm/trunk/src/c/Misfitx/Misfitx.cpp
===================================================================
--- /issm/trunk/src/c/Misfitx/Misfitx.cpp	(revision 3672)
+++ /issm/trunk/src/c/Misfitx/Misfitx.cpp	(revision 3673)
@@ -11,6 +11,6 @@
 #include "../SurfaceAreax/SurfaceAreax.h"
 
-void Misfitx( double* pJ, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials,DataSet* parameters,
-			ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+void Misfitx( double* pJ, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials,Parameters* parameters,
+			int analysis_type,int sub_analysis_type){
 	
 	/*Intermediary*/
@@ -27,14 +27,13 @@
 	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
 
-	/*If fit=3, compute Surface Area*/
-	if(!inputs->Recover("fit",&fit)) ISSMERROR(" missing fit input parameter");
-	if (fit==3 && !inputs->IsPresent("surfacearea")){
+	/*Compute surface area: */
+	SurfaceAreax(&S,elements,nodes,vertices, loads,materials,parameters,analysis_type,sub_analysis_type);
 
-		SurfaceAreax(&S,elements,nodes,vertices, loads,materials,parameters,inputs,analysis_type,sub_analysis_type);
-		inputs->Add("surfacearea",S);
-	}
+	/*add surface area to elements :*/
+	elements->AddInput(S,SurfaceAreaEnum);
+	
 
 	/*Compute Misfit: */
-	elements->Misfit(&J,inputs,analysis_type,sub_analysis_type);
+	elements->Misfit(&J,analysis_type,sub_analysis_type);
 
 	/*Sum all J from all cpus of the cluster:*/
Index: /issm/trunk/src/c/Misfitx/Misfitx.h
===================================================================
--- /issm/trunk/src/c/Misfitx/Misfitx.h	(revision 3672)
+++ /issm/trunk/src/c/Misfitx/Misfitx.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void Misfitx( double* pJ, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters, 
+void Misfitx( double* pJ, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters, 
 			int analysis_type,int sub_analysis_type);
 
Index: /issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateParametersBalancedthickness.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateParametersBalancedthickness.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateParametersBalancedthickness.cpp	(revision 3673)
@@ -9,8 +9,8 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersBalancedthickness(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersBalancedthickness(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	Param*   param = NULL;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 	int      count;
 	int      i;
@@ -44,29 +44,29 @@
 	xfree((void**)&u_g);
 
-	/*Get melting: */
-	IoModelFetchData(&iomodel->melting,NULL,NULL,iomodel_handle,"melting");
-	if(iomodel->melting) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting[i]=iomodel->melting[i]/iomodel->yts;
+	/*Get melting_rate: */
+	IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
+	if(iomodel->melting_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting_rate[i]=iomodel->melting_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"m_g",DOUBLEVEC);
-	if(iomodel->melting) param->SetDoubleVec(iomodel->melting,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->melting,0,1);
+	if(iomodel->melting_rate) param->SetDoubleVec(iomodel->melting_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->melting_rate,0,1);
 	parameters->AddObject(param);
 
-	/*Free melting: */
-	xfree((void**)&iomodel->melting);
+	/*Free melting_rate: */
+	xfree((void**)&iomodel->melting_rate);
 
-	/*Get accumulation: */
-	IoModelFetchData(&iomodel->accumulation,NULL,NULL,iomodel_handle,"accumulation");
-	if(iomodel->accumulation) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation[i]=iomodel->accumulation[i]/iomodel->yts;
+	/*Get accumulation_rate: */
+	IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate");
+	if(iomodel->accumulation_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation_rate[i]=iomodel->accumulation_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"a_g",DOUBLEVEC);
-	if(iomodel->accumulation) param->SetDoubleVec(iomodel->accumulation,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->accumulation,0,0);
+	if(iomodel->accumulation_rate) param->SetDoubleVec(iomodel->accumulation_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->accumulation_rate,0,0);
 	parameters->AddObject(param);
 
-	/*Free accumulation: */
-	xfree((void**)&iomodel->accumulation);
+	/*Free accumulation_rate: */
+	xfree((void**)&iomodel->accumulation_rate);
 
 	/*Assign output pointer: */
Index: /issm/trunk/src/c/ModelProcessorx/Balancedthickness2/CreateLoadsBalancedthickness2.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Balancedthickness2/CreateLoadsBalancedthickness2.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Balancedthickness2/CreateLoadsBalancedthickness2.cpp	(revision 3673)
@@ -14,18 +14,8 @@
 
 	/*Intermediary*/
-	int i,j;
-	int i1,i2;
-	int pos1,pos2;
-	double e1,e2;
+	int i;
 
 	/*Output*/
 	DataSet* loads=NULL;
-
-	/*numericalflux intermediary data: */
-	char numericalflux_type[NUMERICALFLUXSTRING];
-	int  numericalflux_id;
-	int  numericalflux_node_ids[MAX_NUMERICALFLUX_NODES];
-	int  numericalflux_elem_id;
-	double numericalflux_h[MAX_NUMERICALFLUX_NODES];
 
 	/*Create loads: */
@@ -39,67 +29,5 @@
 	/*First load data:*/
 	for (i=0;i<iomodel->numberofedges;i++){
-
-		/*Get left and right elements*/
-		e1=iomodel->edges[4*i+2]-1; //edges are [node1 node2 elem1 elem2]
-		e2=iomodel->edges[4*i+3]-1; //edges are [node1 node2 elem1 elem2]
-
-		/*Now, if this element is not in the partition, pass: */
-		if(!iomodel->my_elements[(int)e1]) continue;
-
-		/*Create load*/
-		numericalflux_id=i+1; //Matlab indexing
-		numericalflux_elem_id=(int)e1+1;//id is in matlab index
-
-		/*1: Get vertices ids*/
-		i1=(int)iomodel->edges[4*i+0];
-		i2=(int)iomodel->edges[4*i+1];
-
-		if (!isnan(e2)){
-			strcpy(numericalflux_type,"internal");
-
-			/*Now, we must get the nodes of the 4 nodes located on the edge*/
-
-			/*2: Get the column where these ids are located in the index*/
-			pos1=pos2=UNDEF;
-			for(j=0;j<3;j++){
-				if (iomodel->elements[3*(int)e1+j]==i1) pos1=j+1;
-				if (iomodel->elements[3*(int)e2+j]==i1) pos2=j+1;
-			}
-			ISSMASSERT(pos1!=UNDEF && pos2!=UNDEF);
-
-			/*3: We have the id of the elements and the position of the vertices in the index
-			 * we can compute their dofs!*/
-			numericalflux_node_ids[0]=3*(int)e1+pos1;       //ex: 1 2 3
-			numericalflux_node_ids[1]=3*(int)e1+(pos1%3)+1; //ex: 2 3 1
-			numericalflux_node_ids[2]=3*(int)e2+pos2;           //ex: 1 2 3
-			numericalflux_node_ids[3]=3*(int)e2+((pos2+1)%3)+1; //ex: 3 1 2
-
-			numericalflux_h[0]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[0]-1] -1];
-			numericalflux_h[1]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[1]-1]-1];
-			numericalflux_h[2]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[2]-1]-1];
-			numericalflux_h[3]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[3]-1]-1];
-		}
-		else{
-			strcpy(numericalflux_type,"boundary");
-
-			/*2: Get the column where these ids are located in the index*/
-			pos1==UNDEF;
-			for(j=0;j<3;j++){
-				if (iomodel->elements[3*(int)e1+j]==i1) pos1=j+1;
-			}
-			ISSMASSERT(pos1!=UNDEF);
-
-			/*3: We have the id of the elements and the position of the vertices in the index
-			 * we can compute their dofs!*/
-			numericalflux_node_ids[0]=3*(int)e1+pos1;
-			numericalflux_node_ids[1]=3*(int)e1+(pos1%3)+1;
-
-			numericalflux_h[0]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[0]-1]-1];
-			numericalflux_h[1]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[1]-1]-1];
-			numericalflux_h[2]=UNDEF;
-			numericalflux_h[3]=UNDEF;
-		}
-
-		loads->AddObject(new Numericalflux(numericalflux_id,numericalflux_type,numericalflux_node_ids,numericalflux_elem_id,numericalflux_h));
+		loads->AddObject(new Numericalflux(i+1,i,iomodel));
 	}
 
Index: /issm/trunk/src/c/ModelProcessorx/Balancedthickness2/CreateParametersBalancedthickness2.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Balancedthickness2/CreateParametersBalancedthickness2.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Balancedthickness2/CreateParametersBalancedthickness2.cpp	(revision 3673)
@@ -10,8 +10,8 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersBalancedthickness2(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersBalancedthickness2(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	Param*   param = NULL;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 	int      count;
 	int      i;
@@ -74,29 +74,29 @@
 	xfree((void**)&iomodel->dhdt);
 
-	/*Get melting: */
-	IoModelFetchData(&iomodel->melting,NULL,NULL,iomodel_handle,"melting");
-	if(iomodel->melting) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting[i]=iomodel->melting[i]/iomodel->yts;
+	/*Get melting_rate: */
+	IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
+	if(iomodel->melting_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting_rate[i]=iomodel->melting_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"m_g",DOUBLEVEC);
-	if(iomodel->melting) param->SetDoubleVec(iomodel->melting,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->melting,0,1);
+	if(iomodel->melting_rate) param->SetDoubleVec(iomodel->melting_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->melting_rate,0,1);
 	parameters->AddObject(param);
 
-	/*Free melting: */
-	xfree((void**)&iomodel->melting);
+	/*Free melting_rate: */
+	xfree((void**)&iomodel->melting_rate);
 
-	/*Get accumulation: */
-	IoModelFetchData(&iomodel->accumulation,NULL,NULL,iomodel_handle,"accumulation");
-	if(iomodel->accumulation) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation[i]=iomodel->accumulation[i]/iomodel->yts;
+	/*Get accumulation_rate: */
+	IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate");
+	if(iomodel->accumulation_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation_rate[i]=iomodel->accumulation_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"a_g",DOUBLEVEC);
-	if(iomodel->accumulation) param->SetDoubleVec(iomodel->accumulation,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->accumulation,0,0);
+	if(iomodel->accumulation_rate) param->SetDoubleVec(iomodel->accumulation_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->accumulation_rate,0,0);
 	parameters->AddObject(param);
 
-	/*Free accumulation: */
-	xfree((void**)&iomodel->accumulation);
+	/*Free accumulation_rate: */
+	xfree((void**)&iomodel->accumulation_rate);
 
 	/*Assign output pointer: */
Index: /issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateParametersBalancedvelocities.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateParametersBalancedvelocities.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateParametersBalancedvelocities.cpp	(revision 3673)
@@ -10,8 +10,8 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersBalancedvelocities(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersBalancedvelocities(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	Param*   param = NULL;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 	int      count;
 	int      i;
@@ -56,29 +56,29 @@
 	xfree((void**)&iomodel->thickness);
 
-	/*Get melting: */
-	IoModelFetchData(&iomodel->melting,NULL,NULL,iomodel_handle,"melting");
-	if(iomodel->melting) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting[i]=iomodel->melting[i]/iomodel->yts;
+	/*Get melting_rate: */
+	IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
+	if(iomodel->melting_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting_rate[i]=iomodel->melting_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"m_g",DOUBLEVEC);
-	if(iomodel->melting) param->SetDoubleVec(iomodel->melting,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->melting,0,1);
+	if(iomodel->melting_rate) param->SetDoubleVec(iomodel->melting_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->melting_rate,0,1);
 	parameters->AddObject(param);
 
-	/*Free melting: */
-	xfree((void**)&iomodel->melting);
+	/*Free melting_rate: */
+	xfree((void**)&iomodel->melting_rate);
 
-	/*Get accumulation: */
-	IoModelFetchData(&iomodel->accumulation,NULL,NULL,iomodel_handle,"accumulation");
-	if(iomodel->accumulation) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation[i]=iomodel->accumulation[i]/iomodel->yts;
+	/*Get accumulation_rate: */
+	IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate");
+	if(iomodel->accumulation_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation_rate[i]=iomodel->accumulation_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"a_g",DOUBLEVEC);
-	if(iomodel->accumulation) param->SetDoubleVec(iomodel->accumulation,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->accumulation,0,0);
+	if(iomodel->accumulation_rate) param->SetDoubleVec(iomodel->accumulation_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->accumulation_rate,0,0);
 	parameters->AddObject(param);
 
-	/*Free accumulation: */
-	xfree((void**)&iomodel->accumulation);
+	/*Free accumulation_rate: */
+	xfree((void**)&iomodel->accumulation_rate);
 
 
Index: /issm/trunk/src/c/ModelProcessorx/Control/CreateParametersControl.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Control/CreateParametersControl.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Control/CreateParametersControl.cpp	(revision 3673)
@@ -11,9 +11,9 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersControl(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersControl(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	int i;
 	
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 	Param*   param = NULL;
 	int      count;
Index: /issm/trunk/src/c/ModelProcessorx/CreateDataSets.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/CreateDataSets.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/CreateDataSets.cpp	(revision 3673)
@@ -13,4 +13,5 @@
 #include "../include/macros.h"
 #include "../EnumDefinitions/EnumDefinitions.h"
+#include "./ModelProcessorx/ModelProcessorx.h"
 
 
Index: /issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp	(revision 3673)
@@ -11,11 +11,10 @@
 #include "./IoModel.h"
 
-void CreateParameters(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParameters(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	int i;
 	
-	DataSet* parameters = NULL;
+	Parameters* parameters = NULL;
 	Param*   param = NULL;
-	Numpar*  numpar=NULL;
 	int      count=0;
 	int      numberofdofspernode;
@@ -30,5 +29,5 @@
 
 	/*Initialize dataset: */
-	parameters   = new DataSet(ParametersEnum);
+	parameters   = new Parameters(ParametersEnum);
 
 	//outputfilename
@@ -37,4 +36,5 @@
 	param->SetString(iomodel->outputfilename);
 	parameters->AddObject(param);
+   
 
 	//dimension 2d or 3d:
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateParametersDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateParametersDiagnosticHoriz.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateParametersDiagnosticHoriz.cpp	(revision 3673)
@@ -10,8 +10,8 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersDiagnosticHoriz(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersDiagnosticHoriz(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	Param*   param = NULL;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 	int      count;
 	int i;
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp	(revision 3673)
@@ -46,7 +46,7 @@
 	IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
 	IoModelFetchData(&iomodel->uppernodes,NULL,NULL,iomodel_handle,"uppergrids");
-	IoModelFetchData(&iomodel->drag,NULL,NULL,iomodel_handle,"drag");
-	IoModelFetchData(&iomodel->B,NULL,NULL,iomodel_handle,"B");
-	IoModelFetchData(&iomodel->n,NULL,NULL,iomodel_handle,"n");
+	IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
+	IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
+	IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
 
 	/*2d mesh: */
@@ -97,7 +97,7 @@
 	xfree((void**)&iomodel->gridonsurface);
 	xfree((void**)&iomodel->uppernodes);
-	xfree((void**)&iomodel->drag);
-	xfree((void**)&iomodel->B);
-	xfree((void**)&iomodel->n);
+	xfree((void**)&iomodel->drag_coefficient);
+	xfree((void**)&iomodel->rheology_B);
+	xfree((void**)&iomodel->rheology_n);
 
 	/*Add new constrant material property to materials, at the end: */
@@ -108,5 +108,4 @@
 		materials->AddObject(new Matpar(iomodel->numberofvertices2d*(iomodel->numlayers-1)+1,iomodel)); //put it at the end of the materials
 	}
-}
 		
 	/*First fetch data: */
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateElementsNodesAndMaterialsDiagnosticStokes.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateElementsNodesAndMaterialsDiagnosticStokes.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateElementsNodesAndMaterialsDiagnosticStokes.cpp	(revision 3673)
@@ -43,15 +43,15 @@
 	IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
 	IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
-	IoModelFetchData(&iomodel->drag,NULL,NULL,iomodel_handle,"drag");
-	IoModelFetchData(&iomodel->p,NULL,NULL,iomodel_handle,"p");
-	IoModelFetchData(&iomodel->q,NULL,NULL,iomodel_handle,"q");
+	IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
+	IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,"drag_p");
+	IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,"drag_q");
 	IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
 	IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
 	IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
 	IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
-	IoModelFetchData(&iomodel->B,NULL,NULL,iomodel_handle,"B");
-	IoModelFetchData(&iomodel->n,NULL,NULL,iomodel_handle,"n");
-	IoModelFetchData(&iomodel->accumulation,NULL,NULL,iomodel_handle,"accumulation");
-	IoModelFetchData(&iomodel->melting,NULL,NULL,iomodel_handle,"melting");
+	IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
+	IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
+	IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate");
+	IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
 	IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
 
@@ -77,15 +77,15 @@
 	xfree((void**)&iomodel->surface);
 	xfree((void**)&iomodel->bed);
-	xfree((void**)&iomodel->drag);
-	xfree((void**)&iomodel->p);
-	xfree((void**)&iomodel->q);
+	xfree((void**)&iomodel->drag_coefficient);
+	xfree((void**)&iomodel->drag_p);
+	xfree((void**)&iomodel->drag_q);
 	xfree((void**)&iomodel->elementoniceshelf);
 	xfree((void**)&iomodel->elementonbed);
 	xfree((void**)&iomodel->elementonsurface);
 	xfree((void**)&iomodel->elements_type);
-	xfree((void**)&iomodel->n);
-	xfree((void**)&iomodel->B);
-	xfree((void**)&iomodel->accumulation);
-	xfree((void**)&iomodel->melting);
+	xfree((void**)&iomodel->rheology_n);
+	xfree((void**)&iomodel->rheology_B);
+	xfree((void**)&iomodel->accumulation_rate);
+	xfree((void**)&iomodel->melting_rate);
 	xfree((void**)&iomodel->elementonwater);
 
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp	(revision 3673)
@@ -53,5 +53,5 @@
 
 		/*Create and  add load: */
-		loads->AddObject(new Icefront(i,iomodel));
+		loads->AddObject(new Icefront(counter,i,iomodel));
 		counter++;
 
@@ -68,5 +68,5 @@
 	IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
 	IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes");
-	iomodel->CreateSingleNodeToElementConnectivity;
+	iomodel->CreateSingleNodeToElementConnectivity();
 	
 	for (i=0;i<iomodel->numberofvertices;i++){
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateElementsNodesAndMaterialsDiagnosticVert.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateElementsNodesAndMaterialsDiagnosticVert.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateElementsNodesAndMaterialsDiagnosticVert.cpp	(revision 3673)
@@ -45,6 +45,6 @@
 	IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
 	IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
-	IoModelFetchData(&iomodel->melting,NULL,NULL,iomodel_handle,"melting");
-	IoModelFetchData(&iomodel->accumulation,NULL,NULL,iomodel_handle,"accumulation");
+	IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
+	IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate");
 	IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
 	
@@ -72,6 +72,6 @@
 	xfree((void**)&iomodel->elementonsurface);
 	xfree((void**)&iomodel->elements_type);
-	xfree((void**)&iomodel->melting);
-	xfree((void**)&iomodel->accumulation);
+	xfree((void**)&iomodel->melting_rate);
+	xfree((void**)&iomodel->accumulation_rate);
 	xfree((void**)&iomodel->elementonwater);
 
Index: /issm/trunk/src/c/ModelProcessorx/IoModel.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/IoModel.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/IoModel.cpp	(revision 3673)
@@ -36,79 +36,79 @@
 
 	#ifdef _PARALLEL_
-	xfree((void**)&iomodel->x);
-	xfree((void**)&iomodel->y);
-	xfree((void**)&iomodel->z);
-	xfree((void**)&iomodel->elements);
-	xfree((void**)&iomodel->elements_type);
-	xfree((void**)&iomodel->gridonhutter);
-	xfree((void**)&iomodel->gridonmacayeal);
-	if (strcmp(iomodel->meshtype,"3d")==0){
-		xfree((void**)&iomodel->elements2d);
-		xfree((void**)&iomodel->deadgrids);
-		xfree((void**)&iomodel->uppernodes);
-		xfree((void**)&iomodel->gridonpattyn);
+	xfree((void**)&this->x);
+	xfree((void**)&this->y);
+	xfree((void**)&this->z);
+	xfree((void**)&this->elements);
+	xfree((void**)&this->elements_type);
+	xfree((void**)&this->gridonhutter);
+	xfree((void**)&this->gridonmacayeal);
+	if (strcmp(this->meshtype,"3d")==0){
+		xfree((void**)&this->elements2d);
+		xfree((void**)&this->deadgrids);
+		xfree((void**)&this->uppernodes);
+		xfree((void**)&this->gridonpattyn);
 	}
-	xfree((void**)&iomodel->solverstring);
-	xfree((void**)&iomodel->elementonbed);
-	xfree((void**)&iomodel->elementonsurface);
-	xfree((void**)&iomodel->gridonbed);
-	xfree((void**)&iomodel->gridonsurface);
-	xfree((void**)&iomodel->gridonstokes);
-	xfree((void**)&iomodel->borderstokes);
-	xfree((void**)&iomodel->thickness);
-	xfree((void**)&iomodel->surface);
-	xfree((void**)&iomodel->bed);
-	xfree((void**)&iomodel->vx_obs);
-	xfree((void**)&iomodel->vy_obs);
-	xfree((void**)&iomodel->vx);
-	xfree((void**)&iomodel->vy);
-	xfree((void**)&iomodel->vz);
-	xfree((void**)&iomodel->pressure);
-	xfree((void**)&iomodel->temperature);
-	xfree((void**)&iomodel->drag_coefficient);
-	xfree((void**)&iomodel->drag_p);
-	xfree((void**)&iomodel->drag_q);
-	xfree((void**)&iomodel->elementoniceshelf);
-	xfree((void**)&iomodel->elementonwater);
-	xfree((void**)&iomodel->gridonicesheet);
-	xfree((void**)&iomodel->gridoniceshelf);
-	xfree((void**)&iomodel->pressureload);
-	xfree((void**)&iomodel->spcvelocity);
-	xfree((void**)&iomodel->spcthickness);
-	xfree((void**)&iomodel->spctemperature);
-	xfree((void**)&iomodel->edges);
-	xfree((void**)&iomodel->geothermalflux);
-	xfree((void**)&iomodel->melting_rate);
-	xfree((void**)&iomodel->accumulation_rate);
-	xfree((void**)&iomodel->dhdt);
-	xfree((void**)&iomodel->rheology_B);
-	xfree((void**)&iomodel->rheology_n);
-	xfree((void**)&iomodel->fit);
-	xfree((void**)&iomodel->weights);
-	xfree((void**)&iomodel->cm_jump);
-	xfree((void**)&iomodel->optscal);
-	xfree((void**)&iomodel->maxiter);
+	xfree((void**)&this->solverstring);
+	xfree((void**)&this->elementonbed);
+	xfree((void**)&this->elementonsurface);
+	xfree((void**)&this->gridonbed);
+	xfree((void**)&this->gridonsurface);
+	xfree((void**)&this->gridonstokes);
+	xfree((void**)&this->borderstokes);
+	xfree((void**)&this->thickness);
+	xfree((void**)&this->surface);
+	xfree((void**)&this->bed);
+	xfree((void**)&this->vx_obs);
+	xfree((void**)&this->vy_obs);
+	xfree((void**)&this->vx);
+	xfree((void**)&this->vy);
+	xfree((void**)&this->vz);
+	xfree((void**)&this->pressure);
+	xfree((void**)&this->temperature);
+	xfree((void**)&this->drag_coefficient);
+	xfree((void**)&this->drag_p);
+	xfree((void**)&this->drag_q);
+	xfree((void**)&this->elementoniceshelf);
+	xfree((void**)&this->elementonwater);
+	xfree((void**)&this->gridonicesheet);
+	xfree((void**)&this->gridoniceshelf);
+	xfree((void**)&this->pressureload);
+	xfree((void**)&this->spcvelocity);
+	xfree((void**)&this->spcthickness);
+	xfree((void**)&this->spctemperature);
+	xfree((void**)&this->edges);
+	xfree((void**)&this->geothermalflux);
+	xfree((void**)&this->melting_rate);
+	xfree((void**)&this->accumulation_rate);
+	xfree((void**)&this->dhdt);
+	xfree((void**)&this->rheology_B);
+	xfree((void**)&this->rheology_n);
+	xfree((void**)&this->fit);
+	xfree((void**)&this->weights);
+	xfree((void**)&this->cm_jump);
+	xfree((void**)&this->optscal);
+	xfree((void**)&this->maxiter);
 
 
 	/*!Delete structure fields: */
-	xfree((void**)&iomodel->inputfilename);
-	xfree((void**)&iomodel->outputfilename);
-	xfree((void**)&iomodel->repository);
-	xfree((void**)&iomodel->meshtype);
-	xfree((void**)&iomodel->name);
-	
-	xfree((void**)&iomodel->riftinfo);
-	
-	xfree((void**)&iomodel->penalties);
-	xfree((void**)&iomodel->penaltypartitioning);
-	
-	xfree((void**)&iomodel->control_type);
+	xfree((void**)&this->inputfilename);
+	xfree((void**)&this->outputfilename);
+	xfree((void**)&this->repository);
+	xfree((void**)&this->meshtype);
+	xfree((void**)&this->name);
+	
+	xfree((void**)&this->riftinfo);
+	
+	xfree((void**)&this->penalties);
+	xfree((void**)&this->penaltypartitioning);
+	
+	xfree((void**)&this->control_type);
 	
 	/*exterior data: */
-	xfree((void**)&iomodel->my_elements);
-	xfree((void**)&iomodel->my_vertices);
-	xfree((void**)&iomodel->my_nodes);
-	xfree((void**)&iomodel->my_bordervertices);
-	xfree((void**)&iomodel->penaltypartitioning);
+	xfree((void**)&this->my_elements);
+	xfree((void**)&this->my_vertices);
+	xfree((void**)&this->my_nodes);
+	xfree((void**)&this->my_bordervertices);
+	xfree((void**)&this->penaltypartitioning);
 	#endif
 }
@@ -124,103 +124,98 @@
 	/*Get all the data that consists of scalars, integers and strings: */
 
-	IoModelFetchData(&iomodel->name,iomodel_handle,"name"); 
-	IoModelFetchData(&iomodel->inputfilename,iomodel_handle,"inputfilename"); 
-	IoModelFetchData(&iomodel->outputfilename,iomodel_handle,"outputfilename"); 
-	IoModelFetchData(&iomodel->analysis_type,iomodel_handle,"analysis_type"); 
-	IoModelFetchData(&iomodel->sub_analysis_type,iomodel_handle,"sub_analysis_type"); 
-	IoModelFetchData(&iomodel->qmu_analysis,iomodel_handle,"qmu_analysis"); 
-	IoModelFetchData(&iomodel->control_analysis,iomodel_handle,"control_analysis"); 
-	IoModelFetchData(&iomodel->meshtype,iomodel_handle,"type");
+	IoModelFetchData(&this->name,iomodel_handle,"name"); 
+	IoModelFetchData(&this->inputfilename,iomodel_handle,"inputfilename"); 
+	IoModelFetchData(&this->outputfilename,iomodel_handle,"outputfilename"); 
+	IoModelFetchData(&this->analysis_type,iomodel_handle,"analysis_type"); 
+	IoModelFetchData(&this->sub_analysis_type,iomodel_handle,"sub_analysis_type"); 
+	IoModelFetchData(&this->qmu_analysis,iomodel_handle,"qmu_analysis"); 
+	IoModelFetchData(&this->control_analysis,iomodel_handle,"control_analysis"); 
+	IoModelFetchData(&this->meshtype,iomodel_handle,"type");
 	/*!Get numberofelements and numberofvertices: */
-	IoModelFetchData(&iomodel->numberofvertices,iomodel_handle,"numberofgrids");
-	IoModelFetchData(&iomodel->numberofelements,iomodel_handle,"numberofelements");
+	IoModelFetchData(&this->numberofvertices,iomodel_handle,"numberofgrids");
+	IoModelFetchData(&this->numberofelements,iomodel_handle,"numberofelements");
 	/*!In case we are running 3d, we are going to need the collapsed and non-collapsed 2d meshes, from which the 3d mesh was extruded: */
-	if (strcmp(iomodel->meshtype,"3d")==0){
+	if (strcmp(this->meshtype,"3d")==0){
 	
 		/*!Deal with 2d mesh: */
-		IoModelFetchData(&iomodel->numberofelements2d,iomodel_handle,"numberofelements2d");
-		IoModelFetchData(&iomodel->numberofvertices2d,iomodel_handle,"numberofgrids2d");
-		IoModelFetchData(&iomodel->numlayers,iomodel_handle,"numlayers");
+		IoModelFetchData(&this->numberofelements2d,iomodel_handle,"numberofelements2d");
+		IoModelFetchData(&this->numberofvertices2d,iomodel_handle,"numberofgrids2d");
+		IoModelFetchData(&this->numlayers,iomodel_handle,"numlayers");
 	}
 
 
 	/*elements type: */
-	IoModelFetchData(&iomodel->ishutter,iomodel_handle,"ishutter");
-	IoModelFetchData(&iomodel->ismacayealpattyn,iomodel_handle,"ismacayealpattyn");
-	IoModelFetchData(&iomodel->isstokes,iomodel_handle,"isstokes");
+	IoModelFetchData(&this->ishutter,iomodel_handle,"ishutter");
+	IoModelFetchData(&this->ismacayealpattyn,iomodel_handle,"ismacayealpattyn");
+	IoModelFetchData(&this->isstokes,iomodel_handle,"isstokes");
 
 	/*!Get drag_type, drag and p,q: */
-	IoModelFetchData(&iomodel->drag_type,iomodel_handle,"drag_type");
+	IoModelFetchData(&this->drag_type,iomodel_handle,"drag_type");
 
 	/*!Get materials: */
-	IoModelFetchData(&iomodel->rho_water,iomodel_handle,"rho_water");
-	IoModelFetchData(&iomodel->rho_ice,iomodel_handle,"rho_ice");
-	IoModelFetchData(&iomodel->g,iomodel_handle,"g");
+	IoModelFetchData(&this->rho_water,iomodel_handle,"rho_water");
+	IoModelFetchData(&this->rho_ice,iomodel_handle,"rho_ice");
+	IoModelFetchData(&this->g,iomodel_handle,"g");
 
 	/*Get control parameters: */
-	IoModelFetchData(&iomodel->control_type,iomodel_handle,"control_type"); 
+	IoModelFetchData(&this->control_type,iomodel_handle,"control_type"); 
 
 	/*!Get solution parameters: */
-	IoModelFetchData(&iomodel->yts,iomodel_handle,"yts");
-	IoModelFetchData(&iomodel->meanvel,iomodel_handle,"meanvel");
-	IoModelFetchData(&iomodel->epsvel,iomodel_handle,"epsvel");
-	IoModelFetchData(&iomodel->verbose,iomodel_handle,"verbose");
-	IoModelFetchData(&iomodel->plot,iomodel_handle,"plot");
-	IoModelFetchData(&iomodel->artificial_diffusivity,iomodel_handle,"artificial_diffusivity");
-	IoModelFetchData(&iomodel->nsteps,iomodel_handle,"nsteps");
-	IoModelFetchData(&iomodel->eps_cm,iomodel_handle,"eps_cm");
-	IoModelFetchData(&iomodel->tolx,iomodel_handle,"tolx");
-	IoModelFetchData(&iomodel->cm_noisedmp,iomodel_handle,"cm_noisedmp");
-	IoModelFetchData(&iomodel->cm_mindmp_value,iomodel_handle,"cm_mindmp_value");
-	IoModelFetchData(&iomodel->cm_mindmp_slope,iomodel_handle,"cm_mindmp_slope");
-	IoModelFetchData(&iomodel->cm_maxdmp_value,iomodel_handle,"cm_maxdmp_value");
-	IoModelFetchData(&iomodel->cm_maxdmp_slope,iomodel_handle,"cm_maxdmp_slope");
-	IoModelFetchData(&iomodel->cm_min,iomodel_handle,"cm_min");
-	IoModelFetchData(&iomodel->cm_max,iomodel_handle,"cm_max");
-	IoModelFetchData(&iomodel->cm_gradient,iomodel_handle,"cm_gradient");
-	IoModelFetchData(&iomodel->eps_res,iomodel_handle,"eps_res");
-	IoModelFetchData(&iomodel->eps_rel,iomodel_handle,"eps_rel");
-	IoModelFetchData(&iomodel->eps_abs,iomodel_handle,"eps_abs");
-	IoModelFetchData(&iomodel->max_nonlinear_iterations,iomodel_handle,"max_nonlinear_iterations");
-	IoModelFetchData(&iomodel->dt,iomodel_handle,"dt");
-	IoModelFetchData(&iomodel->ndt,iomodel_handle,"ndt");
-	IoModelFetchData(&iomodel->penalty_offset,iomodel_handle,"penalty_offset");
-	IoModelFetchData(&iomodel->penalty_melting,iomodel_handle,"penalty_melting");
-	IoModelFetchData(&iomodel->penalty_lock,iomodel_handle,"penalty_lock");
-	IoModelFetchData(&iomodel->sparsity,iomodel_handle,"sparsity");
-	IoModelFetchData(&iomodel->connectivity,iomodel_handle,"connectivity");
-	IoModelFetchData(&iomodel->lowmem,iomodel_handle,"lowmem");
-	IoModelFetchData(&iomodel->solverstring,iomodel_handle,"solverstring");
-	IoModelFetchData(&iomodel->viscosity_overshoot,iomodel_handle,"viscosity_overshoot");
-	IoModelFetchData(&iomodel->artdiff,iomodel_handle,"artificial_diffusivity");
-	IoModelFetchData(&iomodel->stokesreconditioning,iomodel_handle,"stokesreconditioning");
-	IoModelFetchData(&iomodel->waitonlock,iomodel_handle,"waitonlock");
+	IoModelFetchData(&this->yts,iomodel_handle,"yts");
+	IoModelFetchData(&this->meanvel,iomodel_handle,"meanvel");
+	IoModelFetchData(&this->epsvel,iomodel_handle,"epsvel");
+	IoModelFetchData(&this->verbose,iomodel_handle,"verbose");
+	IoModelFetchData(&this->plot,iomodel_handle,"plot");
+	IoModelFetchData(&this->artificial_diffusivity,iomodel_handle,"artificial_diffusivity");
+	IoModelFetchData(&this->nsteps,iomodel_handle,"nsteps");
+	IoModelFetchData(&this->eps_cm,iomodel_handle,"eps_cm");
+	IoModelFetchData(&this->tolx,iomodel_handle,"tolx");
+	IoModelFetchData(&this->cm_noisedmp,iomodel_handle,"cm_noisedmp");
+	IoModelFetchData(&this->cm_mindmp_value,iomodel_handle,"cm_mindmp_value");
+	IoModelFetchData(&this->cm_mindmp_slope,iomodel_handle,"cm_mindmp_slope");
+	IoModelFetchData(&this->cm_maxdmp_value,iomodel_handle,"cm_maxdmp_value");
+	IoModelFetchData(&this->cm_maxdmp_slope,iomodel_handle,"cm_maxdmp_slope");
+	IoModelFetchData(&this->cm_min,iomodel_handle,"cm_min");
+	IoModelFetchData(&this->cm_max,iomodel_handle,"cm_max");
+	IoModelFetchData(&this->cm_gradient,iomodel_handle,"cm_gradient");
+	IoModelFetchData(&this->eps_res,iomodel_handle,"eps_res");
+	IoModelFetchData(&this->eps_rel,iomodel_handle,"eps_rel");
+	IoModelFetchData(&this->eps_abs,iomodel_handle,"eps_abs");
+	IoModelFetchData(&this->max_nonlinear_iterations,iomodel_handle,"max_nonlinear_iterations");
+	IoModelFetchData(&this->dt,iomodel_handle,"dt");
+	IoModelFetchData(&this->ndt,iomodel_handle,"ndt");
+	IoModelFetchData(&this->penalty_offset,iomodel_handle,"penalty_offset");
+	IoModelFetchData(&this->penalty_melting,iomodel_handle,"penalty_melting");
+	IoModelFetchData(&this->penalty_lock,iomodel_handle,"penalty_lock");
+	IoModelFetchData(&this->sparsity,iomodel_handle,"sparsity");
+	IoModelFetchData(&this->connectivity,iomodel_handle,"connectivity");
+	IoModelFetchData(&this->lowmem,iomodel_handle,"lowmem");
+	IoModelFetchData(&this->solverstring,iomodel_handle,"solverstring");
+	IoModelFetchData(&this->viscosity_overshoot,iomodel_handle,"viscosity_overshoot");
+	IoModelFetchData(&this->artdiff,iomodel_handle,"artificial_diffusivity");
+	IoModelFetchData(&this->stokesreconditioning,iomodel_handle,"stokesreconditioning");
+	IoModelFetchData(&this->waitonlock,iomodel_handle,"waitonlock");
 
 	/*!Get thermal parameters: */
-	IoModelFetchData(&iomodel->beta,iomodel_handle,"beta");
-	IoModelFetchData(&iomodel->meltingpoint,iomodel_handle,"meltingpoint");
-	IoModelFetchData(&iomodel->latentheat,iomodel_handle,"latentheat");
-	IoModelFetchData(&iomodel->heatcapacity,iomodel_handle,"heatcapacity");
-	IoModelFetchData(&iomodel->thermalconductivity,iomodel_handle,"thermalconductivity");
-	IoModelFetchData(&iomodel->min_thermal_constraints,iomodel_handle,"min_thermal_constraints");
-	IoModelFetchData(&iomodel->min_mechanical_constraints,iomodel_handle,"min_mechanical_constraints");
-	IoModelFetchData(&iomodel->stabilize_constraints,iomodel_handle,"stabilize_constraints");
-	IoModelFetchData(&iomodel->mixed_layer_capacity,iomodel_handle,"mixed_layer_capacity");
-	IoModelFetchData(&iomodel->thermal_exchange_velocity,iomodel_handle,"thermal_exchange_velocity");
+	IoModelFetchData(&this->beta,iomodel_handle,"beta");
+	IoModelFetchData(&this->meltingpoint,iomodel_handle,"meltingpoint");
+	IoModelFetchData(&this->latentheat,iomodel_handle,"latentheat");
+	IoModelFetchData(&this->heatcapacity,iomodel_handle,"heatcapacity");
+	IoModelFetchData(&this->thermalconductivity,iomodel_handle,"thermalconductivity");
+	IoModelFetchData(&this->min_thermal_constraints,iomodel_handle,"min_thermal_constraints");
+	IoModelFetchData(&this->min_mechanical_constraints,iomodel_handle,"min_mechanical_constraints");
+	IoModelFetchData(&this->stabilize_constraints,iomodel_handle,"stabilize_constraints");
+	IoModelFetchData(&this->mixed_layer_capacity,iomodel_handle,"mixed_layer_capacity");
+	IoModelFetchData(&this->thermal_exchange_velocity,iomodel_handle,"thermal_exchange_velocity");
 	
 	/*qmu: */
-	if(iomodel->qmu_analysis){
-		IoModelFetchData(&iomodel->numberofvariables,iomodel_handle,"numberofvariables");
-		IoModelFetchData(&iomodel->numberofresponses,iomodel_handle,"numberofresponses");
-		IoModelFetchData(&iomodel->qmu_npart,iomodel_handle,"npart");
+	if(this->qmu_analysis){
+		IoModelFetchData(&this->numberofvariables,iomodel_handle,"numberofvariables");
+		IoModelFetchData(&this->numberofresponses,iomodel_handle,"numberofresponses");
+		IoModelFetchData(&this->qmu_npart,iomodel_handle,"npart");
 	}
 	
 	/*parameter output : */
-	IoModelFetchData(&iomodel->numoutput,iomodel_handle,"numoutput");
-
-	/*Assign output pointers: */
-	*piomodel=iomodel;
-
-	return 1;
+	IoModelFetchData(&this->numoutput,iomodel_handle,"numoutput");
 }
 /*}}}*/
@@ -229,159 +224,159 @@
 	
 	/*!initialize all pointers to 0: */
-	iomodel->name=NULL;
-	iomodel->inputfilename=NULL;
-	iomodel->outputfilename=NULL;
-	iomodel->repository=NULL;
-	iomodel->meshtype=NULL;
-	iomodel->analysis_type=0;
-	iomodel->sub_analysis_type=0;
-	iomodel->qmu_analysis=0;
-	iomodel->control_analysis=0;
-	iomodel->solverstring=NULL;
-	iomodel->numberofresponses=0;
-	iomodel->numberofvariables=0;
-	iomodel->qmu_npart=0; 
-	iomodel->numberofelements=0;
-	iomodel->numberofvertices=0;
-	iomodel->x=NULL; 
-	iomodel->y=NULL;
-	iomodel->z=NULL;
-	iomodel->elements=NULL;
-	iomodel->elements_type=NULL;
-	iomodel->numberofvertices2d=0;
-	iomodel->elements2d=NULL;
-	iomodel->deadgrids=NULL;
-	iomodel->numlayers=0;
-	iomodel->uppernodes=NULL;
-	iomodel->gridonhutter=NULL;
-	iomodel->gridonmacayeal=NULL;
-	iomodel->gridonpattyn=NULL;
-	
-	iomodel->vx_obs=NULL;
-	iomodel->vy_obs=NULL;
-	iomodel->vx=NULL;
-	iomodel->vy=NULL;
-	iomodel->vz=NULL;
-	iomodel->pressure=NULL;
-	iomodel->temperature=NULL;
-	iomodel->melting=NULL;
-	iomodel->geothermalflux=NULL;
-	iomodel->elementonbed=NULL;
-	iomodel->elementonsurface=NULL;
-	iomodel->gridonbed=NULL;
-	iomodel->gridonsurface=NULL;
-	iomodel->gridonstokes=NULL;
-	iomodel->borderstokes=NULL;
-	iomodel->thickness=NULL;
-	iomodel->surface=NULL;
-	iomodel->bed=NULL;
-	iomodel->elementoniceshelf=NULL;
-	iomodel->elementonwater=NULL;
-	iomodel->gridonicesheet=NULL;
-	iomodel->gridoniceshelf=NULL;
-
-	iomodel->drag_type=0;
-	iomodel->drag_cofficient=NULL;
-	iomodel->drag_p=NULL;
-	iomodel->drag_q=NULL;
-	
-	
-	iomodel->numberofpressureloads=0;
-	iomodel->pressureload=NULL;
-	iomodel-> spcvelocity=NULL;
-	iomodel-> spctemperature=NULL;
-	iomodel-> spcthickness=NULL;
-	iomodel->numberofedges=0;
-	iomodel->edges=NULL;
+	this->name=NULL;
+	this->inputfilename=NULL;
+	this->outputfilename=NULL;
+	this->repository=NULL;
+	this->meshtype=NULL;
+	this->analysis_type=0;
+	this->sub_analysis_type=0;
+	this->qmu_analysis=0;
+	this->control_analysis=0;
+	this->solverstring=NULL;
+	this->numberofresponses=0;
+	this->numberofvariables=0;
+	this->qmu_npart=0; 
+	this->numberofelements=0;
+	this->numberofvertices=0;
+	this->x=NULL; 
+	this->y=NULL;
+	this->z=NULL;
+	this->elements=NULL;
+	this->elements_type=NULL;
+	this->numberofvertices2d=0;
+	this->elements2d=NULL;
+	this->deadgrids=NULL;
+	this->numlayers=0;
+	this->uppernodes=NULL;
+	this->gridonhutter=NULL;
+	this->gridonmacayeal=NULL;
+	this->gridonpattyn=NULL;
+	
+	this->vx_obs=NULL;
+	this->vy_obs=NULL;
+	this->vx=NULL;
+	this->vy=NULL;
+	this->vz=NULL;
+	this->pressure=NULL;
+	this->temperature=NULL;
+	this->melting_rate=NULL;
+	this->geothermalflux=NULL;
+	this->elementonbed=NULL;
+	this->elementonsurface=NULL;
+	this->gridonbed=NULL;
+	this->gridonsurface=NULL;
+	this->gridonstokes=NULL;
+	this->borderstokes=NULL;
+	this->thickness=NULL;
+	this->surface=NULL;
+	this->bed=NULL;
+	this->elementoniceshelf=NULL;
+	this->elementonwater=NULL;
+	this->gridonicesheet=NULL;
+	this->gridoniceshelf=NULL;
+
+	this->drag_type=0;
+	this->drag_coefficient=NULL;
+	this->drag_p=NULL;
+	this->drag_q=NULL;
+	
+	
+	this->numberofpressureloads=0;
+	this->pressureload=NULL;
+	this-> spcvelocity=NULL;
+	this-> spctemperature=NULL;
+	this-> spcthickness=NULL;
+	this->numberofedges=0;
+	this->edges=NULL;
 	
 	/*!materials: */
-	iomodel->rho_water=0;
-	iomodel->rho_ice=0;
-	iomodel->g=0;
-	iomodel->rheology_n=NULL;
-	iomodel->rheology_B=NULL;
+	this->rho_water=0;
+	this->rho_ice=0;
+	this->g=0;
+	this->rheology_n=NULL;
+	this->rheology_B=NULL;
 
 	/*!control methods: */
-	iomodel->control_type=NULL;
+	this->control_type=NULL;
 
 	/*!solution parameters: */
-	iomodel->fit=NULL;
-	iomodel->weights=NULL;
-	iomodel->cm_jump=NULL;
-	iomodel->meanvel=0;
-	iomodel->epsvel=0;
-	iomodel->artificial_diffusivity=0;
-	iomodel->nsteps=0;
-	iomodel->eps_cm=0;
-	iomodel->tolx=0;
-	iomodel->maxiter=NULL;
-	iomodel->cm_noisedmp=0;
-	iomodel->cm_mindmp_value=0;
-	iomodel->cm_mindmp_slope=0;
-	iomodel->cm_maxdmp_value=0;
-	iomodel->cm_maxdmp_slope=0;
-	iomodel->cm_min=0;
-	iomodel->cm_max=0;
-	iomodel->cm_gradient=0;
-	iomodel->verbose=0;
-	iomodel->plot=0;
-	iomodel->eps_res=0;
-	iomodel->eps_rel=0;
-	iomodel->eps_abs=0;
-	iomodel->max_nonlinear_iterations=0;
-	iomodel->dt=0;
-	iomodel->ndt=0;
-	iomodel->penalty_offset=0;
-	iomodel->penalty_melting=0;
-	iomodel->penalty_lock=0;
-	iomodel->sparsity=0;
-	iomodel->connectivity=0;
-	iomodel->lowmem=0;
-	iomodel->optscal=NULL;
-	iomodel->yts=0;
-	iomodel->viscosity_overshoot=0;
-	iomodel->artdiff=0;
-	iomodel->stokesreconditioning=0;
-	iomodel->waitonlock=0;
+	this->fit=NULL;
+	this->weights=NULL;
+	this->cm_jump=NULL;
+	this->meanvel=0;
+	this->epsvel=0;
+	this->artificial_diffusivity=0;
+	this->nsteps=0;
+	this->eps_cm=0;
+	this->tolx=0;
+	this->maxiter=NULL;
+	this->cm_noisedmp=0;
+	this->cm_mindmp_value=0;
+	this->cm_mindmp_slope=0;
+	this->cm_maxdmp_value=0;
+	this->cm_maxdmp_slope=0;
+	this->cm_min=0;
+	this->cm_max=0;
+	this->cm_gradient=0;
+	this->verbose=0;
+	this->plot=0;
+	this->eps_res=0;
+	this->eps_rel=0;
+	this->eps_abs=0;
+	this->max_nonlinear_iterations=0;
+	this->dt=0;
+	this->ndt=0;
+	this->penalty_offset=0;
+	this->penalty_melting=0;
+	this->penalty_lock=0;
+	this->sparsity=0;
+	this->connectivity=0;
+	this->lowmem=0;
+	this->optscal=NULL;
+	this->yts=0;
+	this->viscosity_overshoot=0;
+	this->artdiff=0;
+	this->stokesreconditioning=0;
+	this->waitonlock=0;
 
 	/*!thermal parameters: */
-	iomodel->beta=0;
-	iomodel->meltingpoint=0;
-	iomodel->latentheat=0;
-	iomodel->heatcapacity=0;
-	iomodel->thermalconductivity=0;
-	iomodel->min_thermal_constraints=0;
-	iomodel->min_mechanical_constraints=0;
-	iomodel->stabilize_constraints=0;
-	iomodel->mixed_layer_capacity=0;
-	iomodel->thermal_exchange_velocity=0;
-
-	
-	iomodel->numrifts=0;
-	iomodel->riftinfo=NULL;
+	this->beta=0;
+	this->meltingpoint=0;
+	this->latentheat=0;
+	this->heatcapacity=0;
+	this->thermalconductivity=0;
+	this->min_thermal_constraints=0;
+	this->min_mechanical_constraints=0;
+	this->stabilize_constraints=0;
+	this->mixed_layer_capacity=0;
+	this->thermal_exchange_velocity=0;
+
+	
+	this->numrifts=0;
+	this->riftinfo=NULL;
 
 	/*!penalties: */
-	iomodel->numpenalties=0;
-	iomodel->penalties=NULL;
-	iomodel->penaltypartitioning=NULL;
+	this->numpenalties=0;
+	this->penalties=NULL;
+	this->penaltypartitioning=NULL;
 
 	/*!basal: */
-	iomodel->accumulation_rate=NULL;
-	iomodel->dhdt=NULL;
+	this->accumulation_rate=NULL;
+	this->dhdt=NULL;
 	
 	/*parameter output: */
-	iomodel->numoutput=0;
+	this->numoutput=0;
 
 	/*elements type: */
-	iomodel->ishutter=0;
-	iomodel->ismacayealpattyn=0;
-	iomodel->isstokes=0;
+	this->ishutter=0;
+	this->ismacayealpattyn=0;
+	this->isstokes=0;
 
 	/*exterior data: */
-	iomodel->my_elements=NULL;
-	iomodel->my_vertices=NULL;
-	iomodel->my_nodes=NULL;
-	iomodel->my_bordervertices=NULL;
-	iomodel->penaltypartitioning=NULL;
+	this->my_elements=NULL;
+	this->my_vertices=NULL;
+	this->my_nodes=NULL;
+	this->my_bordervertices=NULL;
+	this->penaltypartitioning=NULL;
 }
 /*}}}*/
@@ -394,12 +389,12 @@
 	int i,j;
 
-	if(which_part==1 && my_rank==rank && (strcmp(iomodel->meshtype,"3d")==0)){
+	if(which_part==1 && my_rank==rank && (strcmp(this->meshtype,"3d")==0)){
 		printf("IoModel penalties: \n");
-		printf("   number of penalties: %i\n",iomodel->numpenalties);
+		printf("   number of penalties: %i\n",this->numpenalties);
 		printf("   grids: \n");
 
-		for(i=0;i<iomodel->numpenalties;i++){
-			for(j=0;j<iomodel->numlayers;j++){
-				printf("%i ",(int)*(iomodel->penalties+iomodel->numlayers*i+j));
+		for(i=0;i<this->numpenalties;i++){
+			for(j=0;j<this->numlayers;j++){
+				printf("%i ",(int)*(this->penalties+this->numlayers*i+j));
 			}
 			printf("\n");
@@ -408,2 +403,8 @@
 }
 /*}}}*/
+/*FUNCTION IoModel::CreateSingleNodeToElementConnectivity(void){{{1*/
+void IoModel::CreateSingleNodeToElementConnectivity(void){
+
+	ISSMERROR(" not supported yet!");
+}
+/*}}}*/
Index: /issm/trunk/src/c/ModelProcessorx/IoModel.h
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/IoModel.h	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/IoModel.h	(revision 3673)
@@ -191,4 +191,5 @@
 		void IoModelInit(void);
 		void Echo(int which_part,int rank);
+		void CreateSingleNodeToElementConnectivity(void);
 		/*}}}*/
 
Index: /issm/trunk/src/c/ModelProcessorx/Melting/CreateElementsNodesAndMaterialsMelting.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Melting/CreateElementsNodesAndMaterialsMelting.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Melting/CreateElementsNodesAndMaterialsMelting.cpp	(revision 3673)
@@ -37,15 +37,15 @@
 	IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
 	IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
-	IoModelFetchData(&iomodel->drag,NULL,NULL,iomodel_handle,"drag");
-	IoModelFetchData(&iomodel->p,NULL,NULL,iomodel_handle,"p");
-	IoModelFetchData(&iomodel->q,NULL,NULL,iomodel_handle,"q");
+	IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
+	IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,"drag_p");
+	IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,"drag_q");
 	IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
 	IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
 	IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
 	IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
-	IoModelFetchData(&iomodel->B,NULL,NULL,iomodel_handle,"B");
-	IoModelFetchData(&iomodel->n,NULL,NULL,iomodel_handle,"n");
-	IoModelFetchData(&iomodel->accumulation,NULL,NULL,iomodel_handle,"accumulation");
-	IoModelFetchData(&iomodel->melting,NULL,NULL,iomodel_handle,"melting");
+	IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
+	IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
+	IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate");
+	IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
 	IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
 	
@@ -68,15 +68,15 @@
 	xfree((void**)&iomodel->surface);
 	xfree((void**)&iomodel->bed);
-	xfree((void**)&iomodel->drag);
-	xfree((void**)&iomodel->p);
-	xfree((void**)&iomodel->q);
+	xfree((void**)&iomodel->drag_coefficient);
+	xfree((void**)&iomodel->drag_p);
+	xfree((void**)&iomodel->drag_q);
 	xfree((void**)&iomodel->elementoniceshelf);
 	xfree((void**)&iomodel->elementonbed);
 	xfree((void**)&iomodel->elementonsurface);
 	xfree((void**)&iomodel->elements_type);
-	xfree((void**)&iomodel->n);
-	xfree((void**)&iomodel->B);
-	xfree((void**)&iomodel->accumulation);
-	xfree((void**)&iomodel->melting);
+	xfree((void**)&iomodel->rheology_n);
+	xfree((void**)&iomodel->rheology_B);
+	xfree((void**)&iomodel->accumulation_rate);
+	xfree((void**)&iomodel->melting_rate);
 	xfree((void**)&iomodel->elementonwater);
 
Index: /issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 3673)
@@ -24,5 +24,5 @@
 	//create penalties for grids: no grid can have a temperature over the melting point
 	IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
-	iomodel->CreateSingleNodeToElementConnectivity;
+	iomodel->CreateSingleNodeToElementConnectivity();
 
 	for (i=0;i<iomodel->numberofvertices;i++){
Index: /issm/trunk/src/c/ModelProcessorx/Melting/CreateParametersMelting.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Melting/CreateParametersMelting.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Melting/CreateParametersMelting.cpp	(revision 3673)
@@ -10,8 +10,8 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersMelting(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersMelting(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	Param*   param = NULL;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 	int      count;
 	int i;
@@ -25,24 +25,24 @@
 	count=parameters->Size();
 
-	/* get initial melting if transient*/
+	/* get initial melting_rate if transient*/
 	if(iomodel->dt){
 
-		/*Get melting: */
-		IoModelFetchData(&iomodel->melting,NULL,NULL,iomodel_handle,"melting");
-		if(iomodel->melting) {
-			for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting[i]=iomodel->melting[i]/iomodel->yts;   //m/s instead of m/yr
+		/*Get melting_rate: */
+		IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
+		if(iomodel->melting_rate) {
+			for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting_rate[i]=iomodel->melting_rate[i]/iomodel->yts;   //m/s instead of m/yr
 		}
 		else{
-			for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting[i]=0;
+			for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting_rate[i]=0;
 		}
 
 		count++;
 		param= new Param(count,"m_g",DOUBLEVEC);
-		if(iomodel->melting) param->SetDoubleVec(iomodel->melting,iomodel->numberofvertices);
-		else param->SetDoubleVec(iomodel->melting,0);
+		if(iomodel->melting_rate) param->SetDoubleVec(iomodel->melting_rate,iomodel->numberofvertices);
+		else param->SetDoubleVec(iomodel->melting_rate,0);
 		parameters->AddObject(param);
 
-		/*Free melting: */
-		xfree((void**)&iomodel->melting);
+		/*Free melting_rate: */
+		xfree((void**)&iomodel->melting_rate);
 	}
 
Index: /issm/trunk/src/c/ModelProcessorx/ModelProcessorx.h
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/ModelProcessorx.h	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/ModelProcessorx.h	(revision 3673)
@@ -6,12 +6,10 @@
 #define _MODEL_PROCESSORX_H_
 
-#include "./ModelProcessorx.h"
-
 #define RIFTINFOSIZE 11
 
 /*Creation of fem datasets: general drivers*/
-void  CreateDataSets(DataSet** pelements,DataSet** pnodes, DataSet** pvertices, DataSet** pmaterials, DataSet** pconstraints, DataSet** ploads,Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateDataSets(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, DataSet** pconstraints, DataSet** ploads,Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
 	
-void  CreateParameters(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateParameters(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
 
 
@@ -19,70 +17,79 @@
 
 /*diagnostic horizontal*/
-void	CreateElementsNodesAndMaterialsDiagnosticHoriz(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsDiagnosticHoriz(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsDiagnosticHoriz(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsDiagnosticHoriz(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
-void  CreateParametersDiagnosticHoriz(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateParametersDiagnosticHoriz(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
 
 /*diagnostic vertical*/
-void	CreateElementsNodesAndMaterialsDiagnosticVert(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsDiagnosticVert(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsDiagnosticVert(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsDiagnosticVert(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
 
 /*diagnostic hutter*/
-void	CreateElementsNodesAndMaterialsDiagnosticHutter(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsDiagnosticHutter(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsDiagnosticHutter(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsDiagnosticHutter(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
 
 /*diagnostic stokes*/
-void	CreateElementsNodesAndMaterialsDiagnosticStokes(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsDiagnosticStokes(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsDiagnosticStokes(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsDiagnosticStokes(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
 
 /*slope compute*/
-void	CreateElementsNodesAndMaterialsSlopeCompute(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsSlopeCompute(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsSlopeCompute(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsSlopeCompute(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
 
 /*control:*/
-void  CreateParametersControl(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateParametersControl(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
 
 /*thermal:*/
-void	CreateElementsNodesAndMaterialsThermal(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsThermal(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsThermal(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsThermal(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
-void  CreateParametersThermal(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateParametersThermal(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
 
 /*melting:*/
-void	CreateElementsNodesAndMaterialsMelting(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsMelting(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsMelting(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsMelting(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
-void  CreateParametersMelting(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateParametersMelting(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
 
 /*prognostic:*/
-void	CreateElementsNodesAndMaterialsPrognostic(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsPrognostic(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsPrognostic(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsPrognostic(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
-void  CreateParametersPrognostic(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateParametersPrognostic(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
 
 /*prognostic2:*/
-void	CreateElementsNodesAndMaterialsPrognostic2(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsPrognostic2(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsPrognostic2(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsPrognostic2(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
-void  CreateParametersPrognostic2(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateParametersPrognostic2(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
 
 /*balancedthickness:*/
-void	CreateElementsNodesAndMaterialsBalancedthickness(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsBalancedthickness(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsBalancedthickness(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsBalancedthickness(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
-void  CreateParametersBalancedthickness(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateParametersBalancedthickness(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+
+void	CreateElementsNodesAndMaterialsBalancedthickness2(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateConstraintsBalancedthickness2(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateLoadsBalancedthickness2(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
+void  CreateParametersBalancedthickness2(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+
 
 /*balancedvelocities:*/
-void	CreateElementsNodesAndMaterialsBalancedvelocities(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
+void	CreateElementsNodesAndMaterialsBalancedvelocities(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle);
 void	CreateConstraintsBalancedvelocities(DataSet** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
 void  CreateLoadsBalancedvelocities(DataSet** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
-void  CreateParametersBalancedvelocities(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void  CreateParametersBalancedvelocities(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
 
 /*qmu: */
-void CreateParametersQmu(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+void CreateParametersQmu(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle);
+
+/*partitioning: */
+void  Partitioning(bool** pmy_elements, bool** pmy_vertices, bool** pmy_nodes, bool** pmy_bordervertices, IoModel* iomodel, ConstDataHandle iomodel_handle);
 
 #endif
Index: /issm/trunk/src/c/ModelProcessorx/Partitioning.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Partitioning.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Partitioning.cpp	(revision 3673)
@@ -16,4 +16,5 @@
 #include "../include/typedefs.h"
 #include "../MeshPartitionx/MeshPartitionx.h"
+#include "../ModelProcessorx/ModelProcessorx.h"
 
 void  DiscontinuousGalerkinPartitioning(bool** pmy_elements, bool** pmy_vertices, bool** pmy_nodes, bool** pmy_bordervertices, IoModel* iomodel, ConstDataHandle iomodel_handle);
Index: /issm/trunk/src/c/ModelProcessorx/Prognostic/CreateParametersPrognostic.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Prognostic/CreateParametersPrognostic.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Prognostic/CreateParametersPrognostic.cpp	(revision 3673)
@@ -11,8 +11,8 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersPrognostic(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersPrognostic(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	Param*   param = NULL;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 	int      count;
 	int      i;
@@ -113,29 +113,29 @@
 	xfree((void**)&iomodel->bed);
 
-	/*Get melting: */
-	IoModelFetchData(&iomodel->melting,NULL,NULL,iomodel_handle,"melting");
-	if(iomodel->melting) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting[i]=iomodel->melting[i]/iomodel->yts;
+	/*Get melting_rate: */
+	IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
+	if(iomodel->melting_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting_rate[i]=iomodel->melting_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"m_g",DOUBLEVEC);
-	if(iomodel->melting) param->SetDoubleVec(iomodel->melting,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->melting,0,1);
+	if(iomodel->melting_rate) param->SetDoubleVec(iomodel->melting_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->melting_rate,0,1);
 	parameters->AddObject(param);
 
-	/*Free melting: */
-	xfree((void**)&iomodel->melting);
+	/*Free melting_rate: */
+	xfree((void**)&iomodel->melting_rate);
 
-	/*Get accumulation: */
-	IoModelFetchData(&iomodel->accumulation,NULL,NULL,iomodel_handle,"accumulation");
-	if(iomodel->accumulation) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation[i]=iomodel->accumulation[i]/iomodel->yts;
+	/*Get accumulation_rate: */
+	IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate");
+	if(iomodel->accumulation_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation_rate[i]=iomodel->accumulation_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"a_g",DOUBLEVEC);
-	if(iomodel->accumulation) param->SetDoubleVec(iomodel->accumulation,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->accumulation,0,0);
+	if(iomodel->accumulation_rate) param->SetDoubleVec(iomodel->accumulation_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->accumulation_rate,0,0);
 	parameters->AddObject(param);
 
-	/*Free accumulation: */
-	xfree((void**)&iomodel->accumulation);
+	/*Free accumulation_rate: */
+	xfree((void**)&iomodel->accumulation_rate);
 
 	/*Assign output pointer: */
Index: /issm/trunk/src/c/ModelProcessorx/Prognostic2/CreateParametersPrognostic2.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Prognostic2/CreateParametersPrognostic2.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Prognostic2/CreateParametersPrognostic2.cpp	(revision 3673)
@@ -11,8 +11,8 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersPrognostic2(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersPrognostic2(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	Param*   param = NULL;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 	int      count;
 	int      i;
@@ -86,29 +86,29 @@
 	xfree((void**)&iomodel->bed);
 
-	/*Get melting: */
-	IoModelFetchData(&iomodel->melting,NULL,NULL,iomodel_handle,"melting");
-	if(iomodel->melting) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting[i]=iomodel->melting[i]/iomodel->yts;
+	/*Get melting_rate: */
+	IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
+	if(iomodel->melting_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->melting_rate[i]=iomodel->melting_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"m_g",DOUBLEVEC);
-	if(iomodel->melting) param->SetDoubleVec(iomodel->melting,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->melting,0,1);
+	if(iomodel->melting_rate) param->SetDoubleVec(iomodel->melting_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->melting_rate,0,1);
 	parameters->AddObject(param);
 
-	/*Free melting: */
-	xfree((void**)&iomodel->melting);
+	/*Free melting_rate: */
+	xfree((void**)&iomodel->melting_rate);
 
-	/*Get accumulation: */
-	IoModelFetchData(&iomodel->accumulation,NULL,NULL,iomodel_handle,"accumulation");
-	if(iomodel->accumulation) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation[i]=iomodel->accumulation[i]/iomodel->yts;
+	/*Get accumulation_rate: */
+	IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate");
+	if(iomodel->accumulation_rate) for(i=0;i<iomodel->numberofvertices;i++)iomodel->accumulation_rate[i]=iomodel->accumulation_rate[i]/iomodel->yts;
 	
 	count++;
 	param= new Param(count,"a_g",DOUBLEVEC);
-	if(iomodel->accumulation) param->SetDoubleVec(iomodel->accumulation,iomodel->numberofvertices,1);
-	else param->SetDoubleVec(iomodel->accumulation,0,0);
+	if(iomodel->accumulation_rate) param->SetDoubleVec(iomodel->accumulation_rate,iomodel->numberofvertices,1);
+	else param->SetDoubleVec(iomodel->accumulation_rate,0,0);
 	parameters->AddObject(param);
 
-	/*Free accumulation: */
-	xfree((void**)&iomodel->accumulation);
+	/*Free accumulation_rate: */
+	xfree((void**)&iomodel->accumulation_rate);
 
 	/*Assign output pointer: */
Index: /issm/trunk/src/c/ModelProcessorx/Qmu/CreateParametersQmu.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Qmu/CreateParametersQmu.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Qmu/CreateParametersQmu.cpp	(revision 3673)
@@ -12,9 +12,9 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersQmu(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersQmu(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	int i,j,k;
 	
-	DataSet* parameters = NULL;
+	Parameters* parameters = NULL;
 	Param*   param = NULL;
 	int      count;
Index: /issm/trunk/src/c/ModelProcessorx/Thermal/CreateElementsNodesAndMaterialsThermal.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Thermal/CreateElementsNodesAndMaterialsThermal.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Thermal/CreateElementsNodesAndMaterialsThermal.cpp	(revision 3673)
@@ -37,7 +37,7 @@
 	IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
 	IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
-	IoModelFetchData(&iomodel->drag,NULL,NULL,iomodel_handle,"drag");
-	IoModelFetchData(&iomodel->p,NULL,NULL,iomodel_handle,"p");
-	IoModelFetchData(&iomodel->q,NULL,NULL,iomodel_handle,"q");
+	IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
+	IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,"drag_p");
+	IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,"drag_q");
 	IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
 	IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
@@ -45,6 +45,6 @@
 	IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
 	IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,"geothermalflux");
-	IoModelFetchData(&iomodel->B,NULL,NULL,iomodel_handle,"B");
-	IoModelFetchData(&iomodel->n,NULL,NULL,iomodel_handle,"n");
+	IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
+	IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
 	IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
 	
@@ -65,7 +65,7 @@
 	xfree((void**)&iomodel->surface);
 	xfree((void**)&iomodel->bed);
-	xfree((void**)&iomodel->drag);
-	xfree((void**)&iomodel->p);
-	xfree((void**)&iomodel->q);
+	xfree((void**)&iomodel->drag_coefficient);
+	xfree((void**)&iomodel->drag_p);
+	xfree((void**)&iomodel->drag_q);
 	xfree((void**)&iomodel->elementoniceshelf);
 	xfree((void**)&iomodel->elementonbed);
@@ -73,6 +73,6 @@
 	xfree((void**)&iomodel->elements_type);
 	xfree((void**)&iomodel->geothermalflux);
-	xfree((void**)&iomodel->n);
-	xfree((void**)&iomodel->B);
+	xfree((void**)&iomodel->rheology_n);
+	xfree((void**)&iomodel->rheology_B);
 	xfree((void**)&iomodel->elementonwater);
 
Index: /issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 3673)
@@ -25,5 +25,5 @@
 	//create penalties for grids: no grid can have a temperature over the melting point
 	IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature");
-	iomodel->CreateSingleNodeToElementConnectivity;
+	iomodel->CreateSingleNodeToElementConnectivity();
 
 	for (i=0;i<iomodel->numberofvertices;i++){
Index: /issm/trunk/src/c/ModelProcessorx/Thermal/CreateParametersThermal.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Thermal/CreateParametersThermal.cpp	(revision 3672)
+++ /issm/trunk/src/c/ModelProcessorx/Thermal/CreateParametersThermal.cpp	(revision 3673)
@@ -11,8 +11,8 @@
 #include "../ModelProcessorx.h"
 
-void CreateParametersThermal(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
+void CreateParametersThermal(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
 	
 	Param*   param = NULL;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 	int      count;
 	int i;
Index: /issm/trunk/src/c/PenaltyConstraintsx/PenaltyConstraintsx.cpp
===================================================================
--- /issm/trunk/src/c/PenaltyConstraintsx/PenaltyConstraintsx.cpp	(revision 3672)
+++ /issm/trunk/src/c/PenaltyConstraintsx/PenaltyConstraintsx.cpp	(revision 3673)
@@ -12,5 +12,5 @@
 
 void PenaltyConstraintsx(int* pconverged, int* pnum_unstable_constraints, DataSet* elements,DataSet* nodes, DataSet* vertices,
-		DataSet* loads,DataSet* materials,  DataSet* parameters,ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+		DataSet* loads,DataSet* materials,  Parameters* parameters,int analysis_type,int sub_analysis_type){
 
 	int i;
@@ -34,8 +34,8 @@
 	 * management routine, otherwise, skip : */
 	if (RiftIsPresent(loads)){
-		RiftConstraints(&converged,&num_unstable_constraints,loads,inputs,min_mechanical_constraints,analysis_type,sub_analysis_type);
+		RiftConstraints(&converged,&num_unstable_constraints,loads,min_mechanical_constraints,analysis_type,sub_analysis_type);
 	}
 	else if(loads->MeltingIsPresent()){
-		loads->MeltingConstraints(&converged,&num_unstable_constraints,inputs,analysis_type,sub_analysis_type);
+		loads->MeltingConstraints(&converged,&num_unstable_constraints,analysis_type,sub_analysis_type);
 	}
 	else{
Index: /issm/trunk/src/c/PenaltyConstraintsx/PenaltyConstraintsx.h
===================================================================
--- /issm/trunk/src/c/PenaltyConstraintsx/PenaltyConstraintsx.h	(revision 3672)
+++ /issm/trunk/src/c/PenaltyConstraintsx/PenaltyConstraintsx.h	(revision 3673)
@@ -11,5 +11,5 @@
 /* local prototypes: */
 void PenaltyConstraintsx(int* pconverged, int* pnum_unstable_constraints, DataSet* elements,DataSet* nodes, DataSet* vertices,
-		DataSet* loads,DataSet* materials,  DataSet* parameters,int analysis_type,int sub_analysis_type); 
+		DataSet* loads,DataSet* materials,  Parameters* parameters,int analysis_type,int sub_analysis_type); 
 
 #endif  /* _PENALTYCONSTRAINTSX_H */
Index: /issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.cpp
===================================================================
--- /issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.cpp	(revision 3672)
+++ /issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.cpp	(revision 3673)
@@ -10,5 +10,5 @@
 #define _ZIGZAGCOUNTER_
 
-int RiftConstraints(int* pconverged, int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int min_mechanical_constraints,int analysis_type,int sub_analysis_type){
+int RiftConstraints(int* pconverged, int* pnum_unstable_constraints,DataSet* loads,int min_mechanical_constraints,int analysis_type,int sub_analysis_type){
 
 	int num_unstable_constraints=0;
@@ -17,5 +17,5 @@
 	extern int my_rank;
 
-	Constrain(&num_unstable_constraints,loads,inputs,analysis_type);
+	Constrain(&num_unstable_constraints,loads,analysis_type);
 	if(num_unstable_constraints==0)converged=1;
 	
@@ -27,5 +27,5 @@
 	else if(num_unstable_constraints<=min_mechanical_constraints){
 		_printf_("   freezing constraints\n");
-		FreezeConstraints(loads,inputs,analysis_type);
+		FreezeConstraints(loads,analysis_type);
 	}
 
@@ -35,5 +35,5 @@
 }
 
-int IsMaterialStable(DataSet* loads,ParameterInputs* inputs,int analysis_type){
+int IsMaterialStable(DataSet* loads,int analysis_type){
 
 	int i;
@@ -50,5 +50,5 @@
 			riftfront=(Riftfront*)loads->GetObjectByOffset(i);
 
-			if (riftfront->IsMaterialStable(inputs,analysis_type)){
+			if (riftfront->IsMaterialStable(analysis_type)){
 				found=1;
 				/*do not break! all penalties should get informed the non-linearity converged!*/
@@ -150,5 +150,5 @@
 }
 
-int PreConstrain(int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int analysis_type){
+int PreConstrain(int* pnum_unstable_constraints,DataSet* loads,int analysis_type){
 
 	int			i;
@@ -168,5 +168,5 @@
 			riftfront=(Riftfront*)loads->GetObjectByOffset(i);
 
-			riftfront->PreConstrain(&unstable,inputs,analysis_type);
+			riftfront->PreConstrain(&unstable,analysis_type);
 
 			num_unstable_constraints+=unstable;
@@ -185,5 +185,5 @@
 }
 
-int Constrain(int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int analysis_type){
+int Constrain(int* pnum_unstable_constraints,DataSet* loads,int analysis_type){
 
 	int			i;
@@ -203,5 +203,5 @@
 			riftfront=(Riftfront*)loads->GetObjectByOffset(i);
 
-			riftfront->Constrain(&unstable,inputs,analysis_type);
+			riftfront->Constrain(&unstable,analysis_type);
 
 			num_unstable_constraints+=unstable;
@@ -220,5 +220,5 @@
 }
 
-void FreezeConstraints(DataSet* loads,ParameterInputs* inputs,int analysis_type){
+void FreezeConstraints(DataSet* loads,int analysis_type){
 
 	int			i;
@@ -234,5 +234,5 @@
 			riftfront=(Riftfront*)loads->GetObjectByOffset(i);
 
-			riftfront->FreezeConstraints(inputs,analysis_type);
+			riftfront->FreezeConstraints(analysis_type);
 
 		}
@@ -273,5 +273,5 @@
 }
 
-int MaxPenetrationInInputs(DataSet* loads,ParameterInputs* inputs,int analysis_type){
+int MaxPenetrationInInputs(DataSet* loads,int analysis_type){
 
 	int			i;
@@ -295,5 +295,5 @@
 			riftfront=(Riftfront*)loads->GetObjectByOffset(i);
 
-			riftfront->MaxPenetration(&penetration,inputs,analysis_type);
+			riftfront->MaxPenetration(&penetration,analysis_type);
 
 			if (penetration>max_penetration)max_penetration=penetration;
@@ -308,8 +308,8 @@
 
 	/*feed max_penetration to inputs: */
-	inputs->Add("max_penetration",max_penetration);
-}
-
-int PotentialUnstableConstraints(DataSet* loads,ParameterInputs* inputs,int analysis_type){
+	loads->AddInput(max_penetration,MaxPenetrationEnum);
+}
+
+int PotentialUnstableConstraints(DataSet* loads,int analysis_type){
 
 	int			i;
@@ -330,5 +330,5 @@
 			riftfront=(Riftfront*)loads->GetObjectByOffset(i);
 
-			riftfront->PotentialUnstableConstraint(&unstable,inputs,analysis_type);
+			riftfront->PotentialUnstableConstraint(&unstable,analysis_type);
 
 			num_unstable_constraints+=unstable;
Index: /issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.h
===================================================================
--- /issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.h	(revision 3672)
+++ /issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.h	(revision 3673)
@@ -10,5 +10,5 @@
 #include "../DataSet/DataSet.h"
 
-int RiftConstraints(int* pconverged, int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int min_mechanical_constraints,int analysis_type,int sub_analysis_type);
+int RiftConstraints(int* pconverged, int* pnum_unstable_constraints,DataSet* loads,int min_mechanical_constraints,int analysis_type,int sub_analysis_type);
 
 int RiftIsPresent(DataSet* loads);
@@ -18,15 +18,15 @@
 int SetPreStable(DataSet* loads);
 
-int PreConstrain(int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int analysis_type_enum);
+int PreConstrain(int* pnum_unstable_constraints,DataSet* loads,int analysis_type_enum);
 
-int Constrain(int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int analysis_type_enum);
+int Constrain(int* pnum_unstable_constraints,DataSet* loads,int analysis_type_enum);
 
-void FreezeConstraints(DataSet* loads,ParameterInputs* inputs,int analysis_type);
+void FreezeConstraints(DataSet* loads,int analysis_type);
 
-int MaxPenetrationInInputs(DataSet* loads,ParameterInputs* inputs,int analysis_type_enum);
+int MaxPenetrationInInputs(DataSet* loads,int analysis_type_enum);
 
-int PotentialUnstableConstraints(DataSet* loads,ParameterInputs* inputs,int analysis_type_enum);
+int PotentialUnstableConstraints(DataSet* loads,int analysis_type_enum);
 
-int IsMaterialStable(DataSet* loads,ParameterInputs* inputs,int analysis_type_enum);
+int IsMaterialStable(DataSet* loads,int analysis_type_enum);
 
 int IsFrozen(DataSet* loads);
Index: /issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp
===================================================================
--- /issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp	(revision 3672)
+++ /issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp	(revision 3673)
@@ -10,5 +10,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void PenaltySystemMatricesx(Mat Kgg, Vec pg,double* pkmax,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, DataSet* parameters,
+void PenaltySystemMatricesx(Mat Kgg, Vec pg,double* pkmax,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, Parameters* parameters,
 		int kflag,int pflag,int analysis_type,int sub_analysis_type){
 	
@@ -29,6 +29,6 @@
 
 	/*Add penalties to stiffnesses, from loads: */
-	if(kflag)loads->PenaltyCreateKMatrix(Kgg,inputs,kmax,analysis_type,sub_analysis_type);
-	if(pflag)loads->PenaltyCreatePVector(pg,inputs,kmax,analysis_type,sub_analysis_type);
+	if(kflag)loads->PenaltyCreateKMatrix(Kgg,kmax,analysis_type,sub_analysis_type);
+	if(pflag)loads->PenaltyCreatePVector(pg,kmax,analysis_type,sub_analysis_type);
 	
 	/*Assemble matrices: */
Index: /issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.h
===================================================================
--- /issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.h	(revision 3672)
+++ /issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void PenaltySystemMatricesx(Mat Kgg, Vec pg,double* pkmax, DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, DataSet* parameters,
+void PenaltySystemMatricesx(Mat Kgg, Vec pg,double* pkmax, DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, Parameters* parameters,
 		int kflag,int pflag,int analysis_type,int sub_analysis_type); 
 
Index: /issm/trunk/src/c/ProcessParamsx/ProcessParamsx.cpp
===================================================================
--- /issm/trunk/src/c/ProcessParamsx/ProcessParamsx.cpp	(revision 3672)
+++ /issm/trunk/src/c/ProcessParamsx/ProcessParamsx.cpp	(revision 3673)
@@ -15,5 +15,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void ProcessParamsx( DataSet* parameters, Vec  part){
+void ProcessParamsx( Parameters* parameters, Vec  part){
 
 	
Index: /issm/trunk/src/c/ProcessParamsx/ProcessParamsx.h
===================================================================
--- /issm/trunk/src/c/ProcessParamsx/ProcessParamsx.h	(revision 3672)
+++ /issm/trunk/src/c/ProcessParamsx/ProcessParamsx.h	(revision 3673)
@@ -9,5 +9,5 @@
 
 /* local prototypes: */
-void		ProcessParamsx( DataSet* parameters, Vec partition);
+void		ProcessParamsx( Parameters* parameters, Vec partition);
 
 #endif  /* _PROCESSPARAMSX_H */
Index: /issm/trunk/src/c/Qmux/DakotaResponses.cpp
===================================================================
--- /issm/trunk/src/c/Qmux/DakotaResponses.cpp	(revision 3672)
+++ /issm/trunk/src/c/Qmux/DakotaResponses.cpp	(revision 3673)
@@ -16,5 +16,5 @@
 #include "../Misfitx/Misfitx.h"
 
-void DakotaResponses(double* responses,char** responses_descriptors,int numresponses,Model* model,DataSet* results,DataSet* processed_results,ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+void DakotaResponses(double* responses,char** responses_descriptors,int numresponses,Model* model,DataSet* results,DataSet* processed_results,int analysis_type,int sub_analysis_type){
 
 	int i,j;
@@ -258,10 +258,14 @@
 			if(!found)ISSMERROR(" could not find velocity to compute misfit");
 
+			SplitSolutionVector(&vx,&vy,&vz,u_g,numberofnodes*numberofdofspernode);
+
 			/*Add to inputs: */
-			inputs->Add("velocity",u_g_double,numberofdofspernode,numberofnodes);
-			inputs->Add("fit",fit[0]);
+			femmodel->elements->AddInput(vx,VxEnum);
+			femmodel->elements->AddInput(vy,VyEnum);
+			femmodel->elements->AddInput(vz,VzEnum);
+			femmodel->elements->AddInput(fit[0],FitEnum);
 
 			/*Compute misfit: */
-			Misfitx( &J, femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,inputs,analysis_type,sub_analysis_type);
+			Misfitx( &J, femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,analysis_type,sub_analysis_type);
 			
 
Index: /issm/trunk/src/c/Qmux/Qmux.cpp
===================================================================
--- /issm/trunk/src/c/Qmux/Qmux.cpp	(revision 3672)
+++ /issm/trunk/src/c/Qmux/Qmux.cpp	(revision 3673)
@@ -51,7 +51,7 @@
 
 #ifdef _SERIAL_
-void Qmux(mxArray* model,mxArray* inputs,int analysis_type,int sub_analysis_type,char* dakota_input_file,char* dakota_output_file,char* dakota_error_file){
+void Qmux(mxArray* model,int analysis_type,int sub_analysis_type,char* dakota_input_file,char* dakota_output_file,char* dakota_error_file){
 #else
-void Qmux(Model* model,ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+void Qmux(Model* model,int analysis_type,int sub_analysis_type){
 #endif
 
@@ -111,5 +111,5 @@
 
 			// Serial case: plug in derived Interface object without an analysisComm
-			interface.assign_rep(new SIM::DakotaPlugin(problem_db,(void*)model,(void*)inputs,analysis_type,sub_analysis_type), false);
+			interface.assign_rep(new SIM::DakotaPlugin(problem_db,(void*)model,analysis_type,sub_analysis_type), false);
 		}
 	
@@ -120,5 +120,5 @@
 		#ifdef _PARALLEL_
 		//Warn other cpus that we are done running the dakota iterator, by setting the counter to -1:
-		SpawnCore(NULL,0, NULL,NULL,0,model,inputs,analysis_type,sub_analysis_type,-1);
+		SpawnCore(NULL,0, NULL,NULL,0,model,analysis_type,sub_analysis_type,-1);
 		#endif
 
@@ -128,5 +128,5 @@
 
 		for(;;){
-			if(!SpawnCore(NULL,0, NULL,NULL,0,model,inputs,analysis_type,sub_analysis_type,0))break; //counter came in at -1 on cpu0, bail out.
+			if(!SpawnCore(NULL,0, NULL,NULL,0,model,analysis_type,sub_analysis_type,0))break; //counter came in at -1 on cpu0, bail out.
 		}
 	}
Index: /issm/trunk/src/c/Qmux/Qmux.h
===================================================================
--- /issm/trunk/src/c/Qmux/Qmux.h	(revision 3672)
+++ /issm/trunk/src/c/Qmux/Qmux.h	(revision 3673)
@@ -10,8 +10,8 @@
 
 /* local prototypes: */
-int SpawnCore(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, void* model,void* inputs,int analysis_type,int sub_analysis_type,int counter);
+int SpawnCore(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, void* model,int analysis_type,int sub_analysis_type,int counter);
 #ifdef _SERIAL_
-void Qmux(mxArray* model,mxArray* inputs,int analysis_type,int sub_analysis_type,char* dakota_input_file,char* dakota_output_file,char* dakota_error_file);
-void SpawnCoreSerial(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, mxArray* model,mxArray* inputs,int analysis_type,int sub_analysis_type,int counter);
+void Qmux(mxArray* model,int analysis_type,int sub_analysis_type,char* dakota_input_file,char* dakota_output_file,char* dakota_error_file);
+void SpawnCoreSerial(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, mxArray* model,int analysis_type,int sub_analysis_type,int counter);
 #else
 void Qmux(Model* model,int analysis_type,int sub_analysis_type);
Index: /issm/trunk/src/c/Qmux/SpawnCore.cpp
===================================================================
--- /issm/trunk/src/c/Qmux/SpawnCore.cpp	(revision 3672)
+++ /issm/trunk/src/c/Qmux/SpawnCore.cpp	(revision 3673)
@@ -17,14 +17,14 @@
 #include "../include/macros.h"
 
-int SpawnCore(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, void* model,void* inputs,int analysis_type,int sub_analysis_type,int counter){
+int SpawnCore(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, void* model,int analysis_type,int sub_analysis_type,int counter){
 
 	/*Branch into a serial SpawnCore and a parallel SpawnCore: */
 	#ifdef _SERIAL_
-	SpawnCoreSerial(responses, numresponses, variables, variables_descriptors,numvariables, (mxArray*)model, (mxArray*)inputs,analysis_type,sub_analysis_type,counter);
+	SpawnCoreSerial(responses, numresponses, variables, variables_descriptors,numvariables, (mxArray*)model, analysis_type,sub_analysis_type,counter);
 	#else
 	/*Call SpawnCoreParallel unless counter=-1 on cpu0, in which case, bail out and return 0: */
 	MPI_Bcast(&counter,1,MPI_INT,0,MPI_COMM_WORLD); if(counter==-1)return 0;
 	
-	SpawnCoreParallel(responses, numresponses, variables, variables_descriptors,numvariables, (Model*)model, (ParameterInputs*)inputs,analysis_type,sub_analysis_type,counter);
+	SpawnCoreParallel(responses, numresponses, variables, variables_descriptors,numvariables, (Model*)model, analysis_type,sub_analysis_type,counter);
 	#endif
 
Index: /issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp
===================================================================
--- /issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp	(revision 3672)
+++ /issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp	(revision 3673)
@@ -34,5 +34,5 @@
 #include "../parallel/parallel.h"
 
-void SpawnCoreParallel(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, Model* model,ParameterInputs* inputs,int analysis_type,int sub_analysis_type,int counter){
+void SpawnCoreParallel(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, Model* model,int analysis_type,int sub_analysis_type,int counter){
 
 	int i;
@@ -97,13 +97,13 @@
 	results=new DataSet(ResultsEnum);
 
-	/*Modify core inputs to reflect the dakota variables inputs: */
-	inputs->UpdateFromDakota(variables,variables_descriptors,numvariables,model->GetFormulation(DiagnosticAnalysisEnum,HorizAnalysisEnum)->parameters,qmu_part,qmu_npart); //diagnostic horiz model is the one holding the parameters for Dakota.
+	/*Modify core inputs in objects contained in model, to reflect the dakota variables inputs: */
+	model->UpdateFromDakota(variables,variables_descriptors,numvariables,model->GetFormulation(DiagnosticAnalysisEnum,HorizAnalysisEnum)->parameters,qmu_part,qmu_npart); //diagnostic horiz model is the one holding the parameters for Dakota.
 
-	/*Run the analysis core solution sequence, with the updated inputs: */
+	/*Run the analysis core solution sequence: */
 	if(analysis_type==DiagnosticAnalysisEnum){
 			
 		if(verbose)_printf_("Starting diagnostic core\n");
 
-		diagnostic_core(results,model,inputs);
+		diagnostic_core(results,model);
 
 	}
@@ -111,5 +111,5 @@
 		
 		if(verbose)_printf_("Starting thermal core\n");
-		thermal_core(results,model,inputs);
+		thermal_core(results,model);
 
 	}
@@ -117,5 +117,5 @@
 
 		if(verbose)_printf_("Starting prognostic core\n");
-		prognostic_core(results,model,inputs);
+		prognostic_core(results,model);
 
 	}
@@ -123,5 +123,5 @@
 
 		if(verbose)_printf_("Starting transient core\n");
-		transient_core(results,model,inputs);
+		transient_core(results,model);
 
 	}
@@ -137,5 +137,5 @@
 	/*compute responses on cpu 0: dummy for now! */
 	if(verbose)_printf_("compute dakota responses:\n");
-	DakotaResponses(responses,responses_descriptors,numresponses,model,results,processed_results,inputs,analysis_type,sub_analysis_type);
+	DakotaResponses(responses,responses_descriptors,numresponses,model,results,processed_results,analysis_type,sub_analysis_type);
 
 	/*Free ressources:*/
Index: /issm/trunk/src/c/Qmux/SpawnCoreSerial.cpp
===================================================================
--- /issm/trunk/src/c/Qmux/SpawnCoreSerial.cpp	(revision 3672)
+++ /issm/trunk/src/c/Qmux/SpawnCoreSerial.cpp	(revision 3673)
@@ -19,5 +19,5 @@
 #include "../include/macros.h"
 
-void SpawnCoreSerial(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, mxArray* model,mxArray* inputs,int analysis_type,int sub_analysis_type,int counter){
+void SpawnCoreSerial(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, mxArray* model,int analysis_type,int sub_analysis_type,int counter){
 
 	int i;
@@ -57,5 +57,4 @@
 	//call SpwanCore matlab routine.
 	array[0]=model;
-	array[1]=inputs;
 	array[2]=mxvariables;
 	array[3]=mxvariabledescriptors;
Index: /issm/trunk/src/c/SurfaceAreax/SurfaceAreax.cpp
===================================================================
--- /issm/trunk/src/c/SurfaceAreax/SurfaceAreax.cpp	(revision 3672)
+++ /issm/trunk/src/c/SurfaceAreax/SurfaceAreax.cpp	(revision 3673)
@@ -10,6 +10,6 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void SurfaceAreax( double* pS, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials,DataSet* parameters,
-			ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
+void SurfaceAreax( double* pS, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials,Parameters* parameters,
+			int analysis_type,int sub_analysis_type){
 	
 	/*output: */
@@ -22,5 +22,5 @@
 
 	/*Compute gradients: */
-	elements->SurfaceArea(&S,inputs,analysis_type,sub_analysis_type);
+	elements->SurfaceArea(&S,analysis_type,sub_analysis_type);
 
 	/*Sum all J from all cpus of the cluster:*/
Index: /issm/trunk/src/c/SurfaceAreax/SurfaceAreax.h
===================================================================
--- /issm/trunk/src/c/SurfaceAreax/SurfaceAreax.h	(revision 3672)
+++ /issm/trunk/src/c/SurfaceAreax/SurfaceAreax.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void SurfaceAreax( double* pS, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters, 
+void SurfaceAreax( double* pS, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters, 
 			int analysis_type,int sub_analysis_type);
 
Index: /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp
===================================================================
--- /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp	(revision 3672)
+++ /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp	(revision 3673)
@@ -10,5 +10,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-void SystemMatricesx(Mat* pKgg, Vec* ppg,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, DataSet* parameters,
+void SystemMatricesx(Mat* pKgg, Vec* ppg,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, Parameters* parameters,
 		int kflag,int pflag,int connectivity,int numberofdofspernode,int analysis_type,int sub_analysis_type){
 	
@@ -40,10 +40,10 @@
 
 	/*Fill stiffness matrix and right hand side vector, from elements: */
-	if(kflag)elements->CreateKMatrix(Kgg,inputs,analysis_type,sub_analysis_type);
-	if(pflag)elements->CreatePVector(pg,inputs,analysis_type,sub_analysis_type);
+	if(kflag)elements->CreateKMatrix(Kgg,analysis_type,sub_analysis_type);
+	if(pflag)elements->CreatePVector(pg,analysis_type,sub_analysis_type);
 	
 	/*Fill stiffness matrix and right hand side vector, from loads: */
-	if(kflag)loads->CreateKMatrix(Kgg,inputs,analysis_type,sub_analysis_type);
-	if(pflag)loads->CreatePVector(pg,inputs,analysis_type,sub_analysis_type);
+	if(kflag)loads->CreateKMatrix(Kgg,analysis_type,sub_analysis_type);
+	if(pflag)loads->CreatePVector(pg,analysis_type,sub_analysis_type);
 
 	/*Assemble matrices: */
Index: /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.h
===================================================================
--- /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.h	(revision 3672)
+++ /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-void SystemMatricesx(Mat* pKgg, Vec* ppg,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, DataSet* parameters,
+void SystemMatricesx(Mat* pKgg, Vec* ppg,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, Parameters* parameters,
 		int kflag,int pflag,int connectivity,int numberofdofspernode,int analysis_type,int sub_analysis_type); 
 
Index: /issm/trunk/src/c/UpdateGeometryx/UpdateGeometryx.cpp
===================================================================
--- /issm/trunk/src/c/UpdateGeometryx/UpdateGeometryx.cpp	(revision 3672)
+++ /issm/trunk/src/c/UpdateGeometryx/UpdateGeometryx.cpp	(revision 3673)
@@ -12,5 +12,5 @@
 
 void UpdateGeometryx(Vec* poutthickness,Vec* poutbed,Vec* poutsurface, 
-		DataSet* elements, DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, DataSet* parameters,
+		DataSet* elements, DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,
 		Vec vec_newthickness,Vec vec_bed,Vec vec_surface){
 
Index: /issm/trunk/src/c/UpdateGeometryx/UpdateGeometryx.h
===================================================================
--- /issm/trunk/src/c/UpdateGeometryx/UpdateGeometryx.h	(revision 3672)
+++ /issm/trunk/src/c/UpdateGeometryx/UpdateGeometryx.h	(revision 3673)
@@ -11,5 +11,5 @@
 /* local prototypes: */
 void UpdateGeometryx(Vec* poutthickness,Vec* poutbed,Vec* poutsurface, 
-		DataSet* elements, DataSet* nodes,DataSet* vertices,DataSet* loads, DataSet* materials, DataSet* parameters,
+		DataSet* elements, DataSet* nodes,DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,
 		Vec newthickness,Vec bed,Vec surface);
 
Index: /issm/trunk/src/c/UpdateInputsx/UpdateInputsx.cpp
===================================================================
--- /issm/trunk/src/c/UpdateInputsx/UpdateInputsx.cpp	(revision 3672)
+++ /issm/trunk/src/c/UpdateInputsx/UpdateInputsx.cpp	(revision 3673)
@@ -9,5 +9,5 @@
 #include "../EnumDefinitions/EnumDefinitions.h"
 
-int UpdateInputsx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, DataSet* parameters,Vec solution, int analysis_type, int sub_analysis_type){
+int UpdateInputsx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,Vec solution, int analysis_type, int sub_analysis_type){
 
 	int noerr=1;
Index: /issm/trunk/src/c/UpdateInputsx/UpdateInputsx.h
===================================================================
--- /issm/trunk/src/c/UpdateInputsx/UpdateInputsx.h	(revision 3672)
+++ /issm/trunk/src/c/UpdateInputsx/UpdateInputsx.h	(revision 3673)
@@ -10,5 +10,5 @@
 
 /* local prototypes: */
-int		UpdateInputsx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  DataSet* parameters,Vec solution, int analysis_type, int sub_analysis_type);
+int		UpdateInputsx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,Vec solution, int analysis_type, int sub_analysis_type);
 
 #endif  /* _UPDATEINPUTSXX_H */
Index: /issm/trunk/src/c/io/FetchParams.cpp
===================================================================
--- /issm/trunk/src/c/io/FetchParams.cpp	(revision 3672)
+++ /issm/trunk/src/c/io/FetchParams.cpp	(revision 3673)
@@ -20,10 +20,9 @@
 void FetchParams(DataSet** pparameters, DataHandle dataref){
 
-	int i,j,count;
+	int i,j;
 
 	/*output: */
 	Param* param=NULL;
-	Numpar*  numpar=NULL;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 
 	/*intermediary: */
@@ -36,14 +35,11 @@
 	mxArray* pfield=NULL;
 	mxArray* pfield2=NULL;
+	int enum_type;
 
 
 	/*First, create parameters : */
-	parameters=new DataSet();
+	parameters=new Parameters();
 
-	/*Then, create Numpar object, before building the params objects: */
-	numpar= new Numpar(1);
-	parameters->AddObject(numpar);
-
-	/*now, go through matlab params structure, and create Param object for each field: */
+	/*go through matlab params structure, and create Param object for each field: */
 
 	nfields=mxGetNumberOfFields(dataref);
@@ -53,4 +49,5 @@
 		/*Get i'th field: */
 		name=(char*)mxGetFieldNameByNumber(dataref,count);
+		enum_type=StringAsEnum(name);
 		pfield=mxGetFieldByNumber(dataref,0,count);
 
@@ -65,10 +62,7 @@
 				ISSMERROR("%s%i (%s) %s%i%s%i%s","array in parameters structure field ",count,name," is of size (",M,",",N,")");
 			}
-
 			if (M==1 && N==1){
-
 				/*we have a simple scalar: */
-				param= new Param(count+1,name,DOUBLE);
-				param->SetDouble(*mxGetPr(pfield));
+				param= new DoubleParam(enum_type,*mxGetPr(pfield));
 				parameters->AddObject(param);
 
@@ -78,11 +72,9 @@
 					
 					/*vector: */
-					param= new Param(count+1,name,DOUBLEVEC);
-					param->SetDoubleVec(mxGetPr(pfield),M,1);
+					param= new DoubleVecParam(enum_type,mxGetPr(pfield),M);
 					parameters->AddObject(param);
 
 				}
 				else{
-
 					/*matrix: first, transpose, then plug into Param */
 					matrix=mxGetPr(pfield);
@@ -94,11 +86,9 @@
 					}
 
-					param= new Param(count+1,name,DOUBLEMAT);
-					param->SetDoubleMat(tmatrix,M,N);
+					param= new DoubleMatParam(enum_type,tmatrix,M,N);
 					parameters->AddObject(param);
 	
 					/*Free ressources:*/
 					xfree((void**)&tmatrix);
-
 				}
 			}
@@ -116,6 +106,5 @@
 			mxGetString(pfield,string,stringlen);
 
-			param= new Param(count+1,name,STRING);
-			param->SetString(string);
+			param= new StringParam(enum_type,string);
 			parameters->AddObject(param);
 
@@ -135,6 +124,5 @@
 			}
 		
-			param= new Param(count+1,name,STRINGARRAY);
-			param->SetStringArray(stringarray,M);
+			param= new StringArrayParam(enum_type,stringarray,M);
 			parameters->AddObject(param);
 
Index: /issm/trunk/src/c/io/WriteParams.cpp
===================================================================
--- /issm/trunk/src/c/io/WriteParams.cpp	(revision 3672)
+++ /issm/trunk/src/c/io/WriteParams.cpp	(revision 3673)
@@ -18,5 +18,7 @@
 #include "../include/macros.h"
 
-void WriteParams(DataHandle* pdataref,DataSet* parameters){
+void WriteParams(DataHandle* pdataref,Parameters* parameters){
+
+	int i;
 
 	/*output: */
@@ -26,34 +28,16 @@
 	mwSize		onebyone[2] = {1,1};
 	mwSize		ndim=2;
-	mxArray*    pfield=NULL;
-	mxArray*    pfield2=NULL;
 
 	/*intermediary: */
-	int         i,k;
-	mxArray*    field=NULL;
 	Param*      param=NULL;
-	int         integer;
-	double      ddouble;
-	char*       string;
-	double*     doublevec=NULL;
-	double*     doublemat=NULL;
-	Mat         mat=NULL;
-	Vec         vec=NULL;
-	char**      stringarray=NULL;
-	double*     serial_vec=NULL;
-	double*     serial_mat=NULL;
-	mwSize      M,N;
-	mwSize      dims[2]={0};
 
 	/*Recover data from the parameters dataset: */
-	nfields=(mwSize)parameters->Size()-1; //don't include Numpar
-
+	nfields=(mwSize)parameters->Size();
 	fnames=(const char**)xmalloc(nfields*sizeof(char*));
 	
 	/*Build structure in matlab workspace with all the parameter fields: */
 	for(i=0;i<nfields;i++){
-		param=(Param*)parameters->GetObjectByOffset(i+1);
-		fnames[i]=(const char*)xmalloc((strlen(param->GetParameterName())+1)*sizeof(char));
-		strcpy((char*)fnames[i],param->GetParameterName());
+		param=(Param*)parameters->GetObjectByOffset(i);
+		fnames[i]=param->GetParameterName();
 	}
 	/*Initialize structure: */
@@ -63,88 +47,8 @@
 	for(i=0;i<nfields;i++){
 
-		param=(Param*)parameters->GetObjectByOffset(i+1); //skip the numpar object
+		param=(Param*)parameters->GetObjectByOffset(i);
+		param->SetMatlabField(dataref);
+	}
 		
-		switch(param->GetType()){
-			case INTEGER:
-				param->GetParameterValue(&integer);
-				mxSetField( dataref, 0, param->GetParameterName(),mxCreateDoubleScalar((double)integer));
-				break;
-
-			case DOUBLE:
-				param->GetParameterValue(&ddouble);
-				mxSetField( dataref, 0, param->GetParameterName(),mxCreateDoubleScalar((double)ddouble));
-				break;
-
-			case STRING:
-				param->GetParameterValue(&string);
-				mxSetField( dataref, 0, param->GetParameterName(),mxCreateString(string));
-				break;
-
-			case STRINGARRAY:
-				param->GetParameterValue(&stringarray);
-				M=param->GetM();
-				dims[0]=M;
-				dims[1]=1;
-				pfield=mxCreateCellArray(2,dims);
-				for(k=0;k<M;k++){
-					char* string=stringarray[k];
-					mxSetCell(pfield,k,mxCreateString(string));
-				}
-				mxSetField( dataref, 0, param->GetParameterName(),pfield);
-				break;
-
-			case DOUBLEVEC:
-				param->GetParameterValue(&doublevec);
-				M=param->GetM();
-				pfield=mxCreateDoubleMatrix(0,0,mxREAL);
-				mxSetM(pfield,M);
-				mxSetN(pfield,1);
-				mxSetPr(pfield,doublevec);
-				mxSetField( dataref, 0, param->GetParameterName(),pfield);
-				break;
-
-			case DOUBLEMAT:
-				param->GetParameterValue(&doublemat);
-				M=param->GetM();
-				N=param->GetN();
-				pfield=mxCreateDoubleMatrix(0,0,mxREAL);
-				mxSetM(pfield,N);
-				mxSetN(pfield,M);
-				mxSetPr(pfield,doublemat);
-				//transpose the matrix, written directly to matlab! from C to matlab.
-				mexCallMATLAB(1,&pfield2, 1, &pfield, "'");
-				mxSetField( dataref, 0, param->GetParameterName(),pfield2);
-				break;
-		
-			case PETSCVEC:
-				param->GetParameterValue(&vec);
-				VecToMPISerial(&serial_vec,vec);
-				VecFree(&vec);
-				M=param->GetM();
-				pfield=mxCreateDoubleMatrix(0,0,mxREAL);
-				mxSetM(pfield,M);
-				mxSetN(pfield,1);
-				mxSetPr(pfield,serial_vec);
-				mxSetField( dataref, 0, param->GetParameterName(),pfield);
-				break;
-		
-			case PETSCMAT:
-				param->GetParameterValue(&mat);
-				MatToSerial(&serial_mat,mat);
-				MatFree(&mat);
-				M=param->GetM();
-				N=param->GetN();
-				pfield=mxCreateDoubleMatrix(0,0,mxREAL);
-				mxSetM(pfield,M);
-				mxSetN(pfield,N);
-				mxSetPr(pfield,serial_mat);
-				mxSetField( dataref, 0, param->GetParameterName(),pfield);
-				break;
-			default:
-				ISSMERROR("%s%i","unknown parameter type: ",param->GetType());
-				break;
-		}
-	}
-
 	/*Assign output pointers:*/
 	*pdataref=dataref;
Index: /issm/trunk/src/c/io/io.h
===================================================================
--- /issm/trunk/src/c/io/io.h	(revision 3672)
+++ /issm/trunk/src/c/io/io.h	(revision 3673)
@@ -33,5 +33,5 @@
 
 void WriteNodeSets(DataHandle* pdataref,NodeSets* nodesets);
-void WriteParams(DataHandle* pdataref,DataSet* parameters);
+void WriteParams(DataHandle* pdataref,Parameters* parameters);
 
 void FetchData(DataSet** pdataset,const mxArray* dataref);
Index: /issm/trunk/src/c/objects/Beam.cpp
===================================================================
--- /issm/trunk/src/c/objects/Beam.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Beam.cpp	(revision 3673)
@@ -586,6 +586,6 @@
 }
 /*}}}*/
-/*FUNCTION Beam::GetId{{{1*/
-int    Beam::GetId(void){ return id; }
+/*FUNCTION Beam::Id{{{1*/
+int    Beam::Id(void){ return id; }
 /*}}}*/
 /*FUNCTION Beam::GetJacobianDeterminant{{{1*/
@@ -614,9 +614,4 @@
 
 	return matpar;
-}
-/*}}}*/
-/*FUNCTION Beam::GetName{{{1*/
-char* Beam::GetName(void){
-	return "beam";
 }
 /*}}}*/
Index: /issm/trunk/src/c/objects/Beam.h
===================================================================
--- /issm/trunk/src/c/objects/Beam.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Beam.h	(revision 3673)
@@ -13,4 +13,6 @@
 #include "./Matice.h"
 #include "./Matpar.h"
+#include "../shared/Exceptions/exceptions.h"
+#include "../include/macros.h"
 #include "../ModelProcessorx/IoModel.h"
 #include "../DataSet/Inputs.h"
@@ -52,8 +54,7 @@
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
-		char* GetName();
 		void  Demarshall(char** pmarshalled_dataset);
 		int   Enum();
-		int   GetId(); 
+		int   Id(); 
 		int   MyRank();
 		void  Configure(DataSet* loads,DataSet* nodes,DataSet* materials,Parameters* parameters);
@@ -94,4 +95,5 @@
 		void  GetJacobianDeterminant(double* pJdet,double* z_list, double gauss_coord);
 		double MassFlux(double* segment,double* ug);
+		void AddInput(double value, int enum_type){ISSMERROR("not supporte yet!");}
 		/*}}}*/
 
Index: sm/trunk/src/c/objects/BeamVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/BeamVertexInput.cpp	(revision 3672)
+++ 	(revision )
@@ -1,140 +1,0 @@
-/*!\file BeamVertexInput.c
- * \brief: implementation of the BeamVertexInput object
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include "./BeamVertexInput.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "../include/typedefs.h"
-#include "../include/macros.h"
-
-/*Object constructors and destructor*/
-/*FUNCTION BeamVertexInput::BeamVertexInput(){{{1*/
-BeamVertexInput::BeamVertexInput(){
-	return;
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::BeamVertexInput(double* values){{{1*/
-BeamVertexInput::BeamVertexInput(int in_enum_type,double* in_values){
-
-	enum_type=in_enum_type;
-	values[0]=in_values[0];
-	values[1]=in_values[1];
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::~BeamVertexInput(){{{1*/
-BeamVertexInput::~BeamVertexInput(){
-	return;
-}
-/*}}}*/
-
-/*Object management*/
-/*FUNCTION BeamVertexInput::copy{{{1*/
-Object* BeamVertexInput::copy() {
-	
-	return new BeamVertexInput(this->enum_type,this->values);
-
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::DeepEcho{{{1*/
-void BeamVertexInput::DeepEcho(void){
-
-	printf("BeamVertexInput:\n");
-	printf("   enum: %i\n",this->enum_type);
-	printf("   %g|%g\n",this->values[0],this->values[1]);
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::Demarshall{{{1*/
-void  BeamVertexInput::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   i;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::Echo {{{1*/
-void BeamVertexInput::Echo(void){
-	this->DeepEcho();
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::Enum{{{1*/
-int BeamVertexInput::Enum(void){
-
-	return BeamVertexInputEnum;
-
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::EnumType{{{1*/
-int BeamVertexInput::EnumType(void){
-
-	return this->enum_type;
-
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::GetId{{{1*/
-int    BeamVertexInput::GetId(void){ return -1; }
-/*}}}*/
-/*FUNCTION BeamVertexInput::GetName{{{1*/
-char* BeamVertexInput::GetName(void){
-	return "triavertexinput";
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::Marshall{{{1*/
-void  BeamVertexInput::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of BeamVertexInput: */
-	enum_type=BeamVertexInputEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	/*marshall BeamVertexInput data: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
-
-	*pmarshalled_dataset=marshalled_dataset;
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::MarshallSize{{{1*/
-int   BeamVertexInput::MarshallSize(){
-	
-	return sizeof(values)+
-		sizeof(enum_type)+
-		+sizeof(int); //sizeof(int) for enum type
-}
-/*}}}*/
-/*FUNCTION BeamVertexInput::MyRank{{{1*/
-int    BeamVertexInput::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
-}
-/*}}}*/
-
-/*Object functions*/
-
Index: sm/trunk/src/c/objects/BeamVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/BeamVertexInput.h	(revision 3672)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*! \file BeamVertexInput.h 
- *  \brief: header file for triavertexinput object
- */
-
-
-#ifndef _BEAMVERTEXINPUT_H_
-#define _BEAMVERTEXINPUT_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Input.h"
-/*}}}*/
-
-
-class BeamVertexInput: public Input{
-
-	private: 
-		/*just hold 2 values for 2 vertices: */
-		int    enum_type;
-		double values[2];
-
-	public:
-
-		/*constructors, destructors: {{{1*/
-		BeamVertexInput();
-		BeamVertexInput(int enum_type,double* values);
-		~BeamVertexInput();
-		/*}}}*/
-		/*object management: {{{1*/
-		void  DeepEcho();
-		void  Echo();
-		int   GetId(); 
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		char* GetName();
-		void  Demarshall(char** pmarshalled_dataset);
-		int   Enum();
-		int   MyRank();
-		Object* copy();
-		int   EnumType();
-
-		/*}}}*/
-		/*numerics: {{{1*/
-		/*}}}*/
-
-};
-#endif  /* _BEAMVERTEXINPUT_H */
Index: sm/trunk/src/c/objects/BoolInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/BoolInput.cpp	(revision 3672)
+++ 	(revision )
@@ -1,140 +1,0 @@
-/*!\file BoolInput.c
- * \brief: implementation of the BoolInput object
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include "./BoolInput.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "../include/typedefs.h"
-#include "../include/types.h"
-#include "../include/macros.h"
-
-/*Object constructors and destructor*/
-/*FUNCTION BoolInput::BoolInput(){{{1*/
-BoolInput::BoolInput(){
-	return;
-}
-/*}}}*/
-/*FUNCTION BoolInput::BoolInput(double* values){{{1*/
-BoolInput::BoolInput(int in_enum_type,IssmBool in_value){
-
-	enum_type=in_enum_type;
-	value=in_value;
-}
-/*}}}*/
-/*FUNCTION BoolInput::~BoolInput(){{{1*/
-BoolInput::~BoolInput(){
-	return;
-}
-/*}}}*/
-
-/*Object management*/
-/*FUNCTION BoolInput::copy{{{1*/
-Object* BoolInput::copy() {
-	
-	return new BoolInput(this->enum_type,this->value);
-
-}
-/*}}}*/
-/*FUNCTION BoolInput::DeepEcho{{{1*/
-void BoolInput::DeepEcho(void){
-
-	printf("BoolInput:\n");
-	printf("   enum: %i\n",this->enum_type);
-	printf("   %s\n",value?"true":"false");
-}
-/*}}}*/
-/*FUNCTION BoolInput::Demarshall{{{1*/
-void  BoolInput::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   i;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION BoolInput::Echo {{{1*/
-void BoolInput::Echo(void){
-	this->DeepEcho();
-}
-/*}}}*/
-/*FUNCTION BoolInput::Enum{{{1*/
-int BoolInput::Enum(void){
-
-	return BoolInputEnum;
-
-}
-/*}}}*/
-/*FUNCTION BoolInput::EnumType{{{1*/
-int BoolInput::EnumType(void){
-
-	return this->enum_type;
-
-}
-/*}}}*/
-/*FUNCTION BoolInput::GetId{{{1*/
-int    BoolInput::GetId(void){ return -1; }
-/*}}}*/
-/*FUNCTION BoolInput::GetName{{{1*/
-char* BoolInput::GetName(void){
-	return "boolinput";
-}
-/*}}}*/
-/*FUNCTION BoolInput::Marshall{{{1*/
-void  BoolInput::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of BoolInput: */
-	enum_type=BoolInputEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	/*marshall BoolInput data: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
-
-	*pmarshalled_dataset=marshalled_dataset;
-}
-/*}}}*/
-/*FUNCTION BoolInput::MarshallSize{{{1*/
-int   BoolInput::MarshallSize(){
-	
-	return sizeof(value)+
-		sizeof(enum_type)+
-		+sizeof(int); //sizeof(int) for enum type
-}
-/*}}}*/
-/*FUNCTION BoolInput::MyRank{{{1*/
-int    BoolInput::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
-}
-/*}}}*/
-
-/*Object functions*/
-
Index: sm/trunk/src/c/objects/BoolInput.h
===================================================================
--- /issm/trunk/src/c/objects/BoolInput.h	(revision 3672)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*! \file BoolInput.h 
- *  \brief: header file for triavertexinput object
- */
-
-
-#ifndef _BOOLINPUT_H_
-#define _BOOLINPUT_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Input.h"
-#include "../include/types.h"
-/*}}}*/
-
-class BoolInput: public Input{
-
-	private: 
-		/*just hold 3 values for 3 vertices: */
-		int    enum_type;
-		IssmBool value;
-
-	public:
-
-		/*constructors, destructors: {{{1*/
-		BoolInput();
-		BoolInput(int enum_type,IssmBool value);
-		~BoolInput();
-		/*}}}*/
-		/*object management: {{{1*/
-		void  DeepEcho();
-		void  Echo();
-		int   GetId(); 
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		char* GetName();
-		void  Demarshall(char** pmarshalled_dataset);
-		int   Enum();
-		int   MyRank();
-		Object* copy();
-		int   EnumType();
-
-		/*}}}*/
-		/*numerics: {{{1*/
-		/*}}}*/
-
-};
-#endif  /* _BOOLINPUT_H */
Index: /issm/trunk/src/c/objects/DakotaPlugin.cpp
===================================================================
--- /issm/trunk/src/c/objects/DakotaPlugin.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/DakotaPlugin.cpp	(revision 3673)
@@ -44,9 +44,8 @@
 
 //constructor
-DakotaPlugin::DakotaPlugin(const Dakota::ProblemDescDB& problem_db,void* in_model, void* in_inputs, int in_analysis_type, int in_sub_analysis_type):Dakota::DirectApplicInterface(problem_db){
+DakotaPlugin::DakotaPlugin(const Dakota::ProblemDescDB& problem_db,void* in_model, int in_analysis_type, int in_sub_analysis_type):Dakota::DirectApplicInterface(problem_db){
 
 
 	model=in_model;
-	inputs=in_inputs;
 	analysis_type=in_analysis_type;
 	sub_analysis_type=in_sub_analysis_type;
@@ -90,5 +89,5 @@
 
 	/*run core solution: */
-	SpawnCore(responses,numFns, variables,variable_descriptors,numACV,model,inputs,analysis_type,sub_analysis_type,counter);
+	SpawnCore(responses,numFns, variables,variable_descriptors,numACV,model,analysis_type,sub_analysis_type,counter);
 
 	/*populate responses: */
Index: /issm/trunk/src/c/objects/DakotaPlugin.h
===================================================================
--- /issm/trunk/src/c/objects/DakotaPlugin.h	(revision 3672)
+++ /issm/trunk/src/c/objects/DakotaPlugin.h	(revision 3673)
@@ -24,10 +24,9 @@
 public:
 
-	DakotaPlugin(const Dakota::ProblemDescDB& problem_db,void* model, void* inputs, int analysis_type, int sub_analysis_type);
+	DakotaPlugin(const Dakota::ProblemDescDB& problem_db,void* model, int analysis_type, int sub_analysis_type);
 	~DakotaPlugin();
 
 	/*these fields are used by core solutions: */
 	void* model;
-	void* inputs;
 
 	int analysis_type;
Index: /issm/trunk/src/c/objects/DofVec.cpp
===================================================================
--- /issm/trunk/src/c/objects/DofVec.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/DofVec.cpp	(revision 3673)
@@ -231,17 +231,9 @@
 }
 /*}}}*/
-/*FUNCTION DofVec::GetId {{{1*/
-int DofVec::GetId(void){ 
+/*FUNCTION DofVec::Id {{{1*/
+int DofVec::Id(void){ 
 	ISSMERROR(" no id function for DofVec class");
 }
 
-/*FUNCTION DofVec::GetName {{{1*/
-char* DofVec::GetName(void){
-	char* string=NULL;
-	string=(char*)xmalloc((strlen(this->name)+1)*sizeof(char));
-	strcpy(string,this->name);
-	return string;
-}
-/*}}}*/
 /*FUNCTION DofVec::GetVec {{{1*/
 Vec     DofVec::GetVec(void){
Index: /issm/trunk/src/c/objects/DofVec.h
===================================================================
--- /issm/trunk/src/c/objects/DofVec.h	(revision 3672)
+++ /issm/trunk/src/c/objects/DofVec.h	(revision 3673)
@@ -42,8 +42,7 @@
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
-		char* GetName();
 		void  Demarshall(char** pmarshalled_dataset);
 		int   Enum();
-		int   GetId(); 
+		int   Id(); 
 		int   MyRank();
 		int   Size();
Index: sm/trunk/src/c/objects/DoubleInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/DoubleInput.cpp	(revision 3672)
+++ 	(revision )
@@ -1,140 +1,0 @@
-/*!\file DoubleInput.c
- * \brief: implementation of the DoubleInput object
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include "./DoubleInput.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "../include/typedefs.h"
-#include "../include/types.h"
-#include "../include/macros.h"
-
-/*Object constructors and destructor*/
-/*FUNCTION DoubleInput::DoubleInput(){{{1*/
-DoubleInput::DoubleInput(){
-	return;
-}
-/*}}}*/
-/*FUNCTION DoubleInput::DoubleInput(double* values){{{1*/
-DoubleInput::DoubleInput(int in_enum_type,IssmDouble in_value){
-
-	enum_type=in_enum_type;
-	value=in_value;
-}
-/*}}}*/
-/*FUNCTION DoubleInput::~DoubleInput(){{{1*/
-DoubleInput::~DoubleInput(){
-	return;
-}
-/*}}}*/
-
-/*Object management*/
-/*FUNCTION DoubleInput::copy{{{1*/
-Object* DoubleInput::copy() {
-	
-	return new DoubleInput(this->enum_type,this->value);
-
-}
-/*}}}*/
-/*FUNCTION DoubleInput::DeepEcho{{{1*/
-void DoubleInput::DeepEcho(void){
-
-	printf("DoubleInput:\n");
-	printf("   enum: %i\n",this->enum_type);
-	printf("   %g\n",this->value);
-}
-/*}}}*/
-/*FUNCTION DoubleInput::Demarshall{{{1*/
-void  DoubleInput::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   i;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION DoubleInput::Echo {{{1*/
-void DoubleInput::Echo(void){
-	this->DeepEcho();
-}
-/*}}}*/
-/*FUNCTION DoubleInput::Enum{{{1*/
-int DoubleInput::Enum(void){
-
-	return DoubleInputEnum;
-
-}
-/*}}}*/
-/*FUNCTION DoubleInput::EnumType{{{1*/
-int DoubleInput::EnumType(void){
-
-	return this->enum_type;
-
-}
-/*}}}*/
-/*FUNCTION DoubleInput::GetId{{{1*/
-int    DoubleInput::GetId(void){ return -1; }
-/*}}}*/
-/*FUNCTION DoubleInput::GetName{{{1*/
-char* DoubleInput::GetName(void){
-	return "doubleinput";
-}
-/*}}}*/
-/*FUNCTION DoubleInput::Marshall{{{1*/
-void  DoubleInput::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of DoubleInput: */
-	enum_type=DoubleInputEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	/*marshall DoubleInput data: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
-
-	*pmarshalled_dataset=marshalled_dataset;
-}
-/*}}}*/
-/*FUNCTION DoubleInput::MarshallSize{{{1*/
-int   DoubleInput::MarshallSize(){
-	
-	return sizeof(value)+
-		sizeof(enum_type)+
-		+sizeof(int); //sizeof(int) for enum type
-}
-/*}}}*/
-/*FUNCTION DoubleInput::MyRank{{{1*/
-int    DoubleInput::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
-}
-/*}}}*/
-
-/*Object functions*/
-
Index: sm/trunk/src/c/objects/DoubleInput.h
===================================================================
--- /issm/trunk/src/c/objects/DoubleInput.h	(revision 3672)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*! \file DoubleInput.h 
- *  \brief: header file for triavertexinput object
- */
-
-
-#ifndef _DOUBLEINPUT_H_
-#define _DOUBLEINPUT_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Input.h"
-#include "../include/types.h"
-/*}}}*/
-
-class DoubleInput: public Input{
-
-	private: 
-		/*just hold 3 values for 3 vertices: */
-		int    enum_type;
-		IssmDouble value;
-
-	public:
-
-		/*constructors, destructors: {{{1*/
-		DoubleInput();
-		DoubleInput(int enum_type,IssmDouble value);
-		~DoubleInput();
-		/*}}}*/
-		/*object management: {{{1*/
-		void  DeepEcho();
-		void  Echo();
-		int   GetId(); 
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		char* GetName();
-		void  Demarshall(char** pmarshalled_dataset);
-		int   Enum();
-		int   MyRank();
-		Object* copy();
-		int   EnumType();
-
-		/*}}}*/
-		/*numerics: {{{1*/
-		/*}}}*/
-
-};
-#endif  /* _DOUBLEINPUT_H */
Index: /issm/trunk/src/c/objects/Element.h
===================================================================
--- /issm/trunk/src/c/objects/Element.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Element.h	(revision 3673)
@@ -22,5 +22,4 @@
 		
 		virtual        ~Element(){};
-		virtual int    Enum()=0;
 		virtual void   Configure(DataSet* loads,DataSet* nodes,DataSet* materials,Parameters* parameters)=0;
 		
@@ -45,4 +44,5 @@
 		virtual void   ComputeStrainRate(Vec eps,     int analysis_type,int sub_analysis_type)=0;
 		virtual double MassFlux(double* segment,double* ug)=0;
+		virtual void   AddInput(double value, int enum_type)=0;
 
 		/*Implementation: */
Index: /issm/trunk/src/c/objects/FemModel.cpp
===================================================================
--- /issm/trunk/src/c/objects/FemModel.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/FemModel.cpp	(revision 3673)
@@ -144,6 +144,6 @@
 }
 /*}}}*/
-/*FUNCTION FemModel::GetId {{{1*/
-int   FemModel::GetId(void){
+/*FUNCTION FemModel::Id {{{1*/
+int   FemModel::Id(void){
 	ISSMERROR("not implemented yet!");
 }
@@ -164,9 +164,4 @@
 }
 /*}}}*/
-/*FUNCTION FemModel::GetName {{{1*/
-char*   FemModel::GetName(void){
-	ISSMERROR("not implemented yet!");
-}
-/*}}}*/
 /*FUNCTION FemModel::Demarshall {{{1*/
 void  FemModel::Demarshall(char** pmarshalled_dataset){
@@ -184,50 +179,50 @@
 }
 /*}}}*/
-/*FUNCTION FemModel::FindParam(double* pscalar,char* name) {{{1*/
-int FemModel::FindParam(double* pscalar,char* name){
-	
-	return parameters->FindParam(pscalar,name);
-
-}
-/*}}}*/
-/*FUNCTION FemModel::FindParam(int* pinteger,char* name) {{{1*/
-int FemModel::FindParam(int* pinteger,char* name){
-	
-	return parameters->FindParam(pinteger,name);
-
-}
-/*}}}*/
-/*FUNCTION FemModel::FindParam(char** pstring,char* name) {{{1*/
-int FemModel::FindParam(char** pstring,char* name){
-	
-	return parameters->FindParam(pstring,name);
-
-}
-/*}}}*/
-/*FUNCTION FemModel::FindParam(char*** pstringarray,int* pM,char* name) {{{1*/
-int FemModel::FindParam(char*** pstringarray,int* pM,char* name){
-	
-	return parameters->FindParam(pstringarray,pM,name);
-
-}
-/*}}}*/
-/*FUNCTION FemModel::FindParam(double** pdoublearray,int* pM,int* pN,char* name) {{{1*/
-int FemModel::FindParam(double** pdoublearray,int* pM,int* pN,char* name){
-	
-	return parameters->FindParam(pdoublearray,pM,pN,name);
-
-}
-/*}}}*/
-/*FUNCTION FemModel::FindParam(Vec* pvec,char* name) {{{1*/
-int FemModel::FindParam(Vec* pvec,char* name){
-	
-	return parameters->FindParam(pvec,name);
-
-}
-/*}}}*/
-/*FUNCTION FemModel::FindParam(Mat* pmat,char* name) {{{1*/
-int FemModel::FindParam(Mat* pmat,char* name){
-	
-	return parameters->FindParam(pmat,name);
+/*FUNCTION FemModel::FindParam(double* pscalar,int enum_type) {{{1*/
+int FemModel::FindParam(double* pscalar,int enum_type){
+	
+	return parameters->FindParam(pscalar,enum_type);
+
+}
+/*}}}*/
+/*FUNCTION FemModel::FindParam(int* pinteger,int enum_type) {{{1*/
+int FemModel::FindParam(int* pinteger,int enum_type){
+	
+	return parameters->FindParam(pinteger,enum_type);
+
+}
+/*}}}*/
+/*FUNCTION FemModel::FindParam(char** pstring,int enum_type) {{{1*/
+int FemModel::FindParam(char** pstring,int enum_type){
+	
+	return parameters->FindParam(pstring,enum_type);
+
+}
+/*}}}*/
+/*FUNCTION FemModel::FindParam(char*** pstringarray,int* pM,int enum_type) {{{1*/
+int FemModel::FindParam(char*** pstringarray,int* pM,int enum_type){
+	
+	return parameters->FindParam(pstringarray,pM,enum_type);
+
+}
+/*}}}*/
+/*FUNCTION FemModel::FindParam(double** pdoublearray,int* pM,int* pN,int enum_type) {{{1*/
+int FemModel::FindParam(double** pdoublearray,int* pM,int* pN,int enum_type){
+	
+	return parameters->FindParam(pdoublearray,pM,pN,enum_type);
+
+}
+/*}}}*/
+/*FUNCTION FemModel::FindParam(Vec* pvec,int enum_type) {{{1*/
+int FemModel::FindParam(Vec* pvec,int enum_type){
+	
+	return parameters->FindParam(pvec,enum_type);
+
+}
+/*}}}*/
+/*FUNCTION FemModel::FindParam(Mat* pmat,int enum_type) {{{1*/
+int FemModel::FindParam(Mat* pmat,int enum_type){
+	
+	return parameters->FindParam(pmat,enum_type);
 
 }
Index: /issm/trunk/src/c/objects/FemModel.h
===================================================================
--- /issm/trunk/src/c/objects/FemModel.h	(revision 3672)
+++ /issm/trunk/src/c/objects/FemModel.h	(revision 3673)
@@ -50,20 +50,19 @@
 		void  Echo();
 		void  DeepEcho();
-		int   GetId();
+		int   Id();
 		int   MyRank();
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
-		char* GetName();
 		void  Demarshall(char** pmarshalled_dataset);
 		int   Enum();
 		Object* copy();
 		
-		int FindParam(double* pscalar,char* name);
-		int FindParam(int* pinteger,char* name);
-		int FindParam(char** pstring,char* name);
-		int FindParam(char*** pstringarray,int* pM,char* name);
-		int FindParam(double** pdoublearray,int* pM, int* pN,char* name);
-		int FindParam(Vec* pvec,char* name);
-		int FindParam(Mat* pmat,char* name);
+		int FindParam(double* pscalar,int enum_type);
+		int FindParam(int* pinteger,int enum_type);
+		int FindParam(char** pstring,int enum_type);
+		int FindParam(char*** pstringarray,int* pM,int enum_type);
+		int FindParam(double** pdoublearray,int* pM, int* pN,int enum_type);
+		int FindParam(Vec* pvec,int enum_type);
+		int FindParam(Mat* pmat,int enum_type);
 		DataSet* get_elements(void);
 		DataSet* get_nodes(void);
Index: /issm/trunk/src/c/objects/Hook.cpp
===================================================================
--- /issm/trunk/src/c/objects/Hook.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Hook.cpp	(revision 3673)
@@ -77,5 +77,5 @@
 	this->num=input->GetNum();
 	input_objects=input->GetObjects();
-	input_ids=input->GetIds();
+	input_ids=input->Ids();
 	input_offsets=input->GetOffsets();
 
@@ -195,5 +195,5 @@
 		/*Check whether existing this->objects are correct: */
 		if(this->objects[i]){
-			if(this->objects[i]->GetId()==this->ids[i]) continue; //this node is good.
+			if(this->objects[i]->Id()==this->ids[i]) continue; //this node is good.
 			else this->objects[i]=NULL; //this node was incorrect, reset it.
 		}
@@ -204,5 +204,5 @@
 			 * we are good: */
 			object=(Object*)dataset->GetObjectByOffset(this->offsets[i]);
-			if (object->GetId()==this->ids[i]){
+			if (object->Id()==this->ids[i]){
 				this->objects[i]=object;
 				continue;
@@ -215,5 +215,5 @@
 			this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on.
 			/*check the id is correct!: */
-			if (this->objects[i]->GetId()!=this->ids[i]) ISSMERROR("%s%i%s%i%s"," wrong id: ",this->objects[i]->GetId()," vs ",this->ids[i],"  in resolved pointer!");
+			if (this->objects[i]->Id()!=this->ids[i]) ISSMERROR("%s%i%s%i%s"," wrong id: ",this->objects[i]->Id()," vs ",this->ids[i],"  in resolved pointer!");
 		}
 	}
@@ -294,6 +294,6 @@
 }
 /*}}}*/
-/*FUNCTION Hook::GetIds{{{1*/
-int* Hook::GetIds(void){
+/*FUNCTION Hook::Ids{{{1*/
+int* Hook::Ids(void){
 	return this->ids;
 }
Index: /issm/trunk/src/c/objects/Hook.h
===================================================================
--- /issm/trunk/src/c/objects/Hook.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Hook.h	(revision 3673)
@@ -45,5 +45,5 @@
 		Hook*      Spawn(int* indices, int numindices);
 		Object**   GetObjects(void);
-		int*       GetIds(void);
+		int*       Ids(void);
 		int*       GetOffsets(void);
 		int        GetNum(void);
Index: /issm/trunk/src/c/objects/Icefront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Icefront.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Icefront.cpp	(revision 3673)
@@ -41,5 +41,5 @@
 }
 /*}}}*/
-/*FUNCTION Icefront::Icefront(int id, Hook* hnodes, Hook* helement, Hook* hmatpar, DataSet* parameters, Inputs* icefront_inputs) {{{1*/
+/*FUNCTION Icefront::Icefront(int id, Hook* hnodes, Hook* helement, Hook* hmatpar, Parameters* parameters, Inputs* icefront_inputs) {{{1*/
 Icefront::Icefront(int icefront_id,Hook* icefront_hnodes, Hook* icefront_helement, Hook* icefront_hmatpar, Parameters* icefront_parameters, Inputs* icefront_inputs):
 	hnodes(icefront_hnodes),
@@ -214,11 +214,6 @@
 }
 /*}}}*/
-/*FUNCTION Icefront GetId {{{1*/
-int    Icefront::GetId(void){ return id; }
-/*}}}*/
-/*FUNCTION Icefront GetName {{{1*/
-char* Icefront::GetName(void){
-	return "icefront";
-}
+/*FUNCTION Icefront Id {{{1*/
+int    Icefront::Id(void){ return id; }
 /*}}}*/
 /*FUNCTION Icefront::Marshall {{{1*/
Index: /issm/trunk/src/c/objects/Icefront.h
===================================================================
--- /issm/trunk/src/c/objects/Icefront.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Icefront.h	(revision 3673)
@@ -52,6 +52,5 @@
 		void  Echo();
 		int   Enum();
-		int   GetId(); 
-		char* GetName();
+		int   Id(); 
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
Index: sm/trunk/src/c/objects/Input.h
===================================================================
--- /issm/trunk/src/c/objects/Input.h	(revision 3672)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*!\file:  Input.h
- * \brief abstract class for Input object
- */ 
-
-
-#ifndef _EINPUT_H_
-#define _EINPUT_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Object.h"
-/*}}}*/
-
-class Input: public Object{
-
-	public: 
-		
-		virtual        ~Input(){};
-		virtual int    Enum()=0; //object Enum
-		virtual int    EnumType()=0; //type of input (vx,vy?)
-
-};
-#endif
Index: /issm/trunk/src/c/objects/InputObjects/BeamVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/BeamVertexInput.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/BeamVertexInput.cpp	(revision 3673)
@@ -0,0 +1,167 @@
+/*!\file BeamVertexInput.c
+ * \brief: implementation of the BeamVertexInput object
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./BeamVertexInput.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+
+/*Object constructors and destructor*/
+/*FUNCTION BeamVertexInput::BeamVertexInput(){{{1*/
+BeamVertexInput::BeamVertexInput(){
+	return;
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::BeamVertexInput(double* values){{{1*/
+BeamVertexInput::BeamVertexInput(int in_enum_type,double* in_values){
+
+	enum_type=in_enum_type;
+	values[0]=in_values[0];
+	values[1]=in_values[1];
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::~BeamVertexInput(){{{1*/
+BeamVertexInput::~BeamVertexInput(){
+	return;
+}
+/*}}}*/
+
+/*Object management*/
+/*FUNCTION BeamVertexInput::copy{{{1*/
+Object* BeamVertexInput::copy() {
+	
+	return new BeamVertexInput(this->enum_type,this->values);
+
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::DeepEcho{{{1*/
+void BeamVertexInput::DeepEcho(void){
+
+	printf("BeamVertexInput:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %g|%g\n",this->values[0],this->values[1]);
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::Demarshall{{{1*/
+void  BeamVertexInput::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::Echo {{{1*/
+void BeamVertexInput::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::Enum{{{1*/
+int BeamVertexInput::Enum(void){
+
+	return BeamVertexInputEnum;
+
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::EnumType{{{1*/
+int BeamVertexInput::EnumType(void){
+
+	return this->enum_type;
+
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::Id{{{1*/
+int    BeamVertexInput::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION BeamVertexInput::Marshall{{{1*/
+void  BeamVertexInput::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of BeamVertexInput: */
+	enum_value=BeamVertexInputEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall BeamVertexInput data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::MarshallSize{{{1*/
+int   BeamVertexInput::MarshallSize(){
+	
+	return sizeof(values)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum_value
+}
+/*}}}*/
+/*FUNCTION BeamVertexInput::MyRank{{{1*/
+int    BeamVertexInput::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+
+/*Object functions*/
+/*FUNCTION BeamVertexInput::GetParameterValue(bool* pvalue) {{{1*/
+void BeamVertexInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetParameterValue(int* pvalue){{{1*/
+void BeamVertexInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetParameterValue(double* pvalue){{{1*/
+void BeamVertexInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/
+void BeamVertexInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/
+void BeamVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetParameterValue(double* pvalue,double* gauss){{{1*/
+void BeamVertexInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){{{1*/
+void BeamVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/
+void BeamVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/
+void BeamVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss){{{1*/
+void BeamVertexInput::GetStrainRate(double* epsilon,Input* yinput,double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BeamVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss){{{1*/
+void BeamVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput,Input* zinput, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
Index: /issm/trunk/src/c/objects/InputObjects/BeamVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/BeamVertexInput.h	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/BeamVertexInput.h	(revision 3673)
@@ -0,0 +1,59 @@
+/*! \file BeamVertexInput.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _BEAMVERTEXINPUT_H_
+#define _BEAMVERTEXINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+/*}}}*/
+
+
+class BeamVertexInput: public Input{
+
+	private: 
+		/*just hold 2 values for 2 vertices: */
+		int    enum_type;
+		double values[2];
+
+	public:
+
+		/*constructors, destructors: {{{1*/
+		BeamVertexInput();
+		BeamVertexInput(int enum_type,double* values);
+		~BeamVertexInput();
+		/*}}}*/
+		/*object management: {{{1*/
+		void  DeepEcho();
+		void  Echo();
+		int   Id(); 
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		void  Demarshall(char** pmarshalled_dataset);
+		int   Enum();
+		int   MyRank();
+		Object* copy();
+		int   EnumType();
+
+		/*}}}*/
+		/*numerics: {{{1*/
+		void GetParameterValue(bool* pvalue);
+		void GetParameterValue(int* pvalue);
+		void GetParameterValue(double* pvalue);
+		void GetParameterValue(double* pvalue,Node* node);
+		void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);
+		void GetParameterValue(double* pvalue,double* gauss);
+		void GetParameterValue(double* pvalue,double* gauss,double defaultvalue);
+		
+		void GetParameterValues(double* values,double* gauss_pointers, int numgauss);
+	
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss);
+		void GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss);
+		void GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss);
+		/*}}}*/
+
+};
+#endif  /* _BEAMVERTEXINPUT_H */
Index: /issm/trunk/src/c/objects/InputObjects/BoolInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/BoolInput.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/BoolInput.cpp	(revision 3673)
@@ -0,0 +1,167 @@
+/*!\file BoolInput.c
+ * \brief: implementation of the BoolInput object
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./BoolInput.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+
+/*Object constructors and destructor*/
+/*FUNCTION BoolInput::BoolInput(){{{1*/
+BoolInput::BoolInput(){
+	return;
+}
+/*}}}*/
+/*FUNCTION BoolInput::BoolInput(double* values){{{1*/
+BoolInput::BoolInput(int in_enum_type,IssmBool in_value){
+
+	enum_type=in_enum_type;
+	value=in_value;
+}
+/*}}}*/
+/*FUNCTION BoolInput::~BoolInput(){{{1*/
+BoolInput::~BoolInput(){
+	return;
+}
+/*}}}*/
+
+/*Object management*/
+/*FUNCTION BoolInput::copy{{{1*/
+Object* BoolInput::copy() {
+	
+	return new BoolInput(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION BoolInput::DeepEcho{{{1*/
+void BoolInput::DeepEcho(void){
+
+	printf("BoolInput:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %s\n",value?"true":"false");
+}
+/*}}}*/
+/*FUNCTION BoolInput::Demarshall{{{1*/
+void  BoolInput::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION BoolInput::Echo {{{1*/
+void BoolInput::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION BoolInput::Enum{{{1*/
+int BoolInput::Enum(void){
+
+	return BoolInputEnum;
+
+}
+/*}}}*/
+/*FUNCTION BoolInput::EnumType{{{1*/
+int BoolInput::EnumType(void){
+
+	return this->enum_type;
+
+}
+/*}}}*/
+/*FUNCTION BoolInput::Id{{{1*/
+int    BoolInput::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION BoolInput::Marshall{{{1*/
+void  BoolInput::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of BoolInput: */
+	enum_value=BoolInputEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall BoolInput data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION BoolInput::MarshallSize{{{1*/
+int   BoolInput::MarshallSize(){
+	
+	return sizeof(value)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION BoolInput::MyRank{{{1*/
+int    BoolInput::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+
+/*Object functions*/
+/*FUNCTION BoolInput::GetParameterValue(bool* pvalue) {{{1*/
+void BoolInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetParameterValue(int* pvalue){{{1*/
+void BoolInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetParameterValue(double* pvalue){{{1*/
+void BoolInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetParameterValue(double* pvalue,Node* node){{{1*/
+void BoolInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/
+void BoolInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetParameterValue(double* pvalue,double* gauss){{{1*/
+void BoolInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){{{1*/
+void BoolInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/
+void BoolInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/
+void BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss){{{1*/
+void BoolInput::GetStrainRate(double* epsilon,Input* yinput,double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION BoolInput::GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss){{{1*/
+void BoolInput::GetStrainRateStokes(double* epsilon,Input* yinput,Input* zinput, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
Index: /issm/trunk/src/c/objects/InputObjects/BoolInput.h
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/BoolInput.h	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/BoolInput.h	(revision 3673)
@@ -0,0 +1,59 @@
+/*! \file BoolInput.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _BOOLINPUT_H_
+#define _BOOLINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+#include "../include/types.h"
+/*}}}*/
+
+class BoolInput: public Input{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int    enum_type;
+		IssmBool value;
+
+	public:
+
+		/*constructors, destructors: {{{1*/
+		BoolInput();
+		BoolInput(int enum_type,IssmBool value);
+		~BoolInput();
+		/*}}}*/
+		/*object management: {{{1*/
+		void  DeepEcho();
+		void  Echo();
+		int   Id(); 
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		void  Demarshall(char** pmarshalled_dataset);
+		int   Enum();
+		int   MyRank();
+		Object* copy();
+		int   EnumType();
+
+		/*}}}*/
+		/*numerics: {{{1*/
+		void GetParameterValue(bool* pvalue);
+		void GetParameterValue(int* pvalue);
+		void GetParameterValue(double* pvalue);
+		void GetParameterValue(double* pvalue,Node* node);
+		void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);
+		void GetParameterValue(double* pvalue,double* gauss);
+		void GetParameterValue(double* pvalue,double* gauss,double defaultvalue);
+		
+		void GetParameterValues(double* values,double* gauss_pointers, int numgauss);
+	
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss);
+		void GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss);
+		void GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss);
+		/*}}}*/
+
+};
+#endif  /* _BOOLINPUT_H */
Index: /issm/trunk/src/c/objects/InputObjects/DoubleInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/DoubleInput.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/DoubleInput.cpp	(revision 3673)
@@ -0,0 +1,167 @@
+/*!\file DoubleInput.c
+ * \brief: implementation of the DoubleInput object
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./DoubleInput.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+
+/*Object constructors and destructor*/
+/*FUNCTION DoubleInput::DoubleInput(){{{1*/
+DoubleInput::DoubleInput(){
+	return;
+}
+/*}}}*/
+/*FUNCTION DoubleInput::DoubleInput(double* values){{{1*/
+DoubleInput::DoubleInput(int in_enum_type,IssmDouble in_value){
+
+	enum_type=in_enum_type;
+	value=in_value;
+}
+/*}}}*/
+/*FUNCTION DoubleInput::~DoubleInput(){{{1*/
+DoubleInput::~DoubleInput(){
+	return;
+}
+/*}}}*/
+
+/*Object management*/
+/*FUNCTION DoubleInput::copy{{{1*/
+Object* DoubleInput::copy() {
+	
+	return new DoubleInput(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION DoubleInput::DeepEcho{{{1*/
+void DoubleInput::DeepEcho(void){
+
+	printf("DoubleInput:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %g\n",this->value);
+}
+/*}}}*/
+/*FUNCTION DoubleInput::Demarshall{{{1*/
+void  DoubleInput::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION DoubleInput::Echo {{{1*/
+void DoubleInput::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION DoubleInput::Enum{{{1*/
+int DoubleInput::Enum(void){
+
+	return DoubleInputEnum;
+
+}
+/*}}}*/
+/*FUNCTION DoubleInput::EnumType{{{1*/
+int DoubleInput::EnumType(void){
+
+	return this->enum_type;
+
+}
+/*}}}*/
+/*FUNCTION DoubleInput::Id{{{1*/
+int    DoubleInput::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION DoubleInput::Marshall{{{1*/
+void  DoubleInput::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of DoubleInput: */
+	enum_value=DoubleInputEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall DoubleInput data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION DoubleInput::MarshallSize{{{1*/
+int   DoubleInput::MarshallSize(){
+	
+	return sizeof(value)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION DoubleInput::MyRank{{{1*/
+int    DoubleInput::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+
+/*Object functions*/
+/*FUNCTION DoubleInput::GetParameterValue(bool* pvalue) {{{1*/
+void DoubleInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetParameterValue(int* pvalue){{{1*/
+void DoubleInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetParameterValue(double* pvalue){{{1*/
+void DoubleInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetParameterValue(double* pvalue,Node* node){{{1*/
+void DoubleInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/
+void DoubleInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetParameterValue(double* pvalue,double* gauss){{{1*/
+void DoubleInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){{{1*/
+void DoubleInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/
+void DoubleInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/
+void DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss){{{1*/
+void DoubleInput::GetStrainRate(double* epsilon,Input* yinput,double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION DoubleInput::GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss){{{1*/
+void DoubleInput::GetStrainRateStokes(double* epsilon,Input* yinput,Input* zinput, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
Index: /issm/trunk/src/c/objects/InputObjects/DoubleInput.h
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/DoubleInput.h	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/DoubleInput.h	(revision 3673)
@@ -0,0 +1,59 @@
+/*! \file DoubleInput.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _DOUBLEINPUT_H_
+#define _DOUBLEINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+#include "../include/types.h"
+/*}}}*/
+
+class DoubleInput: public Input{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int    enum_type;
+		IssmDouble value;
+
+	public:
+
+		/*constructors, destructors: {{{1*/
+		DoubleInput();
+		DoubleInput(int enum_type,IssmDouble value);
+		~DoubleInput();
+		/*}}}*/
+		/*object management: {{{1*/
+		void  DeepEcho();
+		void  Echo();
+		int   Id(); 
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		void  Demarshall(char** pmarshalled_dataset);
+		int   Enum();
+		int   MyRank();
+		Object* copy();
+		int   EnumType();
+
+		/*}}}*/
+		/*numerics: {{{1*/
+		void GetParameterValue(bool* pvalue);
+		void GetParameterValue(int* pvalue);
+		void GetParameterValue(double* pvalue);
+		void GetParameterValue(double* pvalue,Node* node);
+		void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);
+		void GetParameterValue(double* pvalue,double* gauss);
+		void GetParameterValue(double* pvalue,double* gauss,double defaultvalue);
+		
+		void GetParameterValues(double* values,double* gauss_pointers, int numgauss);
+	
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss);
+		void GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss);
+		void GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss);
+		/*}}}*/
+
+};
+#endif  /* _DOUBLEINPUT_H */
Index: /issm/trunk/src/c/objects/InputObjects/Input.h
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/Input.h	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/Input.h	(revision 3673)
@@ -0,0 +1,42 @@
+/*!\file:  Input.h
+ * \brief abstract class for Input object
+ */ 
+
+
+#ifndef _EINPUT_H_
+#define _EINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Object.h"
+class Node;
+#include "./Node.h"
+/*}}}*/
+
+class Input: public Object{
+
+	public: 
+		
+		virtual        ~Input(){};
+		virtual int    Enum()=0; //object Enum
+		virtual int    EnumType()=0; //type of input (vx,vy?)
+
+		/*methods:{{{1*/
+		virtual void GetParameterValue(bool* pvalue)=0;
+		virtual void GetParameterValue(int* pvalue)=0;
+		virtual void GetParameterValue(double* pvalue)=0;
+		virtual void GetParameterValue(double* pvalue,Node* node)=0;
+		virtual void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord)=0;
+		virtual void GetParameterValue(double* pvalue,double* gauss)=0;
+		virtual void GetParameterValue(double* pvalue,double* gauss,double defaultvalue)=0;
+		
+		virtual void GetParameterValues(double* values,double* gauss_pointers, int numgauss)=0;
+	
+		virtual void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss)=0;
+		virtual void GetStrainRate(double* epsilon, Input* yinput, double* xyz_list, double* gauss)=0;
+		virtual void GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss)=0;
+
+		/*}}}*/
+
+};
+#endif
Index: /issm/trunk/src/c/objects/InputObjects/IntInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/IntInput.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/IntInput.cpp	(revision 3673)
@@ -0,0 +1,167 @@
+/*!\file IntInput.c
+ * \brief: implementation of the IntInput object
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./IntInput.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+
+/*Object constructors and destructor*/
+/*FUNCTION IntInput::IntInput(){{{1*/
+IntInput::IntInput(){
+	return;
+}
+/*}}}*/
+/*FUNCTION IntInput::IntInput(double* values){{{1*/
+IntInput::IntInput(int in_enum_type,IssmInt in_value){
+
+	enum_type=in_enum_type;
+	value=in_value;
+}
+/*}}}*/
+/*FUNCTION IntInput::~IntInput(){{{1*/
+IntInput::~IntInput(){
+	return;
+}
+/*}}}*/
+
+/*Object management*/
+/*FUNCTION IntInput::copy{{{1*/
+Object* IntInput::copy() {
+	
+	return new IntInput(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION IntInput::DeepEcho{{{1*/
+void IntInput::DeepEcho(void){
+
+	printf("IntInput:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %i\n",this->value);
+}
+/*}}}*/
+/*FUNCTION IntInput::Demarshall{{{1*/
+void  IntInput::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION IntInput::Echo {{{1*/
+void IntInput::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION IntInput::Enum{{{1*/
+int IntInput::Enum(void){
+
+	return IntInputEnum;
+
+}
+/*}}}*/
+/*FUNCTION IntInput::EnumType{{{1*/
+int IntInput::EnumType(void){
+
+	return this->enum_type;
+
+}
+/*}}}*/
+/*FUNCTION IntInput::Id{{{1*/
+int    IntInput::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION IntInput::Marshall{{{1*/
+void  IntInput::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of IntInput: */
+	enum_value=IntInputEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall IntInput data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION IntInput::MarshallSize{{{1*/
+int   IntInput::MarshallSize(){
+	
+	return sizeof(value)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION IntInput::MyRank{{{1*/
+int    IntInput::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+
+/*Object functions*/
+/*FUNCTION IntInput::GetParameterValue(bool* pvalue) {{{1*/
+void IntInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetParameterValue(int* pvalue){{{1*/
+void IntInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetParameterValue(double* pvalue){{{1*/
+void IntInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetParameterValue(double* pvalue,Node* node){{{1*/
+void IntInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/
+void IntInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetParameterValue(double* pvalue,double* gauss){{{1*/
+void IntInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){{{1*/
+void IntInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/
+void IntInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/
+void IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss){{{1*/
+void IntInput::GetStrainRate(double* epsilon,Input* yinput,double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION IntInput::GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss){{{1*/
+void IntInput::GetStrainRateStokes(double* epsilon,Input* yinput,Input* zinput, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
Index: /issm/trunk/src/c/objects/InputObjects/IntInput.h
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/IntInput.h	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/IntInput.h	(revision 3673)
@@ -0,0 +1,60 @@
+/*! \file IntInput.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _INTINPUT_H_
+#define _INTINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+#include "../include/types.h"
+/*}}}*/
+
+class IntInput: public Input{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int    enum_type;
+		IssmInt value;
+
+	public:
+
+		/*constructors, destructors: {{{1*/
+		IntInput();
+		IntInput(int enum_type,IssmInt value);
+		~IntInput();
+		/*}}}*/
+		/*object management: {{{1*/
+		void  DeepEcho();
+		void  Echo();
+		int   Id(); 
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		void  Demarshall(char** pmarshalled_dataset);
+		int   Enum();
+		int   MyRank();
+		Object* copy();
+		int   EnumType();
+
+		/*}}}*/
+		/*numerics: {{{1*/
+		void GetParameterValue(bool* pvalue);
+		void GetParameterValue(int* pvalue);
+		void GetParameterValue(double* pvalue);
+		void GetParameterValue(double* pvalue,Node* node);
+		void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);
+		void GetParameterValue(double* pvalue,double* gauss);
+		void GetParameterValue(double* pvalue,double* gauss,double defaultvalue);
+		
+		void GetParameterValues(double* values,double* gauss_pointers, int numgauss);
+	
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss);
+		void GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss);
+		void GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss);
+
+		/*}}}*/
+
+};
+#endif  /* _INTINPUT_H */
Index: /issm/trunk/src/c/objects/InputObjects/PentaVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/PentaVertexInput.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/PentaVertexInput.cpp	(revision 3673)
@@ -0,0 +1,171 @@
+/*!\file PentaVertexInput.c
+ * \brief: implementation of the PentaVertexInput object
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./PentaVertexInput.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+
+/*Object constructors and destructor*/
+/*FUNCTION PentaVertexInput::PentaVertexInput(){{{1*/
+PentaVertexInput::PentaVertexInput(){
+	return;
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::PentaVertexInput(double* values){{{1*/
+PentaVertexInput::PentaVertexInput(int in_enum_type,double* in_values){
+
+	enum_type=in_enum_type;
+	values[0]=in_values[0];
+	values[1]=in_values[1];
+	values[2]=in_values[2];
+	values[3]=in_values[3];
+	values[4]=in_values[4];
+	values[5]=in_values[5];
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::~PentaVertexInput(){{{1*/
+PentaVertexInput::~PentaVertexInput(){
+	return;
+}
+/*}}}*/
+
+/*Object management*/
+/*FUNCTION PentaVertexInput::copy{{{1*/
+Object* PentaVertexInput::copy() {
+	
+	return new PentaVertexInput(this->enum_type,this->values);
+
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::DeepEcho{{{1*/
+void PentaVertexInput::DeepEcho(void){
+
+	printf("PentaVertexInput:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %g|%g|%g|%g|%g|%g\n",this->values[0],this->values[1],this->values[2],this->values[3],this->values[4],this->values[5]);
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::Demarshall{{{1*/
+void  PentaVertexInput::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::Echo {{{1*/
+void PentaVertexInput::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::Enum{{{1*/
+int PentaVertexInput::Enum(void){
+
+	return PentaVertexInputEnum;
+
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::EnumType{{{1*/
+int PentaVertexInput::EnumType(void){
+
+	return this->enum_type;
+
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::Id{{{1*/
+int    PentaVertexInput::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION PentaVertexInput::Marshall{{{1*/
+void  PentaVertexInput::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of PentaVertexInput: */
+	enum_value=PentaVertexInputEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall PentaVertexInput data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::MarshallSize{{{1*/
+int   PentaVertexInput::MarshallSize(){
+	
+	return sizeof(values)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION PentaVertexInput::MyRank{{{1*/
+int    PentaVertexInput::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+
+/*Object functions*/
+/*FUNCTION PentaVertexInput::GetParameterValue(bool* pvalue) {{{1*/
+void PentaVertexInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetParameterValue(int* pvalue){{{1*/
+void PentaVertexInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue){{{1*/
+void PentaVertexInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/
+void PentaVertexInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/
+void PentaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,double* gauss){{{1*/
+void PentaVertexInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){{{1*/
+void PentaVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/
+void PentaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/
+void PentaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss){{{1*/
+void PentaVertexInput::GetStrainRate(double* epsilon,Input* yinput,double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION PentaVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss){{{1*/
+void PentaVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput,Input* zinput, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
Index: /issm/trunk/src/c/objects/InputObjects/PentaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/PentaVertexInput.h	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/PentaVertexInput.h	(revision 3673)
@@ -0,0 +1,58 @@
+/*! \file PentaVertexInput.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _PENTAVERTEXINPUT_H_
+#define _PENTAVERTEXINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+/*}}}*/
+
+class PentaVertexInput: public Input{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int    enum_type;
+		double values[6];
+
+	public:
+
+		/*constructors, destructors: {{{1*/
+		PentaVertexInput();
+		PentaVertexInput(int enum_type,double* values);
+		~PentaVertexInput();
+		/*}}}*/
+		/*object management: {{{1*/
+		void  DeepEcho();
+		void  Echo();
+		int   Id(); 
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		void  Demarshall(char** pmarshalled_dataset);
+		int   Enum();
+		int   MyRank();
+		Object* copy();
+		int   EnumType();
+
+		/*}}}*/
+		/*numerics: {{{1*/
+		void GetParameterValue(bool* pvalue);
+		void GetParameterValue(int* pvalue);
+		void GetParameterValue(double* pvalue);
+		void GetParameterValue(double* pvalue,Node* node);
+		void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);
+		void GetParameterValue(double* pvalue,double* gauss);
+		void GetParameterValue(double* pvalue,double* gauss,double defaultvalue);
+		
+		void GetParameterValues(double* values,double* gauss_pointers, int numgauss);
+	
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss);
+		void GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss);
+		void GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss);
+		/*}}}*/
+
+};
+#endif  /* _PENTAVERTEXINPUT_H */
Index: /issm/trunk/src/c/objects/InputObjects/SingVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/SingVertexInput.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/SingVertexInput.cpp	(revision 3673)
@@ -0,0 +1,166 @@
+/*!\file SingVertexInput.c
+ * \brief: implementation of the SingVertexInput object
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./SingVertexInput.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+
+/*Object constructors and destructor*/
+/*FUNCTION SingVertexInput::SingVertexInput(){{{1*/
+SingVertexInput::SingVertexInput(){
+	return;
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::SingVertexInput(double* values){{{1*/
+SingVertexInput::SingVertexInput(int in_enum_type,double in_value){
+
+	enum_type=in_enum_type;
+	value=in_value;
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::~SingVertexInput(){{{1*/
+SingVertexInput::~SingVertexInput(){
+	return;
+}
+/*}}}*/
+
+/*Object management*/
+/*FUNCTION SingVertexInput::copy{{{1*/
+Object* SingVertexInput::copy() {
+	
+	return new SingVertexInput(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::DeepEcho{{{1*/
+void SingVertexInput::DeepEcho(void){
+
+	printf("SingVertexInput:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %g\n",this->value);
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::Demarshall{{{1*/
+void  SingVertexInput::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::Echo {{{1*/
+void SingVertexInput::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::Enum{{{1*/
+int SingVertexInput::Enum(void){
+
+	return SingVertexInputEnum;
+
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::EnumType{{{1*/
+int SingVertexInput::EnumType(void){
+
+	return this->enum_type;
+
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::Id{{{1*/
+int    SingVertexInput::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION SingVertexInput::Marshall{{{1*/
+void  SingVertexInput::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of SingVertexInput: */
+	enum_value=SingVertexInputEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall SingVertexInput data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::MarshallSize{{{1*/
+int   SingVertexInput::MarshallSize(){
+	
+	return sizeof(value)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION SingVertexInput::MyRank{{{1*/
+int    SingVertexInput::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+
+/*Object functions*/
+/*FUNCTION SingVertexInput::GetParameterValue(bool* pvalue) {{{1*/
+void SingVertexInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetParameterValue(int* pvalue){{{1*/
+void SingVertexInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetParameterValue(double* pvalue){{{1*/
+void SingVertexInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/
+void SingVertexInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/
+void SingVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetParameterValue(double* pvalue,double* gauss){{{1*/
+void SingVertexInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){{{1*/
+void SingVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/
+void SingVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/
+void SingVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss){{{1*/
+void SingVertexInput::GetStrainRate(double* epsilon,Input* yinput,double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION SingVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss){{{1*/
+void SingVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput,Input* zinput, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
Index: /issm/trunk/src/c/objects/InputObjects/SingVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/SingVertexInput.h	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/SingVertexInput.h	(revision 3673)
@@ -0,0 +1,58 @@
+/*! \file SingVertexInput.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _SINGVERTEXINPUT_H_
+#define _SINGVERTEXINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+/*}}}*/
+
+class SingVertexInput: public Input{
+
+	private: 
+		/*just hold 1 value for 1 vertex: */
+		int    enum_type;
+		double value;
+
+	public:
+
+		/*constructors, destructors: {{{1*/
+		SingVertexInput();
+		SingVertexInput(int enum_type,double value);
+		~SingVertexInput();
+		/*}}}*/
+		/*object management: {{{1*/
+		void  DeepEcho();
+		void  Echo();
+		int   Id(); 
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		void  Demarshall(char** pmarshalled_dataset);
+		int   Enum();
+		int   MyRank();
+		Object* copy();
+		int   EnumType();
+
+		/*}}}*/
+		/*numerics: {{{1*/
+		void GetParameterValue(bool* pvalue);
+		void GetParameterValue(int* pvalue);
+		void GetParameterValue(double* pvalue);
+		void GetParameterValue(double* pvalue,Node* node);
+		void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);
+		void GetParameterValue(double* pvalue,double* gauss);
+		void GetParameterValue(double* pvalue,double* gauss,double defaultvalue);
+		
+		void GetParameterValues(double* values,double* gauss_pointers, int numgauss);
+	
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss);
+		void GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss);
+		void GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss);
+		/*}}}*/
+
+};
+#endif  /* _SINGVERTEXINPUT_H */
Index: /issm/trunk/src/c/objects/InputObjects/TriaVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/TriaVertexInput.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/TriaVertexInput.cpp	(revision 3673)
@@ -0,0 +1,168 @@
+/*!\file TriaVertexInput.c
+ * \brief: implementation of the TriaVertexInput object
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./TriaVertexInput.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+
+/*Object constructors and destructor*/
+/*FUNCTION TriaVertexInput::TriaVertexInput(){{{1*/
+TriaVertexInput::TriaVertexInput(){
+	return;
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::TriaVertexInput(double* values){{{1*/
+TriaVertexInput::TriaVertexInput(int in_enum_type,double* in_values){
+
+	enum_type=in_enum_type;
+	values[0]=in_values[0];
+	values[1]=in_values[1];
+	values[2]=in_values[2];
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::~TriaVertexInput(){{{1*/
+TriaVertexInput::~TriaVertexInput(){
+	return;
+}
+/*}}}*/
+
+/*Object management*/
+/*FUNCTION TriaVertexInput::copy{{{1*/
+Object* TriaVertexInput::copy() {
+	
+	return new TriaVertexInput(this->enum_type,this->values);
+
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::DeepEcho{{{1*/
+void TriaVertexInput::DeepEcho(void){
+
+	printf("TriaVertexInput:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %g|%g|%g\n",this->values[0],this->values[1],this->values[2]);
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::Demarshall{{{1*/
+void  TriaVertexInput::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::Echo {{{1*/
+void TriaVertexInput::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::Enum{{{1*/
+int TriaVertexInput::Enum(void){
+
+	return TriaVertexInputEnum;
+
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::EnumType{{{1*/
+int TriaVertexInput::EnumType(void){
+
+	return this->enum_type;
+
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::Id{{{1*/
+int    TriaVertexInput::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION TriaVertexInput::Marshall{{{1*/
+void  TriaVertexInput::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of TriaVertexInput: */
+	enum_value=TriaVertexInputEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall TriaVertexInput data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::MarshallSize{{{1*/
+int   TriaVertexInput::MarshallSize(){
+	
+	return sizeof(values)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION TriaVertexInput::MyRank{{{1*/
+int    TriaVertexInput::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+
+/*Object functions*/
+/*FUNCTION TriaVertexInput::GetParameterValue(bool* pvalue) {{{1*/
+void TriaVertexInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetParameterValue(int* pvalue){{{1*/
+void TriaVertexInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetParameterValue(double* pvalue){{{1*/
+void TriaVertexInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/
+void TriaVertexInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/
+void TriaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetParameterValue(double* pvalue,double* gauss){{{1*/
+void TriaVertexInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){{{1*/
+void TriaVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/
+void TriaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/
+void TriaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss){{{1*/
+void TriaVertexInput::GetStrainRate(double* epsilon,Input* yinput,double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
+/*FUNCTION TriaVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss){{{1*/
+void TriaVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput,Input* zinput, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
+/*}}}*/
Index: /issm/trunk/src/c/objects/InputObjects/TriaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/InputObjects/TriaVertexInput.h	(revision 3673)
+++ /issm/trunk/src/c/objects/InputObjects/TriaVertexInput.h	(revision 3673)
@@ -0,0 +1,58 @@
+/*! \file TriaVertexInput.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _TRIAVERTEXINPUT_H_
+#define _TRIAVERTEXINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+/*}}}*/
+
+class TriaVertexInput: public Input{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int    enum_type;
+		double values[3];
+
+	public:
+
+		/*constructors, destructors: {{{1*/
+		TriaVertexInput();
+		TriaVertexInput(int enum_type,double* values);
+		~TriaVertexInput();
+		/*}}}*/
+		/*object management: {{{1*/
+		void  DeepEcho();
+		void  Echo();
+		int   Id(); 
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		void  Demarshall(char** pmarshalled_dataset);
+		int   Enum();
+		int   MyRank();
+		Object* copy();
+		int   EnumType();
+
+		/*}}}*/
+		/*numerics: {{{1*/
+		void GetParameterValue(bool* pvalue);
+		void GetParameterValue(int* pvalue);
+		void GetParameterValue(double* pvalue);
+		void GetParameterValue(double* pvalue,Node* node);
+		void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord);
+		void GetParameterValue(double* pvalue,double* gauss);
+		void GetParameterValue(double* pvalue,double* gauss,double defaultvalue);
+		
+		void GetParameterValues(double* values,double* gauss_pointers, int numgauss);
+	
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss);
+		void GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss);
+		void GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss);
+		/*}}}*/
+
+};
+#endif  /* _TRIAVERTEXINPUT_H */
Index: sm/trunk/src/c/objects/IntInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/IntInput.cpp	(revision 3672)
+++ 	(revision )
@@ -1,140 +1,0 @@
-/*!\file IntInput.c
- * \brief: implementation of the IntInput object
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include "./IntInput.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "../include/typedefs.h"
-#include "../include/types.h"
-#include "../include/macros.h"
-
-/*Object constructors and destructor*/
-/*FUNCTION IntInput::IntInput(){{{1*/
-IntInput::IntInput(){
-	return;
-}
-/*}}}*/
-/*FUNCTION IntInput::IntInput(double* values){{{1*/
-IntInput::IntInput(int in_enum_type,IssmInt in_value){
-
-	enum_type=in_enum_type;
-	value=in_value;
-}
-/*}}}*/
-/*FUNCTION IntInput::~IntInput(){{{1*/
-IntInput::~IntInput(){
-	return;
-}
-/*}}}*/
-
-/*Object management*/
-/*FUNCTION IntInput::copy{{{1*/
-Object* IntInput::copy() {
-	
-	return new IntInput(this->enum_type,this->value);
-
-}
-/*}}}*/
-/*FUNCTION IntInput::DeepEcho{{{1*/
-void IntInput::DeepEcho(void){
-
-	printf("IntInput:\n");
-	printf("   enum: %i\n",this->enum_type);
-	printf("   %i\n",this->value);
-}
-/*}}}*/
-/*FUNCTION IntInput::Demarshall{{{1*/
-void  IntInput::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   i;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION IntInput::Echo {{{1*/
-void IntInput::Echo(void){
-	this->DeepEcho();
-}
-/*}}}*/
-/*FUNCTION IntInput::Enum{{{1*/
-int IntInput::Enum(void){
-
-	return IntInputEnum;
-
-}
-/*}}}*/
-/*FUNCTION IntInput::EnumType{{{1*/
-int IntInput::EnumType(void){
-
-	return this->enum_type;
-
-}
-/*}}}*/
-/*FUNCTION IntInput::GetId{{{1*/
-int    IntInput::GetId(void){ return -1; }
-/*}}}*/
-/*FUNCTION IntInput::GetName{{{1*/
-char* IntInput::GetName(void){
-	return "intinput";
-}
-/*}}}*/
-/*FUNCTION IntInput::Marshall{{{1*/
-void  IntInput::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of IntInput: */
-	enum_type=IntInputEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	/*marshall IntInput data: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
-
-	*pmarshalled_dataset=marshalled_dataset;
-}
-/*}}}*/
-/*FUNCTION IntInput::MarshallSize{{{1*/
-int   IntInput::MarshallSize(){
-	
-	return sizeof(value)+
-		sizeof(enum_type)+
-		+sizeof(int); //sizeof(int) for enum type
-}
-/*}}}*/
-/*FUNCTION IntInput::MyRank{{{1*/
-int    IntInput::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
-}
-/*}}}*/
-
-/*Object functions*/
-
Index: sm/trunk/src/c/objects/IntInput.h
===================================================================
--- /issm/trunk/src/c/objects/IntInput.h	(revision 3672)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*! \file IntInput.h 
- *  \brief: header file for triavertexinput object
- */
-
-
-#ifndef _INTINPUT_H_
-#define _INTINPUT_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Input.h"
-#include "../include/types.h"
-/*}}}*/
-
-class IntInput: public Input{
-
-	private: 
-		/*just hold 3 values for 3 vertices: */
-		int    enum_type;
-		IssmInt value;
-
-	public:
-
-		/*constructors, destructors: {{{1*/
-		IntInput();
-		IntInput(int enum_type,IssmInt value);
-		~IntInput();
-		/*}}}*/
-		/*object management: {{{1*/
-		void  DeepEcho();
-		void  Echo();
-		int   GetId(); 
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		char* GetName();
-		void  Demarshall(char** pmarshalled_dataset);
-		int   Enum();
-		int   MyRank();
-		Object* copy();
-		int   EnumType();
-
-		/*}}}*/
-		/*numerics: {{{1*/
-		/*}}}*/
-
-};
-#endif  /* _INTINPUT_H */
Index: /issm/trunk/src/c/objects/Load.h
===================================================================
--- /issm/trunk/src/c/objects/Load.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Load.h	(revision 3673)
@@ -25,9 +25,8 @@
 		virtual void  Echo()=0;
 		virtual void  DeepEcho()=0;
-		virtual int   GetId()=0;
+		virtual int   Id()=0;
 		virtual int   MyRank()=0;
 		virtual void  Marshall(char** pmarshalled_dataset)=0;
 		virtual int   MarshallSize()=0;
-		virtual char* GetName()=0;
 		virtual void  Demarshall(char** pmarshalled_dataset)=0;
 		virtual void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* vertices,DataSet* materials,Parameters* parameters)=0;
Index: /issm/trunk/src/c/objects/Material.h
===================================================================
--- /issm/trunk/src/c/objects/Material.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Material.h	(revision 3673)
@@ -20,9 +20,8 @@
 		virtual void  Echo()=0;
 		virtual void  DeepEcho()=0;
-		virtual int   GetId()=0;
+		virtual int   Id()=0;
 		virtual int   MyRank()=0;
 		virtual void  Marshall(char** pmarshalled_dataset)=0;
 		virtual int   MarshallSize()=0;
-		virtual char* GetName()=0;
 		virtual void  Demarshall(char** pmarshalled_dataset)=0;
 		virtual void  UpdateFromInputs(void* inputs)=0;
Index: /issm/trunk/src/c/objects/Matice.cpp
===================================================================
--- /issm/trunk/src/c/objects/Matice.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Matice.cpp	(revision 3673)
@@ -180,15 +180,10 @@
 }
 /*}}}*/
-/*FUNCTION Matice::GetId {{{1*/
-int    Matice::GetId(void){ return mid; }
+/*FUNCTION Matice::Id {{{1*/
+int    Matice::Id(void){ return mid; }
 /*}}}*/
 /*FUNCTION Matice::GetN {{{1*/
 double Matice::GetN(){
 	return n;
-}
-/*}}}*/
-/*FUNCTION Matice::GetName {{{1*/
-char* Matice::GetName(void){
-	return "matice";
 }
 /*}}}*/
Index: /issm/trunk/src/c/objects/Matice.h
===================================================================
--- /issm/trunk/src/c/objects/Matice.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Matice.h	(revision 3673)
@@ -32,8 +32,7 @@
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
-		char* GetName();
 		void  Demarshall(char** pmarshalled_dataset);
 		int   Enum();
-		int   GetId(); 
+		int   Id(); 
 		int   MyRank();
 		void  DistributeNumDofs(int* numdofspernode,int analysis_type);
Index: /issm/trunk/src/c/objects/Matpar.cpp
===================================================================
--- /issm/trunk/src/c/objects/Matpar.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Matpar.cpp	(revision 3673)
@@ -230,6 +230,6 @@
 }
 /*}}}1*/
-/*FUNCTION Matpar::GetId {{{1*/
-int    Matpar::GetId(void){ return mid; }
+/*FUNCTION Matpar::Id {{{1*/
+int    Matpar::Id(void){ return mid; }
 /*}}}1*/
 /*FUNCTION Matpar::GetLatentHeat {{{1*/
@@ -246,9 +246,4 @@
 double Matpar::GetMixedLayerCapacity(){
 	return mixed_layer_capacity;
-}
-/*}}}1*/
-/*FUNCTION Matpar::GetName {{{1*/
-char* Matpar::GetName(void){
-	return "matpar";
 }
 /*}}}1*/
Index: /issm/trunk/src/c/objects/Matpar.h
===================================================================
--- /issm/trunk/src/c/objects/Matpar.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Matpar.h	(revision 3673)
@@ -41,8 +41,7 @@
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
-		char* GetName();
 		void  Demarshall(char** pmarshalled_dataset);
 		int   Enum();
-		int   GetId(); 
+		int   Id(); 
 		int   MyRank();
 		void  DistributeNumDofs(int* numdofspernode,int analysis_type);
Index: /issm/trunk/src/c/objects/Model.cpp
===================================================================
--- /issm/trunk/src/c/objects/Model.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Model.cpp	(revision 3673)
@@ -3,8 +3,4 @@
  */
 
-#include "./objects.h"
-#include "../io/io.h"
-#include "../shared/shared.h"
-#include "../include/macros.h"
 #include "../issm.h"
 
@@ -16,4 +12,5 @@
 
 #include "./Model.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
 #include "stdio.h"
 
@@ -205,7 +202,7 @@
 }
 /*}}}1*/
-/*FUNCTION Model::FindParam(int* pparameter,char* parametername {{{1*/
-
-int   Model::FindParam(int* pparameter,char* parametername){
+/*FUNCTION Model::FindParam(int* pparameter,int enum_type {{{1*/
+
+int   Model::FindParam(int* pparameter,int enum_type){
 
 	FemModel* femmodel=NULL;
@@ -219,10 +216,10 @@
 	if(!femmodel)return 0;
 
-	femmodel->FindParam(pparameter,parametername);
-
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(double* pparameter,char* parametername ){{{1*/
-int   Model::FindParam(double* pparameter,char* parametername){
+	femmodel->FindParam(pparameter,enum_type);
+
+}
+/*}}}1*/
+/*FUNCTION Model::FindParam(double* pparameter,int enum_type ){{{1*/
+int   Model::FindParam(double* pparameter,int enum_type){
 	
 	FemModel* femmodel=NULL;
@@ -236,11 +233,11 @@
 	if(!femmodel)return 0;
 	
-	femmodel->FindParam(pparameter,parametername);
-
-
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(double** pparameter,int* pM, int *pN,char* parametername) {{{1*/
-int   Model::FindParam(double** pparameter,int* pM, int *pN,char* parametername){
+	femmodel->FindParam(pparameter,enum_type);
+
+
+}
+/*}}}1*/
+/*FUNCTION Model::FindParam(double** pparameter,int* pM, int *pN,int enum_type) {{{1*/
+int   Model::FindParam(double** pparameter,int* pM, int *pN,int enum_type){
 	
 	FemModel* femmodel=NULL;
@@ -254,11 +251,11 @@
 	if(!femmodel)return 0;
 	
-	femmodel->FindParam(pparameter,pM, pN,parametername);
-
-
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(char** pparameter,char* parametername) {{{1*/
-int   Model::FindParam(char** pparameter,char* parametername){
+	femmodel->FindParam(pparameter,pM, pN,enum_type);
+
+
+}
+/*}}}1*/
+/*FUNCTION Model::FindParam(char** pparameter,int enum_type) {{{1*/
+int   Model::FindParam(char** pparameter,int enum_type){
 	
 	FemModel* femmodel=NULL;
@@ -272,10 +269,10 @@
 	if(!femmodel)return 0;
 	
-	femmodel->FindParam(pparameter,parametername);
-
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(int* pparameter,char* parametername,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(int* pparameter,char* parametername,int analysis_type,int sub_analysis_type){
+	femmodel->FindParam(pparameter,enum_type);
+
+}
+/*}}}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){
 	
 	FemModel* femmodel=NULL;
@@ -287,9 +284,9 @@
 
 	/*extract our parameter from the found formulation: */
-	femmodel->FindParam(pparameter,parametername);
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(double* pparameter,char* parametername,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(double* pparameter,char* parametername,int analysis_type,int sub_analysis_type){
+	femmodel->FindParam(pparameter,enum_type);
+}
+/*}}}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){
 	
 	FemModel* femmodel=NULL;
@@ -301,9 +298,9 @@
 
 	/*extract our parameter from the found formulation: */
-	femmodel->FindParam(pparameter,parametername);
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(double** pparameter,int* pM, int* pN,char* parametername,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(double** pparameter,int* pM, int* pN,char* parametername,int analysis_type,int sub_analysis_type){
+	femmodel->FindParam(pparameter,enum_type);
+}
+/*}}}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){
 
 	FemModel* femmodel=NULL;
@@ -315,9 +312,9 @@
 
 	/*extract our parameter from the found formulation: */
-	femmodel->FindParam(pparameter,pM, pN,parametername);
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(char** pparameter,char* parametername,int analysis_type,int sub_analysis_type) {{{1*/
-int   Model::FindParam(char** pparameter,char* parametername,int analysis_type,int sub_analysis_type){
+	femmodel->FindParam(pparameter,pM, pN,enum_type);
+}
+/*}}}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){
 
 	FemModel* femmodel=NULL;
@@ -329,9 +326,9 @@
 
 	/*extract our parameter from the found formulation: */
-	femmodel->FindParam(pparameter,parametername);
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(int* pparameter,char* parametername,int analysis_type) {{{1*/
-int   Model::FindParam(int* pparameter,char* parametername,int analysis_type){
+	femmodel->FindParam(pparameter,enum_type);
+}
+/*}}}1*/
+/*FUNCTION Model::FindParam(int* pparameter,int enum_type,int analysis_type) {{{1*/
+int   Model::FindParam(int* pparameter,int enum_type,int analysis_type){
 	
 	FemModel* femmodel=NULL;
@@ -343,9 +340,9 @@
 
 	/*extract our parameter from the found formulation: */
-	femmodel->FindParam(pparameter,parametername);
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(double* pparameter,char* parametername,int analysis_type) {{{1*/
-int   Model::FindParam(double* pparameter,char* parametername,int analysis_type){
+	femmodel->FindParam(pparameter,enum_type);
+}
+/*}}}1*/
+/*FUNCTION Model::FindParam(double* pparameter,int enum_type,int analysis_type) {{{1*/
+int   Model::FindParam(double* pparameter,int enum_type,int analysis_type){
 	
 	FemModel* femmodel=NULL;
@@ -357,9 +354,9 @@
 
 	/*extract our parameter from the found formulation: */
-	femmodel->FindParam(pparameter,parametername);
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(double** pparameter,int* pM, int* pN,char* parametername,int analysis_type) {{{1*/
-int   Model::FindParam(double** pparameter,int* pM, int* pN,char* parametername,int analysis_type){
+	femmodel->FindParam(pparameter,enum_type);
+}
+/*}}}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){
 
 	FemModel* femmodel=NULL;
@@ -371,9 +368,9 @@
 
 	/*extract our parameter from the found formulation: */
-	femmodel->FindParam(pparameter,pM,pN,parametername);
-}
-/*}}}1*/
-/*FUNCTION Model::FindParam(char** pparameter,char* parametername,int analysis_type) {{{1*/
-int   Model::FindParam(char** pparameter,char* parametername,int analysis_type){
+	femmodel->FindParam(pparameter,pM,pN,enum_type);
+}
+/*}}}1*/
+/*FUNCTION Model::FindParam(char** pparameter,int enum_type,int analysis_type) {{{1*/
+int   Model::FindParam(char** pparameter,int enum_type,int analysis_type){
 
 	FemModel* femmodel=NULL;
@@ -385,5 +382,5 @@
 
 	/*extract our parameter from the found formulation: */
-	femmodel->FindParam(pparameter,parametername);
+	femmodel->FindParam(pparameter,enum_type);
 }	
 /*}}}1*/
@@ -407,6 +404,6 @@
 
 		femmodel=(FemModel*)femmodels->GetObjectByOffset(i);
-		femmodel->FindParam(&femmodel_analysis_type,"analysis_type");
-		femmodel->FindParam(&femmodel_sub_analysis_type,"sub_analysis_type");
+		femmodel->FindParam(&femmodel_analysis_type,AnalysisTypeEnum);
+		femmodel->FindParam(&femmodel_sub_analysis_type,SubAnalysisTypeEnum);
 
 		if((analysis_type==femmodel_analysis_type) && (sub_analysis_type==femmodel_sub_analysis_type)){
@@ -436,5 +433,5 @@
 
 		femmodel=(FemModel*)femmodels->GetObjectByOffset(i);
-		femmodel->FindParam(&femmodel_analysis_type,"analysis_type");
+		femmodel->FindParam(&femmodel_analysis_type,AnalysisTypeEnum);
 
 		if((analysis_type==femmodel_analysis_type)){
Index: /issm/trunk/src/c/objects/Model.h
===================================================================
--- /issm/trunk/src/c/objects/Model.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Model.h	(revision 3673)
@@ -35,18 +35,18 @@
 
 		/*all overloaded forms of the FindParam routine: */
-		int   FindParam(int* pparameter,char* parametername);
-		int   FindParam(double* pparameter,char* parametername);
-		int   FindParam(double** pparameter,int* pM,int* pN,char* parametername);
-		int   FindParam(char** pparameter,char* parametername);
+		int   FindParam(int* pparameter,int enum_type);
+		int   FindParam(double* pparameter,int enum_type);
+		int   FindParam(double** pparameter,int* pM,int* pN,int enum_type);
+		int   FindParam(char** pparameter,int enum_type);
 
-		int   FindParam(int* pparameter,char* parametername,int analysis_type,int sub_analysis_type);
-		int   FindParam(double* pparameter,char* parametername,int analysis_type,int sub_analysis_type);
-		int   FindParam(double** pparameter,int* pM, int* pN,char* parametername,int analysis_type,int sub_analysis_type);
-		int   FindParam(char** pparameter,char* parametername,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* 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   FindParam(int* pparameter,char* parametername,int analysis_type);
-		int   FindParam(double* pparameter,char* parametername,int analysis_type);
-		int   FindParam(double** pparameter,int* pM,int* pN,char* parametername,int analysis_type);
-		int   FindParam(char** pparameter,char* parametername,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* pN,int enum_type,int analysis_type);
+		int   FindParam(char** pparameter,int enum_type,int analysis_type);
 
 		FemModel* GetFormulation(int analysis_type,int sub_analysis_type);
Index: /issm/trunk/src/c/objects/Node.cpp
===================================================================
--- /issm/trunk/src/c/objects/Node.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Node.cpp	(revision 3673)
@@ -336,11 +336,6 @@
 }
 /*}}}*/
-/*FUNCTION Node::GetId{{{2*/
-int    Node::GetId(void){ return id; }
-/*}}}*/
-/*FUNCTION Node::GetName{{{2*/
-char* Node::GetName(void){
-	return "node";
-}
+/*FUNCTION Node::Id{{{2*/
+int    Node::Id(void){ return id; }
 /*}}}*/
 /*FUNCTION Node::GetVertexDof {{{2*/
Index: /issm/trunk/src/c/objects/Node.h
===================================================================
--- /issm/trunk/src/c/objects/Node.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Node.h	(revision 3673)
@@ -44,6 +44,5 @@
 		void  Echo();
 		int   Enum();
-		int   GetId(void); 
-		char* GetName();
+		int   Id(void); 
 		int   GetVertexDof(void);
 		void  Marshall(char** pmarshalled_dataset);
Index: /issm/trunk/src/c/objects/Numericalflux.cpp
===================================================================
--- /issm/trunk/src/c/objects/Numericalflux.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Numericalflux.cpp	(revision 3673)
@@ -37,5 +37,5 @@
 }
 /*}}}*/
-/*FUNCTION Numericalflux::Numericalflux(int id, Hook* hnodes, Hook* helements, DataSet* parameters, Inputs* numericalflux_inputs) {{{1*/
+/*FUNCTION Numericalflux::Numericalflux(int id, Hook* hnodes, Hook* helements, Parameters* parameters, Inputs* numericalflux_inputs) {{{1*/
 Numericalflux::Numericalflux(int numericalflux_id,Hook* numericalflux_hnodes, Hook* numericalflux_helements, Parameters* numericalflux_parameters, Inputs* numericalflux_inputs):
 	hnodes(numericalflux_hnodes),
@@ -352,5 +352,5 @@
 	/*recover parameters: */
 	if (analysis_type==Prognostic2AnalysisEnum){
-		parameters->FindParam(&dt,"dt");
+		parameters->FindParam(&dt,DtEnum);
 	}
 	else if (analysis_type==Balancedthickness2AnalysisEnum){
@@ -467,5 +467,5 @@
 	/*recover parameters: */
 	if (analysis_type==Prognostic2AnalysisEnum){
-		parameters->FindParam(&dt,"dt");
+		parameters->FindParam(&dt,DtEnum);
 	}
 	else if (analysis_type==Balancedthickness2AnalysisEnum){
@@ -612,5 +612,5 @@
 	/*recover parameters: */
 	if (analysis_type==Prognostic2AnalysisEnum){
-		parameters->FindParam(&dt,"dt");
+		parameters->FindParam(&dt,DtEnum);
 	}
 	else if (analysis_type==Balancedthickness2AnalysisEnum){
@@ -737,6 +737,6 @@
 }
 /*}}}*/
-/*FUNCTION Numericalflux::GetId {{{1*/
-int    Numericalflux::GetId(void){
+/*FUNCTION Numericalflux::Id {{{1*/
+int    Numericalflux::Id(void){
 	return id;
 }
@@ -778,9 +778,4 @@
 }
 /*}}}*/
-/*FUNCTION Numericalflux::GetName {{{1*/
-char* Numericalflux::GetName(void){
-	return "numericalflux";
-}
-/*}}}*/
 /*FUNCTION Numericalflux::GetNodalFunctions{{{1*/
 void Numericalflux::GetNodalFunctions(double* l1l4, double gauss_coord){
Index: /issm/trunk/src/c/objects/Numericalflux.h
===================================================================
--- /issm/trunk/src/c/objects/Numericalflux.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Numericalflux.h	(revision 3673)
@@ -38,6 +38,5 @@
 		void  Echo();
 		int   Enum();
-		int   GetId(); 
-		char* GetName();
+		int   Id(); 
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
Index: sm/trunk/src/c/objects/Numpar.cpp
===================================================================
--- /issm/trunk/src/c/objects/Numpar.cpp	(revision 3672)
+++ 	(revision )
@@ -1,258 +1,0 @@
-/*!\file Numpar.c
- * \brief: implementation of the Numpar object
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include "./Numpar.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "../include/typedefs.h"
-#include "../include/macros.h"
-
-/*Object constructors and destructor*/
-/*FUNCTION Numpar::constructor {{{1*/
-Numpar::Numpar(){
-	return;
-}
-/*}}}*/
-/*FUNCTION Numpar::creation {{{1*/
-Numpar::Numpar(int numpar_id){
-	id=numpar_id;
-
-	meanvel=UNDEF;
-	epsvel=UNDEF;
-	artdiff=UNDEF;
-	viscosity_overshoot=UNDEF;
-	stokesreconditioning=UNDEF;
-	control_type=NULL;
-	cm_noisedmp=UNDEF;
-	cm_mindmp_value=UNDEF;
-	cm_mindmp_slope=UNDEF;
-	cm_maxdmp_value=UNDEF;
-	cm_maxdmp_slope=UNDEF;
-	dt=UNDEF;
-
-	return;
-}
-/*}}}*/
-/*FUNCTION Numpar::destructor {{{1*/
-Numpar::~Numpar(){
-
-	/*Free the only pointer*/
-	//xfree((void**)&control_type);
-
-	return;
-}
-/*}}}*/
-
-/*Object marshall*/
-/*FUNCTION Numpar::Marshall {{{1*/
-void  Numpar::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of Numpar: */
-	enum_type=NumparEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	/*marshall Numpar data: */
-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
-	memcpy(marshalled_dataset,&meanvel,sizeof(meanvel));marshalled_dataset+=sizeof(meanvel);
-	memcpy(marshalled_dataset,&epsvel,sizeof(epsvel));marshalled_dataset+=sizeof(epsvel);
-	memcpy(marshalled_dataset,&artdiff,sizeof(artdiff));marshalled_dataset+=sizeof(artdiff);
-	memcpy(marshalled_dataset,&viscosity_overshoot,sizeof(viscosity_overshoot));marshalled_dataset+=sizeof(viscosity_overshoot);
-	memcpy(marshalled_dataset,&stokesreconditioning,sizeof(stokesreconditioning));marshalled_dataset+=sizeof(stokesreconditioning);
-	memcpy(marshalled_dataset,&control_type,sizeof(control_type));marshalled_dataset+=sizeof(control_type);
-	memcpy(marshalled_dataset,&cm_noisedmp,sizeof(cm_noisedmp));marshalled_dataset+=sizeof(cm_noisedmp);
-	memcpy(marshalled_dataset,&cm_mindmp_value,sizeof(cm_mindmp_value));marshalled_dataset+=sizeof(cm_mindmp_value);
-	memcpy(marshalled_dataset,&cm_mindmp_slope,sizeof(cm_mindmp_slope));marshalled_dataset+=sizeof(cm_mindmp_slope);
-	memcpy(marshalled_dataset,&cm_maxdmp_value,sizeof(cm_maxdmp_value));marshalled_dataset+=sizeof(cm_maxdmp_value);
-	memcpy(marshalled_dataset,&cm_maxdmp_slope,sizeof(cm_maxdmp_slope));marshalled_dataset+=sizeof(cm_maxdmp_slope);
-	memcpy(marshalled_dataset,&dt,sizeof(dt));marshalled_dataset+=sizeof(dt);
-	
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION Numpar::MarshallSize{{{1*/
-int   Numpar::MarshallSize(){
-	return sizeof(id)
-		+sizeof(meanvel)
-		+sizeof(epsvel)
-		+sizeof(artdiff)
-		+sizeof(viscosity_overshoot)
-		+sizeof(stokesreconditioning)
-		+sizeof(control_type)
-		+sizeof(cm_noisedmp)
-		+sizeof(cm_mindmp_value)
-		+sizeof(cm_mindmp_slope)
-		+sizeof(cm_maxdmp_value)
-		+sizeof(cm_maxdmp_slope)
-		+sizeof(dt)
-		+sizeof(int); //sizeof(int) for enum type
-}
-/*}}}*/
-/*FUNCTION Numpar::Demarshall {{{1*/
-void  Numpar::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   i;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-
-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
-	memcpy(&meanvel,marshalled_dataset,sizeof(meanvel));marshalled_dataset+=sizeof(meanvel);
-	memcpy(&epsvel,marshalled_dataset,sizeof(epsvel));marshalled_dataset+=sizeof(epsvel);
-	memcpy(&artdiff,marshalled_dataset,sizeof(artdiff));marshalled_dataset+=sizeof(artdiff);
-	memcpy(&viscosity_overshoot,marshalled_dataset,sizeof(viscosity_overshoot));marshalled_dataset+=sizeof(viscosity_overshoot);
-	memcpy(&stokesreconditioning,marshalled_dataset,sizeof(stokesreconditioning));marshalled_dataset+=sizeof(stokesreconditioning);
-	memcpy(&control_type,marshalled_dataset,sizeof(control_type));marshalled_dataset+=sizeof(control_type);
-	memcpy(&cm_noisedmp,marshalled_dataset,sizeof(cm_noisedmp));marshalled_dataset+=sizeof(cm_noisedmp);
-	memcpy(&cm_mindmp_value,marshalled_dataset,sizeof(cm_mindmp_value));marshalled_dataset+=sizeof(cm_mindmp_value);
-	memcpy(&cm_mindmp_slope,marshalled_dataset,sizeof(cm_mindmp_slope));marshalled_dataset+=sizeof(cm_mindmp_slope);
-	memcpy(&cm_maxdmp_value,marshalled_dataset,sizeof(cm_maxdmp_value));marshalled_dataset+=sizeof(cm_maxdmp_value);
-	memcpy(&cm_maxdmp_slope,marshalled_dataset,sizeof(cm_maxdmp_slope));marshalled_dataset+=sizeof(cm_maxdmp_slope);
-	memcpy(&dt,marshalled_dataset,sizeof(dt));marshalled_dataset+=sizeof(dt);
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-
-/*Object functions*/
-/*FUNCTION Numpar::Configure {{{1*/
-void  Numpar::Configure(void* pparametersin){
-
-	DataSet* parameters=NULL;
-
-	/*Recover virtual pointer:*/
-	parameters=(DataSet*)pparametersin;
-
-	/*Go through parameters dataset, and find the Param object corresponding to our fields, 
-	 * and update the fields: */
-	parameters->FindParam(&meanvel,"meanvel");
-	parameters->FindParam(&epsvel,"epsvel");
-	if(!parameters->FindParam(&artdiff,"artdiff"))ISSMERROR(" error message: could not update artdiff field");
-	if(!parameters->FindParam(&viscosity_overshoot,"viscosity_overshoot"))ISSMERROR(" error message: could not update viscosity_overshoot field");
-	if(!parameters->FindParam(&stokesreconditioning,"stokesreconditioning"))ISSMERROR(" error message: could not update stokesreconditioning field");
-	xfree((void**)&control_type); 
-	parameters->FindParam(&control_type,"control_type");
-	parameters->FindParam(&cm_noisedmp,"cm_noisedmp");
-	parameters->FindParam(&cm_mindmp_value,"cm_mindmp_value");
-	parameters->FindParam(&cm_mindmp_slope,"cm_mindmp_slope");
-	parameters->FindParam(&cm_maxdmp_value,"cm_maxdmp_value");
-	parameters->FindParam(&cm_maxdmp_slope,"cm_maxdmp_slope");
-	parameters->FindParam(&dt,"dt");
-
-	return;
-}
-/*}}}*/
-/*FUNCTION Numpar::copy {{{1*/
-Object* Numpar::copy() {
-	
-	return new Numpar(*this); 
-
-}
-/*}}}*/
-/*FUNCTION Numpar::DeepEcho {{{1*/
-void Numpar::DeepEcho(void){
-
-	printf("Numpar:\n");
-	printf("   id: %i\n",id);
-	printf("   meanvel: %g\n",meanvel);
-	printf("   epsvel: %g\n",epsvel);
-	printf("   artdiff: %i\n",artdiff);
-	printf("   viscosity_overshoot: %g\n",viscosity_overshoot);
-	printf("   stokesreconditioning: %g\n",stokesreconditioning);
-	printf("   control_type: %s\n",control_type);
-	printf("   cm_noisedmp: %g\n",cm_noisedmp);
-	printf("   cm_mindmp_value: %g\n",cm_mindmp_value);
-	printf("   cm_mindmp_slope: %g\n",cm_mindmp_slope);
-	printf("   cm_maxdmp_value: %g\n",cm_maxdmp_value);
-	printf("   cm_maxdmp_slope: %g\n",cm_maxdmp_slope);
-	printf("   dt: %g\n",dt);
-}
-/*}}}*/
-/*FUNCTION Numpar::Echo{{{1*/
-void Numpar::Echo(void){
-
-	printf("Numpar:\n");
-	printf("   id: %i\n",id);
-	printf("   meanvel: %g\n",meanvel);
-	printf("   epsvel: %g\n",epsvel);
-	printf("   artdiff: %i\n",artdiff);
-	printf("   viscosity_overshoot: %g\n",viscosity_overshoot);
-	printf("   stokesreconditioning: %g\n",stokesreconditioning);
-	printf("   control_type: %s\n",control_type);
-	printf("   cm_noisedmp: %g\n",cm_noisedmp);
-	printf("   cm_mindmp_value: %g\n",cm_mindmp_value);
-	printf("   cm_mindmp_slope: %g\n",cm_mindmp_slope);
-	printf("   cm_maxdmp_value: %g\n",cm_maxdmp_value);
-	printf("   cm_maxdmp_slope: %g\n",cm_maxdmp_slope);
-	printf("   dt: %g\n",dt);
-}
-/*}}}*/
-/*FUNCTION Numpar::Enum {{{1*/
-int Numpar::Enum(void){
-
-	return NumparEnum;
-
-}
-/*}}}*/
-/*FUNCTION Numpar::GetId {{{1*/
-int    Numpar::GetId(void){ return id; }
-/*}}}*/
-/*FUNCTION Numpar::GetName {{{1*/
-char* Numpar::GetName(void){
-	return "beam";
-}
-/*}}}*/
-/*FUNCTION Numpar::MyRank {{{1*/
-int    Numpar::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
-}
-/*}}}*/
-/*FUNCTION Numpar::UpdateFromInputs {{{1*/
-void  Numpar::UpdateFromInputs(void* vinputs){
-
-	ParameterInputs* inputs=NULL;
-
-	/*recover pointers: */
-	inputs=(ParameterInputs*)vinputs;
-
-	/*Update internal data if inputs holds new values: */
-	inputs->Recover("meanvel",&meanvel);
-	inputs->Recover("epsvel",&epsvel);
-	inputs->Recover("artdiff",&artdiff);
-	inputs->Recover("viscosity_overshoot",&viscosity_overshoot);
-	inputs->Recover("stokesreconditioning",&stokesreconditioning);
-	inputs->Recover("control_type",&control_type);
-	inputs->Recover("cm_noisedmp",&cm_noisedmp);
-	inputs->Recover("cm_mindmp_value",&cm_mindmp_value);
-	inputs->Recover("cm_mindmp_slope",&cm_mindmp_slope);
-	inputs->Recover("cm_maxdmp_value",&cm_maxdmp_value);
-	inputs->Recover("cm_maxdmp_slope",&cm_maxdmp_slope);
-	inputs->Recover("dt",&dt);
-
-}
-/*}}}*/
Index: sm/trunk/src/c/objects/Numpar.h
===================================================================
--- /issm/trunk/src/c/objects/Numpar.h	(revision 3672)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*! \file Numpar.h 
- *  \brief: header file for numpar object
- */
-
-#ifndef _NUMPAR_H_
-#define _NUMPAR_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Object.h"
-/*}}}*/
-
-class Numpar: public Object{
-
-	private: 
-		int    id;
-	
-	public:
-
-		/*parameters are made public, as they will be accessed quite often: */
-		double meanvel;
-		double epsvel;
-		int    artdiff;
-		double viscosity_overshoot;
-		double stokesreconditioning;
-		char*  control_type;
-		double cm_noisedmp;
-		double cm_mindmp_value;
-		double cm_mindmp_slope;
-		double cm_maxdmp_value;
-		double cm_maxdmp_slope;
-		double dt;
-
-		Numpar();
-		Numpar(int id);
-		~Numpar();
-
-		/*object derived functionality: */
-		void  Echo();
-		void  DeepEcho();
-		int   GetId(); 
-		int   MyRank();
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		char* GetName();
-		void  Demarshall(char** pmarshalled_dataset);
-		int   Enum();
-		Object* copy();
-
-		void  Configure(void* pparametersin);
-		void  UpdateFromInputs(void* vinputs);
-};
-#endif  /* _NUMPAR_H */
Index: /issm/trunk/src/c/objects/Object.h
===================================================================
--- /issm/trunk/src/c/objects/Object.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Object.h	(revision 3673)
@@ -18,9 +18,8 @@
 		virtual void  Echo()=0;
 		virtual void  DeepEcho()=0;
-		virtual int   GetId()=0;
+		virtual int   Id()=0;
 		virtual int   MyRank()=0;
 		virtual void  Marshall(char** pmarshalled_dataset)=0;
 		virtual int   MarshallSize()=0;
-		virtual char* GetName()=0;
 		virtual void  Demarshall(char** pmarshalled_dataset)=0;
 		virtual int   Enum()=0;
Index: sm/trunk/src/c/objects/Param.cpp
===================================================================
--- /issm/trunk/src/c/objects/Param.cpp	(revision 3672)
+++ 	(revision )
@@ -1,725 +1,0 @@
-/*!\file Param.c
- * \brief: implementation of the Param object
- */
-
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../include/macros.h"
-#include "../shared/shared.h"
-#include "./objects.h"
-
-		
-/*Object constructors and destructor*/
-/*FUNCTION Param::constructor {{{1*/
-Param::Param(int param_id, char* param_name, int param_type){
-
-	id=param_id;
-	strcpy(name,param_name);
-	type=param_type;
-	if ((param_type!=STRING) & (param_type!=STRINGARRAY) & (param_type!=INTEGER) & (param_type!=DOUBLE) & 
-		(param_type!=DOUBLEVEC) & (param_type!=DOUBLEMAT) & (param_type!=PETSCVEC) & (param_type!=PETSCMAT) 
-		){
-		ISSMERROR("%s%i"," unknow parameter type ",param_type);
-	}
-	stringarray=NULL;
-	doublevec=NULL;
-	doublemat=NULL;
-	vec=NULL;
-	mat=NULL;
-
-}
-/*}}}*/
-/*FUNCTION Param::creation{{{1*/
-Param::Param(){
-	stringarray=NULL;
-	doublevec=NULL;
-	doublemat=NULL;
-	vec=NULL;
-	mat=NULL;
-
-	return;
-}
-/*}}}*/
-/*FUNCTION Param::destructor {{{1*/
-Param::~Param(){
-	
-	int i;
-
-	switch(type){
-	
-		case STRING:
-			break;
-
-		case STRINGARRAY:
-			for(i=0;i<M;i++){
-				char* descriptor=stringarray[i];
-				xfree((void**)&descriptor);
-			}
-			xfree((void**)&stringarray);
-
-			break;
-	
-		case INTEGER:
-			break;
-
-	
-		case DOUBLE:
-			break;
-		
-		case DOUBLEVEC:
-			xfree((void**)&doublevec);
-			break;
-	
-		case DOUBLEMAT:
-			xfree((void**)&doublemat);
-			break;
-
-		case PETSCVEC:
-			VecFree(&vec);
-			break;
-
-		case  PETSCMAT:
-			MatFree(&mat);
-			break;
-
-		default:
-			ISSMERROR("%s%i","unknow parameter type ",type);
-	}
-}
-/*}}}*/
-
-/*Object marshall*/
-/*FUNCTION Param::Demarshall {{{1*/
-void  Param::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	double* serial_vec=NULL;
-	double* serial_mat=NULL;
-	int* idxm=NULL;
-	int* idxn=NULL; 
-	int i;
-	double sparsity=.001;
-	char* tempstring=NULL;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-
-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
-	memcpy(&name,marshalled_dataset,sizeof(name));marshalled_dataset+=sizeof(name);
-	memcpy(&type,marshalled_dataset,sizeof(type));marshalled_dataset+=sizeof(type);
-	memcpy(&ndof,marshalled_dataset,sizeof(ndof));marshalled_dataset+=sizeof(ndof);
-
-	switch(type){
-
-		case STRING:
-			memcpy(&string,marshalled_dataset,sizeof(string));marshalled_dataset+=sizeof(string);
-			break;
-		
-		case STRINGARRAY:
-			memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
-			if(M){
-				stringarray=(char**)xmalloc(M*sizeof(char*));
-				for(i=0;i<M;i++){
-					int size;
-					memcpy(&size,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
-					tempstring=(char*)xmalloc(size);
-					memcpy(tempstring,marshalled_dataset,size);marshalled_dataset+=size;
-					stringarray[i]=tempstring;
-				}
-			}
-			break;
-
-		case DOUBLE:
-			memcpy(&ddouble,marshalled_dataset,sizeof(ddouble));marshalled_dataset+=sizeof(ddouble);
-			break;
-
-		case DOUBLEVEC:
-	
-			memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
-			if(M){
-				doublevec=(double*)xmalloc(M*sizeof(double));
-				memcpy(doublevec,marshalled_dataset,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));
-			}
-			break;
-
-		case DOUBLEMAT:
-			memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
-			memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);
-			if(M*N){
-				doublemat=(double*)xmalloc(M*N*sizeof(double));
-				memcpy(doublemat,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=(M*N*sizeof(double));
-			}
-			break;
-
-		case PETSCVEC:
-			memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
-			if(M){
-				serial_vec=(double*)xmalloc(M*sizeof(double));
-				memcpy(serial_vec,marshalled_dataset,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));
-
-				vec=NewVec(M);
-				idxm=(int*)xmalloc(M*sizeof(int));
-				for(i=0;i<M;i++)idxm[i]=i;
-				VecSetValues(vec,M,idxm,serial_vec,INSERT_VALUES);
-
-				VecAssemblyBegin(vec);
-				VecAssemblyEnd(vec);
-				
-				xfree((void**)&serial_vec);
-				xfree((void**)&idxm);
-			}
-			else{
-				vec=NULL;
-			}
-			break;
-
-		case PETSCMAT:
-			memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
-			memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);
-			if(M!=0 && N!=0){
-				serial_mat=(double*)xmalloc(M*N*sizeof(double));
-				memcpy(serial_mat,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=(M*N*sizeof(double));
-				mat=NewMat(M,N,&sparsity,NULL,NULL);
-				idxm=(int*)xmalloc(M*sizeof(int));
-				idxn=(int*)xmalloc(N*sizeof(int));
-				for(i=0;i<M;i++)idxm[i]=i;
-				for(i=0;i<N;i++)idxn[i]=i;
-				MatSetValues(mat,M,idxm,N,idxn,serial_mat,INSERT_VALUES); 
-				MatAssemblyBegin(mat,MAT_FINAL_ASSEMBLY); 
-				MatAssemblyEnd(mat,MAT_FINAL_ASSEMBLY);
-
-				xfree((void**)&serial_mat);
-				xfree((void**)&idxm);
-				xfree((void**)&idxn);
-			}
-			else{
-				mat=NULL;
-			}
-			break;
-
-		default:
-			ISSMERROR("%s%i","unknown parameter type",type);
-	}
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION Param::Marshall {{{1*/
-
-void  Param::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-	double* serial_vec=NULL; 
-	double* serial_mat=NULL;
-	int i;
-	char* tempstring=NULL;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of Param: */
-	enum_type=ParamEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	/*marshall Param data: */
-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
-	memcpy(marshalled_dataset,&name,sizeof(name));marshalled_dataset+=sizeof(name);
-	memcpy(marshalled_dataset,&type,sizeof(type));marshalled_dataset+=sizeof(type);
-	memcpy(marshalled_dataset,&ndof,sizeof(ndof));marshalled_dataset+=sizeof(ndof);
-
-	switch(type){
-		case STRING:
-			memcpy(marshalled_dataset,&string,sizeof(string));marshalled_dataset+=sizeof(string);
-			break;
-
-		case STRINGARRAY:
-			memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
-			for(i=0;i<M;i++){
-				tempstring=stringarray[i];
-				int size=(strlen(tempstring)+1)*sizeof(char);
-				memcpy(marshalled_dataset,&size,sizeof(size));marshalled_dataset+=sizeof(size);
-				memcpy(marshalled_dataset,tempstring,size);marshalled_dataset+=size;
-			}
-			break;
-
-		case DOUBLE:
-			memcpy(marshalled_dataset,&ddouble,sizeof(ddouble));marshalled_dataset+=sizeof(ddouble);
-			break;
-		case DOUBLEVEC:
-			memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
-			if(M){
-				memcpy(marshalled_dataset,doublevec,M*sizeof(double));
-				marshalled_dataset+=(M*sizeof(double));
-			}
-			break;
-
-		case DOUBLEMAT:
-			memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
-			memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
-			if(M*N){
-				memcpy(marshalled_dataset,doublemat,M*N*sizeof(double));
-				marshalled_dataset+=(M*N*sizeof(double));
-			}
-			break;
-
-		case PETSCVEC:
-			if(vec){
-				VecGetSize(vec,&M);
-				VecToMPISerial(&serial_vec,vec);
-				memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
-				memcpy(marshalled_dataset,serial_vec,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));
-				xfree((void**)&serial_vec);
-			}
-			else{
-				M=0;
-				memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
-			}
-			break;
-
-		case PETSCMAT:
-			if(mat){
-				MatGetSize(mat,&M,&N);
-				MatToSerial(&serial_mat,mat);
-				memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
-				memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
-				memcpy(marshalled_dataset,serial_mat,M*N*sizeof(double));marshalled_dataset+=(M*N*sizeof(double));
-				xfree((void**)&serial_mat);
-			}
-			else{
-				M=0;
-				N=0;
-				memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
-				memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
-			}
-			break;
-		
-		default:
-			ISSMERROR("%s%i","unknown parameter type",type);
-			break;
-	}
-
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION Param::MarshallSize {{{1*/
-int   Param::MarshallSize(){
-
-	int size;
-	int i;
-	char* tempstring=NULL;
-
-	size=sizeof(id)+
-		sizeof(name)+
-		sizeof(type)+
-		sizeof(ndof)+
-		sizeof(int); //sizeof(int) for enum type
-
-	switch(type){
-		case STRING:
-			size+=sizeof(string);
-			break;
-
-		case STRINGARRAY:
-			size+=sizeof(M);
-			for(i=0;i<M;i++){
-				tempstring=stringarray[i];
-				size+=sizeof(M);
-				size+=(strlen(tempstring)+1)*sizeof(char);
-			}
-			break;
-
-		case DOUBLE:
-			size+= sizeof(ddouble);
-			break;
-		case DOUBLEVEC:
-			size+= sizeof(M)+M*sizeof(double);
-			break;
-
-		case DOUBLEMAT:
-			size+= sizeof(M)+sizeof(N)+M*N*sizeof(double);
-			break;
-
-		case PETSCVEC:
-			size+= sizeof(M)+M*sizeof(double);
-			break;
-
-		case PETSCMAT:
-			size+= sizeof(M)+sizeof(N)+M*N*sizeof(double);
-			break;
-
-		default:
-			ISSMERROR("%s%i","unknown parameter type",type);
-	}
-
-	return size;
-}
-/*}}}*/
-
-/*Object functions*/
-/*FUNCTION Param::copy {{{1*/
-Object* Param::copy() {
-	return new Param(*this); 
-}
-/*}}}*/
-/*FUNCTION Param::Echo {{{1*/
-void Param::Echo(void){
-
-	int i,j;
-	
-	printf("Param:\n");
-	printf("   id: %i\n",id);
-	printf("   name: %s\n",name);
-	
-	switch(type){
-		case STRING:
-			printf("   string value: %s\n",string);
-			break;
-			
-		case  STRINGARRAY:
-			printf("   string array: %i strings\n",M);
-			for(i=0;i<M;i++){
-				printf("      %i: %s\n",i,stringarray[i]);
-			}
-			break;
-	
-		case DOUBLE:
-			printf("   double value: %g\n",ddouble);
-			break;
-		
-		case DOUBLEVEC:
-			/*printf("   double vector. size: %i ndof: %i\n",M,ndof);
-			for(i=0;i<M;i++)printf("%g\n",doublevec[i]);*/
-			break;
-	
-		case DOUBLEMAT:
-			printf("   double matrix. size: %i,%i\n",M,N);
-			for(i=0;i<M;i++){
-				for(j=0;j<N;j++){
-					printf("%g ",*(doublemat+N*i+j));
-				}
-				printf("\n");
-			}
-			break;
-
-		case PETSCVEC:
-			/*printf("   Petsc vector: \n");
-			VecView(vec,PETSC_VIEWER_STDOUT_WORLD);*/
-			break;
-
-		case  PETSCMAT:
-			/*printf("   Petsc matrix: \n");
-			MatView(mat,PETSC_VIEWER_STDOUT_WORLD);*/
-			break;
-
-		default:
-			ISSMERROR("%s%i","unknow parameter type ",type);
-	}
-}
-/*}}}*/
-/*FUNCTION Param::Enum {{{1*/
-int Param::Enum(void){
-
-	return ParamEnum;
-}
-/*}}}*/
-/*FUNCTION Param::DeepEcho {{{1*/
-void Param::DeepEcho(void){
-
-	int i,j;
-	
-	printf("Param:\n");
-	printf("   id: %i\n",id);
-	printf("   name: %s\n",name);
-	
-	switch(type){
-		case STRING:
-			printf("   string value: %s\n",string);
-			break;
-			
-		case  STRINGARRAY:
-			printf("   string array: %i strings\n",M);
-			for(i=0;i<M;i++){
-				printf("      %i: %s\n",i,stringarray[i]);
-			}
-	
-		case DOUBLE:
-			printf("   double value: %g\n",ddouble);
-			break;
-		
-		case DOUBLEVEC:
-			printf("   double vector. size: %i ndof: %i\n",M,ndof);
-			for(i=0;i<M;i++)printf("%g\n",doublevec[i]);
-			break;
-	
-		case DOUBLEMAT:
-			printf("   double matrix. size: %i,%i\n",M,N);
-			for(i=0;i<M;i++){
-				for(j=0;j<N;j++){
-					printf("%g ",*(doublemat+N*i+j));
-				}
-				printf("\n");
-			}
-			break;
-
-		case PETSCVEC:
-			printf("   Petsc vector: \n");
-			VecView(vec,PETSC_VIEWER_STDOUT_WORLD);
-			break;
-
-		case  PETSCMAT:
-			printf("   Petsc matrix: \n");
-			MatView(mat,PETSC_VIEWER_STDOUT_WORLD);
-			break;
-
-		default:
-			ISSMERROR("%s%i","unknow parameter type ",type);
-	}
-}	
-/*}}}*/
-/*FUNCTION Param::DistributeNumDofs {{{1*/
-void  Param::DistributeNumDofs(int* numdofspernode,int analysis_type){return;}
-/*}}}*/
-/*FUNCTION Param::GetM {{{1*/
-int   Param::GetM(){
-	return M;
-}
-/*}}}*/
-/*FUNCTION Param::GetN {{{1*/
-int   Param::GetN(){
-	return N;
-}
-/*}}}*/
-/*FUNCTION Param::GetNdof {{{1*/
-int   Param::GetNdof(){
-	return ndof;
-}
-/*}}}*/
-/*FUNCTION Param::GetParameterValue(Mat* pmat) {{{1*/
-
-void  Param::GetParameterValue(Mat* pmat){
-	
-	Mat  outmat=NULL;
-	
-	if(type!=PETSCMAT)  ISSMERROR("%s%i"," error message: trying to recover a Petsc mat from a param with type",type);
-	
-	if(mat){
-		MatDuplicate(mat,MAT_COPY_VALUES,&outmat);
-	}
-	*pmat=outmat;
-}
-/*}}}*/
-/*FUNCTION Param::GetName {{{1*/
-char* Param::GetName(void){
-	return "param";
-}
-/*}}}*/
-/*FUNCTION Param::GetParameterName {{{1*/
-char* Param::GetParameterName(void){ 
-	return name; 
-}
-/*}}}*/
-/*FUNCTION Param::GetParameterValue(double* pdouble) {{{1*/
-void  Param::GetParameterValue(double* pdouble){
-
-	if(type!=DOUBLE)ISSMERROR("%s%i"," error message: trying to recover a double from a param with type",type);
-	*pdouble=ddouble;
-}
-/*}}}*/
-/*FUNCTION Param::GetParameterValue(int* pinteger) {{{1*/
-void  Param::GetParameterValue(int* pinteger){
-	
-	if(type!=DOUBLE)ISSMERROR("%s%i"," error message: trying to recover an integer from a param with type",type);
-	*pinteger=(int)ddouble;
-}
-/*}}}*/
-/*FUNCTION Param::GetParameterValue(char** pstring) {{{1*/
-void  Param::GetParameterValue(char** pstring){
-	
-	char*  outstring=NULL;
-	
-	if(type!=STRING)ISSMERROR("%s%i"," error message: trying to recover a string from a param with type",type);
-	outstring=(char*)xmalloc((strlen(string)+1)*sizeof(char));
-	strcpy(outstring,string);
-	*pstring=outstring;
-
-}
-/*}}}*/
-/*FUNCTION Param::GetParameterValue(char*** pstringarray) {{{1*/
-void  Param::GetParameterValue(char*** pstringarray){
-
-	int i;
-	if(type!=STRINGARRAY)ISSMERROR("%s%i"," error message: trying to recover a string array from a param with type",type);
-
-	char**  outstringarray=NULL;
-	outstringarray=(char**)xmalloc(M*sizeof(char*));
-	for(i=0;i<M;i++){
-		char* outstring=(char*)xmalloc((strlen(stringarray[i])+1)*sizeof(char));
-		strcpy(outstring,stringarray[i]);
-		outstringarray[i]=outstring;
-	}
-	*pstringarray=outstringarray;
-}
-/*}}}*/
-/*FUNCTION Param::GetParameterValue(double** pdoublearray) {{{1*/
-	
-void  Param::GetParameterValue(double** pdoublearray){
-	
-
-	double* outdoublearray=NULL;
-	
-	if((type!=DOUBLEVEC) & (type!=DOUBLEMAT)) ISSMERROR("%s%i"," error message: trying to recover a double array from a param with type",type);
-	
-	if(type==DOUBLEVEC){
-
-		if(M){
-			outdoublearray=(double*)xmalloc(M*sizeof(double));
-			memcpy(outdoublearray,doublevec,M*sizeof(double));
-		}
-	}
-	
-	if(type==DOUBLEMAT){
-	
-		if(M*N){
-			outdoublearray=(double*)xmalloc(M*N*sizeof(double));
-			memcpy(outdoublearray,doublemat,M*N*sizeof(double));
-		}
-	}
-
-	*pdoublearray=outdoublearray;
-}
-/*}}}*/
-/*FUNCTION Param::GetParameterValue(Vec* pvec) {{{1*/
-void  Param::GetParameterValue(Vec* pvec){
-	
-	Vec  outvec=NULL;
-	
-	if(type!=PETSCVEC)  ISSMERROR("%s%i"," error message: trying to recover a Petsc vec from a param with type",type);
-
-	if(vec){
-		VecDuplicate(vec,&outvec);
-		VecCopy(vec,outvec);
-	}
-	*pvec=outvec;
-}
-/*}}}*/
-/*FUNCTION Param::GetId {{{1*/
-int    Param::GetId(void){ return id; }
-/*}}}*/
-/*FUNCTION Param::GetType {{{1*/
-int   Param::GetType(){
-	return type;
-}
-/*}}}*/
-/*FUNCTION Param::MyRank {{{1*/
-int    Param::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
-}
-/*}}}*/
-/*FUNCTION Param::SetDouble(double value) {{{1*/
-void  Param::SetDouble(double value){
-	if (type!=DOUBLE) ISSMERROR("%s%i"," trying to set double for type",type);
-	ddouble=value;
-}
-/*}}}*/
-/*FUNCTION Param::SetDouble(int value) {{{1*/
-void  Param::SetDouble(int value){
-	if (type!=DOUBLE) ISSMERROR("%s%i"," trying to set double for type",type);
-	ddouble=(double)value;
-}
-/*}}}*/
-/*FUNCTION Param::SetDoubleMat {{{1*/
-void  Param::SetDoubleMat(double* value,int pM,int pN){
-	
-	if (type!=DOUBLEMAT) ISSMERROR("%s%i"," trying to set doublematrix type",type);
-
-	this->M=pM;
-	this->N=pN;
-	if(this->M*this->N){
-		xfree((void**)&doublemat); doublemat=(double*)xcalloc(M*N,sizeof(double));
-		memcpy(doublemat,value,M*N*sizeof(double));
-	}
-}
-/*}}}*/
-/*FUNCTION Param::SetDoubleVec(double* value,int size) {{{1*/
-void  Param::SetDoubleVec(double* value,int size){
-	if (type!=DOUBLEVEC) ISSMERROR("%s%i"," trying to set doublevecfor type",type);
-	
-	M=size;
-	if(M){
-		xfree((void**)&doublevec); doublevec=(double*)xmalloc(M*sizeof(double));
-		memcpy(doublevec,value,M*sizeof(double));
-	}
-	else{
-		xfree((void**)&doublevec); doublevec=NULL;
-	}
-	ndof=0; //this vector will not be repartitioned.
-
-}
-/*}}}*/
-/*FUNCTION Param::SetDoubleVec(double* value,int size, int numberofdofs) {{{1*/
-void  Param::SetDoubleVec(double* value,int size, int numberofdofs){
-	if (type!=DOUBLEVEC) ISSMERROR("%s%i"," trying to set doublevecfor type",type);
-	
-	M=size;
-	if(M){
-		xfree((void**)&doublevec); doublevec=(double*)xmalloc(M*sizeof(double));
-		memcpy(doublevec,value,M*sizeof(double));
-	}
-	ndof=numberofdofs;
-}
-/*}}}*/
-/*FUNCTION Param::SetString {{{1*/
-void  Param::SetString(char* value){
-	if (type!=STRING) ISSMERROR("%s%i"," trying to set string for type",type);
-	strcpy(string,value);
-}
-/*}}}*/
-/*FUNCTION Param::SetStringArray {{{1*/
-void  Param::SetStringArray(char** value,int size){
-	
-	int i;
-	if (type!=STRINGARRAY) ISSMERROR("%s%i"," trying to set string for type",type);
-	M=size;
-	stringarray=(char**)xmalloc(M*sizeof(char*));
-	for(i=0;i<M;i++){
-		char* instring=(char*)xmalloc((strlen(value[i])+1)*sizeof(char));
-		strcpy(instring,value[i]);
-		stringarray[i]=instring;
-	}
-}
-/*}}}*/
-/*FUNCTION Param::SetVec {{{1*/
-void  Param::SetVec(Vec value){
-
-	if(value){
-		VecDuplicate(value,&vec);
-		VecCopy(value,vec);
-		VecGetSize(value,&M);
-		N=1;
-	}
-	else{
-		vec=NULL;
-		M=0;
-		N=0;
-	}
-
-}
-/*}}}*/
Index: sm/trunk/src/c/objects/Param.h
===================================================================
--- /issm/trunk/src/c/objects/Param.h	(revision 3672)
+++ 	(revision )
@@ -1,78 +1,0 @@
-/*!\file Param.h
- * \brief: header file for param object
- */
-
-#ifndef _PARAM_H_
-#define _PARAM_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Object.h"
-#include "../toolkits/toolkits.h"
-#include "../include/types.h"
-
-#define PARAMSTRING 200 //max string length
-/*}}}*/
-
-class Param: public Object{
-
-	private: 
-		int	id; /*! id, to track it*/
-		char name[PARAMSTRING]; /*! name of parameter*/
-		int  type; /*! param type, from enum above*/
-		
-		double ddouble;
-		char  string[PARAMSTRING];
-		char** stringarray;
-		double* doublevec;
-		double* doublemat;
-		Vec vec;
-		Mat mat;
-		int M; //dimensions of vectors and matrices
-		int N;
-		int ndof;
-
-	public:
-
-		Param();
-		Param(int param_id, char* param_name, int param_type);
-		~Param();
-
-		void  Echo();
-		void  DeepEcho();
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		char* GetName();
-		char* GetParameterName();
-		void  Demarshall(char** pmarshalled_dataset);
-		int   Enum();
-		
-		void  SetDouble(double value);
-		void  SetDouble(int  value);
-		void  SetDoubleVec(double* value,int size);
-		void  SetDoubleVec(double* value,int size,int ndof);
-		void  SetDoubleMat(double* value,int M,int N);
-		void  SetVec(Vec value);
-		void  SetString(char* value);
-		void  SetStringArray(char** value,int size);
-
-		void  GetParameterValue(double* pdouble);
-		void  GetParameterValue(int* pinteger);
-		void  GetParameterValue(char** pstring);
-		void  GetParameterValue(char*** pstringarray);
-		void  GetParameterValue(double** pdoublearray);
-		void  GetParameterValue(Vec* pvec);
-		void  GetParameterValue(Mat* pmat);
-		
-		int   GetId(); 
-		int   MyRank();
-		void  DistributeNumDofs(int* numdofspernode,int analysis_type);
-		int   GetType();
-		int   GetM();
-		int   GetN();
-		int   GetNdof();
-		Object* copy();
-
-};
-
-#endif  /* _PARAM_H_ */
Index: /issm/trunk/src/c/objects/ParamObjects/BoolParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/BoolParam.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/BoolParam.cpp	(revision 3673)
@@ -0,0 +1,140 @@
+/*!\file BoolParam.c
+ * \brief: implementation of the BoolParam object
+ */
+
+/*header files: */
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./BoolParam.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+/*}}}*/
+
+/*Object constructors and destructor*/
+/*FUNCTION BoolParam::BoolParam(){{{1*/
+BoolParam::BoolParam(){
+	return;
+}
+/*}}}*/
+/*FUNCTION BoolParam::BoolParam(int enum_type,IssmBool value){{{1*/
+BoolParam::BoolParam(int in_enum_type,IssmBool in_value){
+
+	enum_type=in_enum_type;
+	value=in_value;
+}
+/*}}}*/
+/*FUNCTION BoolParam::~BoolParam(){{{1*/
+BoolParam::~BoolParam(){
+	return;
+}
+/*}}}*/
+
+/*Object methods*/
+/*FUNCTION BoolParam::copy{{{1*/
+Object* BoolParam::copy() {
+	
+	return new BoolParam(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION BoolParam::DeepEcho{{{1*/
+void BoolParam::DeepEcho(void){
+
+	printf("BoolParam:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %s\n",this->value?"true":"false");
+}
+/*}}}*/
+/*FUNCTION BoolParam::Demarshall{{{1*/
+void  BoolParam::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION BoolParam::Echo {{{1*/
+void BoolParam::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION BoolParam::Enum{{{1*/
+int BoolParam::Enum(void){
+
+	return BoolParamEnum;
+
+}
+/*}}}*/
+/*FUNCTION BoolParam::Id{{{1*/
+int    BoolParam::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION BoolParam::Marshall{{{1*/
+void  BoolParam::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of BoolParam: */
+	enum_value=BoolParamEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall BoolParam data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION BoolParam::MarshallSize{{{1*/
+int   BoolParam::MarshallSize(){
+	
+	return sizeof(value)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION BoolParam::MyRank{{{1*/
+int    BoolParam::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION BoolParam::GetParameterName(void); {{{1*/
+char* BoolParam::GetParameterName(void){
+	return  EnumAsString(this->enum_type);
+}
+/*}}}*/
+/*FUNCTION BoolParam::SetMatlabField(mxArray* dataref);{{{1*/
+void  BoolParam::SetMatlabField(mxArray* dataref){
+	char* name=NULL;
+	name=this->GetParameterName();
+	mxSetField( dataref, 0, name,mxCreateDoubleScalar((double)value));
+	xfree((void**)&name);
+/*}}}*/
Index: /issm/trunk/src/c/objects/ParamObjects/BoolParam.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/BoolParam.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/BoolParam.h	(revision 3673)
@@ -0,0 +1,57 @@
+/*! \file BoolParam.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _BOOLPARAM_H_
+#define _BOOLPARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Param.h"
+#include "../include/types.h"
+#include "../shared/shared.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+/*}}}*/
+
+class BoolParam: public Param{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int enum_type;
+		IssmBool value;
+
+	public:
+		/*constructors, destructors: {{{1*/
+		BoolParam();
+		BoolParam(int enum_type,IssmBool value);
+		~BoolParam();
+		/*}}}*/
+		/*Object methods: {{{1*/
+		Object* copy();
+		void  DeepEcho();
+		void  Demarshall(char** pmarshalled_dataset);
+		void  Echo();
+		int   Enum();
+		int   Id();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		int   MyRank();
+		/*}}}*/
+		/*Param methods: {{{1*/
+		int   EnumType(){return enum_type;}
+		void  GetParameterValue(bool* pbool){*pbool=value;}
+		void  GetParameterValue(int* pinteger){ISSMERROR("Bool param cannot return an integer");}
+		void  GetParameterValue(double* pdouble){ISSMERROR("Bool param cannot return a double");}
+		void  GetParameterValue(char** pstring){ISSMERROR("Bool param cannot return a string");}
+		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Bool param cannot return a string arrayl");}
+		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Bool param cannot return a double array");}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Bool param cannot return a double array");}
+		void  GetParameterValue(Vec* pvec){ISSMERROR("Bool param cannot return a Vec");}
+		void  GetParameterValue(Mat* pmat){ISSMERROR("Bool param cannot return a Mat");}
+		char* GetParameterName(void);
+		void  SetMatlabField(mxArray* dataref);
+		/*}}}*/
+};
+#endif  /* _BOOLPARAM_H */
Index: /issm/trunk/src/c/objects/ParamObjects/DoubleMatParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/DoubleMatParam.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/DoubleMatParam.cpp	(revision 3673)
@@ -0,0 +1,196 @@
+/*!\file DoubleMatParam.c
+ * \brief: implementation of the DoubleMatParam object
+ */
+
+/*header files: */
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./DoubleMatParam.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+/*}}}*/
+
+/*Object constructors and destructor*/
+/*FUNCTION DoubleMatParam::DoubleMatParam(){{{1*/
+DoubleMatParam::DoubleMatParam(){
+	return;
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::DoubleMatParam(int enum_type,IssmDoubleMat value){{{1*/
+DoubleMatParam::DoubleMatParam(int in_enum_type,double* in_value, int in_M,int in_N){
+
+	enum_type=in_enum_type;
+	M=in_M;
+	N=in_N;
+
+	value=(double*)xmalloc(M*N*sizeof(double));
+	memcpy(value,in_value,M*N*sizeof(double));
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::~DoubleMatParam(){{{1*/
+DoubleMatParam::~DoubleMatParam(){
+	xfree((void**)&value);
+	return;
+}
+/*}}}*/
+
+/*Object methods*/
+/*FUNCTION DoubleMatParam::copy{{{1*/
+Object* DoubleMatParam::copy() {
+	
+	return new DoubleMatParam(this->enum_type,this->value,this->M,this-N);
+
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::DeepEcho{{{1*/
+void DoubleMatParam::DeepEcho(void){
+
+	int i,j;
+	
+	printf("DoubleMatParam:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   matrix size: %ix%i\n",this->M,this->N);
+	for(i=0;i<this->M;i++){
+		for(i=0;i<this->N;i++){
+			printf("%i %i %g\n",i,j,*(this->value+N*i+j));
+		}
+	}
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::Demarshall{{{1*/
+void  DoubleMatParam::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	
+	/*data: */
+	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+	memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);
+	value=(double*)xmalloc(M*N*sizeof(double));
+	memcpy(value,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=M*N*sizeof(double);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::Echo {{{1*/
+void DoubleMatParam::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::Enum{{{1*/
+int DoubleMatParam::Enum(void){
+
+	return DoubleMatParamEnum;
+
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::Id{{{1*/
+int    DoubleMatParam::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION DoubleMatParam::Marshall{{{1*/
+void  DoubleMatParam::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of DoubleMatParam: */
+	enum_value=DoubleMatParamEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall DoubleMatParam data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+	memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
+	memcpy(marshalled_dataset,value,M*N*sizeof(double));marshalled_dataset+=M*N*sizeof(double);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::MarshallSize{{{1*/
+int   DoubleMatParam::MarshallSize(){
+	
+	return sizeof(M)
+		+sizeof(N)
+		+M*N*sizeof(double)
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::MyRank{{{1*/
+int    DoubleMatParam::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{1*/
+void  GetParameterValue(double** pdoublearray,int* pM,int* pN){
+	double* output=NULL;
+	double M,N;
+
+	M=this->M;
+	N=this->N;
+	output=(double*)xmalloc(M*N*sizeof(double));
+	memcpy(output,value,M*N*sizeof(double));
+
+	/*Assign output pointers:*/
+	*pM=M;
+	*pN=N;
+	*pdoublearray=output;
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::GetParameterName(void); {{{1*/
+char* DoubleMatParam::GetParameterName(void){
+	return  EnumAsString(this->enum_type);
+}
+/*}}}*/
+/*FUNCTION DoubleMatParam::SetMatlabField(mxArray* dataref);{{{1*/
+void  DoubleMatParam::SetMatlabField(mxArray* dataref){
+
+	mxArray* pfield=NULL;
+	mxArray* pfield2=NULL;
+	double* doublemat=NULL;
+	int M,N;
+	char* name=NULL;
+	
+	name=this->GetParameterName();
+	this->GetParameterValue(&doublemat,&M,&N);
+				
+	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+	mxSetM(pfield,N);
+	mxSetN(pfield,M);
+	mxSetPr(pfield,doublemat);
+	
+	//transpose the matrix, written directly to matlab! from C to matlab.
+	mexCallMATLAB(1,&pfield2, 1, &pfield, "'");
+	mxSetField( dataref, 0, name,pfield2);
+	
+	/*Free ressources:*/
+	xfree((void**)&name);
+	xfree((void**)&doublemat);
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/ParamObjects/DoubleMatParam.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/DoubleMatParam.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/DoubleMatParam.h	(revision 3673)
@@ -0,0 +1,58 @@
+/*! \file DoubleMatParam.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _DOUBLEMATPARAM_H_
+#define _DOUBLEMATPARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Param.h"
+#include "../include/types.h"
+#include "../shared/shared.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+/*}}}*/
+
+class DoubleMatParam: public Param{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int enum_type;
+		IssmDouble* value;
+		int M;
+		int N;
+
+	public:
+		/*constructors, destructors: {{{1*/
+		DoubleMatParam();
+		DoubleMatParam(int enum_type,IssmDouble* value,int M,int N);
+		~DoubleMatParam();
+		/*}}}*/
+		/*Object methods: {{{1*/
+		Object* copy();
+		void  DeepEcho();
+		void  Demarshall(char** pmarshalled_dataset);
+		void  Echo();
+		int   Enum();
+		int   Id();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		int   MyRank();
+		/*}}}*/
+		/*Param methods: {{{1*/
+		int   EnumType(){return enum_type;}
+		void  GetParameterValue(bool* pbool){ISSMERROR("DoubleMat param cannot return a bool");}
+		void  GetParameterValue(int* pinteger){ISSMERROR("DoubleMat param cannot return an integer");}
+		void  GetParameterValue(double* pdouble){ISSMERROR("DoubleMat param cannot return a double");}
+		void  GetParameterValue(char** pstring){ISSMERROR("DoubleMat param cannot return a string");}
+		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("DoubleMat param cannot return a string arrayl");}
+		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("DoubleMat param cannot return a double array");}
+		void  GetParameterValue(Vec* pvec){ISSMERROR("DoubleMat param cannot return a Vec");}
+		void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleMat param cannot return a Mat");}
+		char* GetParameterName(void);
+		void  SetMatlabField(mxArray* dataref);
+		/*}}}*/
+};
+#endif  /* _DOUBLEMATPARAM_H */
Index: /issm/trunk/src/c/objects/ParamObjects/DoubleParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/DoubleParam.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/DoubleParam.cpp	(revision 3673)
@@ -0,0 +1,139 @@
+/*!\file DoubleParam.c
+ * \brief: implementation of the DoubleParam object
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./DoubleParam.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+
+/*Object constructors and destructor*/
+/*FUNCTION DoubleParam::DoubleParam(){{{1*/
+DoubleParam::DoubleParam(){
+	return;
+}
+/*}}}*/
+/*FUNCTION DoubleParam::DoubleParam(int enum_type,IssmDouble value){{{1*/
+DoubleParam::DoubleParam(int in_enum_type,IssmDouble in_value){
+
+	enum_type=in_enum_type;
+	value=in_value;
+}
+/*}}}*/
+/*FUNCTION DoubleParam::~DoubleParam(){{{1*/
+DoubleParam::~DoubleParam(){
+	return;
+}
+/*}}}*/
+
+/*Object methods*/
+/*FUNCTION DoubleParam::copy{{{1*/
+Object* DoubleParam::copy() {
+	
+	return new DoubleParam(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION DoubleParam::DeepEcho{{{1*/
+void DoubleParam::DeepEcho(void){
+
+	printf("DoubleParam:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %g\n",this->value);
+}
+/*}}}*/
+/*FUNCTION DoubleParam::Demarshall{{{1*/
+void  DoubleParam::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION DoubleParam::Echo {{{1*/
+void DoubleParam::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION DoubleParam::Enum{{{1*/
+int DoubleParam::Enum(void){
+
+	return DoubleParamEnum;
+
+}
+/*}}}*/
+/*FUNCTION DoubleParam::Id{{{1*/
+int    DoubleParam::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION DoubleParam::Marshall{{{1*/
+void  DoubleParam::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of DoubleParam: */
+	enum_value=DoubleParamEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall DoubleParam data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION DoubleParam::MarshallSize{{{1*/
+int   DoubleParam::MarshallSize(){
+	
+	return sizeof(value)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION DoubleParam::MyRank{{{1*/
+int    DoubleParam::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION DoubleParam::GetParameterName(void); {{{1*/
+char* DoubleParam::GetParameterName(void){
+	return  EnumAsString(this->enum_type);
+}
+/*}}}*/
+/*FUNCTION DoubleParam::SetMatlabField(mxArray* dataref);{{{1*/
+void  DoubleParam::SetMatlabField(mxArray* dataref){
+
+	char* name=NULL;
+	name=this->GetParameterName();
+	mxSetField( dataref, 0, name,mxCreateDoubleScalar(value));
+	xfree((void**)&name);
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/ParamObjects/DoubleParam.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/DoubleParam.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/DoubleParam.h	(revision 3673)
@@ -0,0 +1,57 @@
+/*! \file DoubleParam.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _DOUBLEPARAM_H_
+#define _DOUBLEPARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Param.h"
+#include "../include/types.h"
+#include "../shared/shared.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+/*}}}*/
+
+class DoubleParam: public Param{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int enum_type;
+		IssmDouble value;
+
+	public:
+		/*constructors, destructors: {{{1*/
+		DoubleParam();
+		DoubleParam(int enum_type,IssmDouble value);
+		~DoubleParam();
+		/*}}}*/
+		/*Object methods: {{{1*/
+		Object* copy();
+		void  DeepEcho();
+		void  Demarshall(char** pmarshalled_dataset);
+		void  Echo();
+		int   Enum();
+		int   Id();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		int   MyRank();
+		/*}}}*/
+		/*Param methods: {{{1*/
+		int   EnumType(){return enum_type;}
+		void  GetParameterValue(bool* pbool){ISSMERROR("Double param cannot return a bool");}
+		void  GetParameterValue(int* pinteger){ISSMERROR("Double param cannot return an integer");}
+		void  GetParameterValue(double* pdouble){*pdouble=value;}
+		void  GetParameterValue(char** pstring){ISSMERROR("Double param cannot return a string");}
+		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Double param cannot return a string arrayl");}
+		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Double param cannot return a double array");}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Double param cannot return a double array");}
+		void  GetParameterValue(Vec* pvec){ISSMERROR("Double param cannot return a Vec");}
+		void  GetParameterValue(Mat* pmat){ISSMERROR("Double param cannot return a Mat");}
+		char* GetParameterName(void);
+		void  SetMatlabField(mxArray* dataref);
+		/*}}}*/
+};
+#endif  /* _DOUBLEPARAM_H */
Index: /issm/trunk/src/c/objects/ParamObjects/DoubleVecParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/DoubleVecParam.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/DoubleVecParam.cpp	(revision 3673)
@@ -0,0 +1,186 @@
+/*!\file DoubleVecParam.c
+ * \brief: implementation of the DoubleVecParam object
+ */
+
+/*header files: */
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./DoubleVecParam.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+/*}}}*/
+
+/*Object constructors and destructor*/
+/*FUNCTION DoubleVecParam::DoubleVecParam(){{{1*/
+DoubleVecParam::DoubleVecParam(){
+	return;
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::DoubleVecParam(int enum_type,IssmDoubleVec value){{{1*/
+DoubleVecParam::DoubleVecParam(int in_enum_type,double* in_value, int in_M){
+
+	enum_type=in_enum_type;
+	M=in_M;
+
+	value=(double*)xmalloc(M*sizeof(double));
+	memcpy(value,in_value,M*sizeof(double));
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::~DoubleVecParam(){{{1*/
+DoubleVecParam::~DoubleVecParam(){
+	xfree((void**)&value);
+	return;
+}
+/*}}}*/
+
+/*Object methods*/
+/*FUNCTION DoubleVecParam::copy{{{1*/
+Object* DoubleVecParam::copy() {
+	
+	return new DoubleVecParam(this->enum_type,this->value,this->M);
+
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::DeepEcho{{{1*/
+void DoubleVecParam::DeepEcho(void){
+
+	int i;
+	
+	printf("DoubleVecParam:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   vector size: %i\n",this->M);
+	for(i=0;i<this->M;i++){
+		printf("%i %g\n",i,this->value[i]);
+	}
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::Demarshall{{{1*/
+void  DoubleVecParam::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	
+	/*data: */
+	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+	value=(double*)xmalloc(M*sizeof(double));
+	memcpy(value,marshalled_dataset,M*sizeof(double));marshalled_dataset+=M*sizeof(double);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::Echo {{{1*/
+void DoubleVecParam::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::Enum{{{1*/
+int DoubleVecParam::Enum(void){
+
+	return DoubleVecParamEnum;
+
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::Id{{{1*/
+int    DoubleVecParam::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION DoubleVecParam::Marshall{{{1*/
+void  DoubleVecParam::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of DoubleVecParam: */
+	enum_value=DoubleVecParamEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall DoubleVecParam data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+	memcpy(marshalled_dataset,value,M*sizeof(double));marshalled_dataset+=M*sizeof(double);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::MarshallSize{{{1*/
+int   DoubleVecParam::MarshallSize(){
+	
+	return sizeof(M)
+		+M*sizeof(double)
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::MyRank{{{1*/
+int    DoubleVecParam::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{1*/
+void  GetParameterValue(double** pdoublearray,int* pM){
+	double* output=NULL;
+	double M;
+
+
+	M=this->M;
+	output=(double*)xmalloc(M*sizeof(double));
+	memcpy(output,value,M*sizeof(double));
+
+	/*Assign output pointers:*/
+	*pM=M;
+	*pdoublearray=output;
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::GetParameterName(void); {{{1*/
+char* DoubleVecParam::GetParameterName(void){
+	return  EnumAsString(this->enum_type);
+}
+/*}}}*/
+/*FUNCTION DoubleVecParam::SetMatlabField(mxArray* dataref);{{{1*/
+void  DoubleVecParam::SetMatlabField(mxArray* dataref){
+
+	char* name=NULL;
+	double* doublevec=NULL;
+	int M;
+	mxArray* pfield=NULL;
+
+	this->GetParameterValue(&doublevec,&M);
+	name=this->GetParameterName();
+				
+	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+	mxSetM(pfield,M);
+	mxSetN(pfield,1);
+	mxSetPr(pfield,doublevec);
+	
+	mxSetField( dataref, 0, name, pfield);
+
+	/*Free ressources:*/
+	xfree((void**)&name);
+	xfree((void**)&doublevec);
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/ParamObjects/DoubleVecParam.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/DoubleVecParam.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/DoubleVecParam.h	(revision 3673)
@@ -0,0 +1,57 @@
+/*! \file DoubleVecParam.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _DOUBLEVECPARAM_H_
+#define _DOUBLEVECPARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Param.h"
+#include "../include/types.h"
+#include "../shared/shared.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+/*}}}*/
+
+class DoubleVecParam: public Param{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int enum_type;
+		IssmDouble* value;
+		int M;
+
+	public:
+		/*constructors, destructors: {{{1*/
+		DoubleVecParam();
+		DoubleVecParam(int enum_type,IssmDouble* value,int M);
+		~DoubleVecParam();
+		/*}}}*/
+		/*Object methods: {{{1*/
+		Object* copy();
+		void  DeepEcho();
+		void  Demarshall(char** pmarshalled_dataset);
+		void  Echo();
+		int   Enum();
+		int   Id();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		int   MyRank();
+		/*}}}*/
+		/*Param methods: {{{1*/
+		int   EnumType(){return enum_type;}
+		void  GetParameterValue(bool* pbool){ISSMERROR("DoubleVec param cannot return a bool");}
+		void  GetParameterValue(int* pinteger){ISSMERROR("DoubleVec param cannot return an integer");}
+		void  GetParameterValue(double* pdouble){ISSMERROR("DoubleVec param cannot return a double");}
+		void  GetParameterValue(char** pstring){ISSMERROR("DoubleVec param cannot return a string");}
+		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("DoubleVec param cannot return a string arrayl");}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("DoubleVec param cannot return a double array");}
+		void  GetParameterValue(Vec* pvec){ISSMERROR("DoubleVec param cannot return a Vec");}
+		void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleVec param cannot return a Mat");}
+		char* GetParameterName(void);
+		void  SetMatlabField(mxArray* dataref);
+		/*}}}*/
+};
+#endif  /* _DOUBLEVECPARAM_H */
Index: /issm/trunk/src/c/objects/ParamObjects/IntParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/IntParam.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/IntParam.cpp	(revision 3673)
@@ -0,0 +1,143 @@
+/*!\file IntParam.c
+ * \brief: implementation of the IntParam object
+ */
+
+/*header files: */
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./IntParam.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+/*}}}*/
+
+/*Object constructors and destructor*/
+/*FUNCTION IntParam::IntParam(){{{1*/
+IntParam::IntParam(){
+	return;
+}
+/*}}}*/
+/*FUNCTION IntParam::IntParam(int enum_type,IssmInt value){{{1*/
+IntParam::IntParam(int in_enum_type,IssmInt in_value){
+
+	enum_type=in_enum_type;
+	value=in_value;
+}
+/*}}}*/
+/*FUNCTION IntParam::~IntParam(){{{1*/
+IntParam::~IntParam(){
+	return;
+}
+/*}}}*/
+
+/*Object methods*/
+/*FUNCTION IntParam::copy{{{1*/
+Object* IntParam::copy() {
+	
+	return new IntParam(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION IntParam::DeepEcho{{{1*/
+void IntParam::DeepEcho(void){
+
+	printf("IntParam:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %i\n",this->value);
+}
+/*}}}*/
+/*FUNCTION IntParam::Demarshall{{{1*/
+void  IntParam::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION IntParam::Echo {{{1*/
+void IntParam::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION IntParam::Enum{{{1*/
+int IntParam::Enum(void){
+
+	return IntParamEnum;
+
+}
+/*}}}*/
+/*FUNCTION IntParam::Id{{{1*/
+int    IntParam::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION IntParam::Marshall{{{1*/
+void  IntParam::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of IntParam: */
+	enum_value=IntParamEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall IntParam data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION IntParam::MarshallSize{{{1*/
+int   IntParam::MarshallSize(){
+	
+	return sizeof(value)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION IntParam::MyRank{{{1*/
+int    IntParam::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION IntParam::GetParameterName(void); {{{1*/
+char* IntParam::GetParameterName(void){
+	return  EnumAsString(this->enum_type);
+}
+/*}}}*/
+/*FUNCTION IntParam::SetMatlabField(mxArray* dataref);{{{1*/
+void  IntParam::SetMatlabField(mxArray* dataref){
+	
+	char* name=NULL;
+	name=this->GetParameterName();
+	mxSetField( dataref, 0, name,mxCreateDoubleScalar((double)value));
+	xfree((void**)&name);
+
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/ParamObjects/IntParam.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/IntParam.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/IntParam.h	(revision 3673)
@@ -0,0 +1,57 @@
+/*! \file IntParam.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _INTPARAM_H_
+#define _INTPARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Param.h"
+#include "../include/types.h"
+#include "../shared/shared.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+/*}}}*/
+
+class IntParam: public Param{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int enum_type;
+		IssmInt value;
+
+	public:
+		/*constructors, destructors: {{{1*/
+		IntParam();
+		IntParam(int enum_type,IssmInt value);
+		~IntParam();
+		/*}}}*/
+		/*Object methods: {{{1*/
+		Object* copy();
+		void  DeepEcho();
+		void  Demarshall(char** pmarshalled_dataset);
+		void  Echo();
+		int   Enum();
+		int   Id();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		int   MyRank();
+		/*}}}*/
+		/*Param methods: {{{1*/
+		int   EnumType(){return enum_type;}
+		void  GetParameterValue(bool* pbool){ISSMERROR("Int param cannot return a bool");}
+		void  GetParameterValue(int* pinteger){*pinteger=value;}
+		void  GetParameterValue(double* pdouble){ISSMERROR("Int param cannot return a double");}
+		void  GetParameterValue(char** pstring){ISSMERROR("Int param cannot return a string");}
+		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Int param cannot return a string arrayl");}
+		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Int param cannot return a double array");}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Int param cannot return a double array");}
+		void  GetParameterValue(Vec* pvec){ISSMERROR("Int param cannot return a Vec");}
+		void  GetParameterValue(Mat* pmat){ISSMERROR("Int param cannot return a Mat");}
+		char* GetParameterName(void);
+		void  SetMatlabField(mxArray* dataref);
+		/*}}}*/
+};
+#endif  /* _INTPARAM_H */
Index: /issm/trunk/src/c/objects/ParamObjects/Param.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/Param.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/Param.h	(revision 3673)
@@ -0,0 +1,37 @@
+/*!\file:  Param.h
+ * \brief abstract class for Param object
+ */ 
+
+
+#ifndef _PARAM_H_
+#define _PARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Object.h"
+#include "./Node.h"
+/*}}}*/
+
+class Param: public Object{
+
+	public: 
+		
+		virtual        ~Param(){};
+
+		/*methods:{{{1*/
+		virtual int   EnumType()=0;
+		virtual void  GetParameterValue(bool* pbool)=0;
+		virtual void  GetParameterValue(int* pinteger)=0;
+		virtual void  GetParameterValue(double* pdouble)=0;
+		virtual void  GetParameterValue(char** pstring)=0;
+		virtual void  GetParameterValue(char*** pstringarray,int* pM)=0;
+		virtual void  GetParameterValue(double** pdoublearray,int* pM)=0;
+		virtual void  GetParameterValue(double** pdoublearray,int* pM,int* pN)=0;
+		virtual void  GetParameterValue(Vec* pvec)=0;
+		virtual void  GetParameterValue(Mat* pmat)=0;
+		virtual char* GetParameterName(void)=0;
+		virtual void  SetMatlabField(mxArray* dataref)=0;
+		/*}}}*/
+
+};
+#endif
Index: /issm/trunk/src/c/objects/ParamObjects/PetscMatParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/PetscMatParam.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/PetscMatParam.cpp	(revision 3673)
@@ -0,0 +1,225 @@
+/*!\file PetscMatParam.c
+ * \brief: implementation of the PetscMatParam object
+ */
+
+/*header files: */
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./PetscMatParam.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+/*}}}*/
+
+/*Object constructors and destructor*/
+/*FUNCTION PetscMatParam::PetscMatParam(){{{1*/
+PetscMatParam::PetscMatParam(){
+	return;
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::PetscMatParam(int enum_type,IssmPetscMat value){{{1*/
+PetscMatParam::PetscMatParam(int in_enum_type,Mat in_value){
+
+	enum_type=in_enum_type;
+
+	value=NULL;
+
+	if(in_value){
+		MatDuplicate(in_value,MAT_COPY_VALUES,&value);
+	}
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::~PetscMatParam(){{{1*/
+PetscMatParam::~PetscMatParam(){
+	MatFree(&value)
+	return;
+}
+/*}}}*/
+
+/*Object methods*/
+/*FUNCTION PetscMatParam::copy{{{1*/
+Object* PetscMatParam::copy() {
+	
+	return new PetscMatParam(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::DeepEcho{{{1*/
+void PetscMatParam::DeepEcho(void){
+
+	int i;
+	printf("PetscMatParam:\n");
+	printf("   enum: %i\n",this->enum_type);
+	MatView(value,PETSC_VIEWER_STDOUT_WORLD);
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::Demarshall{{{1*/
+void  PetscMatParam::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i,j;
+	int   M,N;
+	double* serial_mat=NULL;
+	int*    idxm=NULL;
+	int*    idxn=NULL;
+	double sparsity=.001;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	
+	/*data: */
+	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+	memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);
+	if(M!=0 && N!=0){
+		serial_mat=(double*)xmalloc(M*N*sizeof(double));
+		memcpy(serial_mat,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=(M*N*sizeof(double));
+		value=NewMat(M,N,&sparsity,NULL,NULL);
+		idxm=(int*)xmalloc(M*sizeof(int));
+		idxn=(int*)xmalloc(N*sizeof(int));
+		for(i=0;i<M;i++)idxm[i]=i;
+		for(i=0;i<N;i++)idxn[i]=i;
+		MatSetValues(value,M,idxm,N,idxn,serial_mat,INSERT_VALUES); 
+		MatAssemblyBegin(value,MAT_FINAL_ASSEMBLY); 
+		MatAssemblyEnd(value,MAT_FINAL_ASSEMBLY);
+
+			}
+	else{
+		mat=NULL;
+	}
+
+	/*Free ressources:*/
+	xfree((void**)&serial_mat);
+	xfree((void**)&idxm);
+	xfree((void**)&idxn);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::Echo {{{1*/
+void PetscMatParam::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::Enum{{{1*/
+int PetscMatParam::Enum(void){
+
+	return PetscMatParamEnum;
+
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::Id{{{1*/
+int    PetscMatParam::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION PetscMatParam::Marshall{{{1*/
+void  PetscMatParam::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+	int   M,N;
+	double* serial_mat=NULL;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of PetscMatParam: */
+	enum_value=PetscMatParamEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall PetscMatParam data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	if(value){
+		MatGetSize(value,&M,&N);
+		MatToSerial(&serial_mat,value);
+		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+		memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
+		memcpy(marshalled_dataset,serial_mat,M*N*sizeof(double));marshalled_dataset+=(M*N*sizeof(double));
+	}
+	else{
+		M=0;
+		N=0;
+		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+		memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
+	}
+	
+	/*Free ressources:*/
+	xfree((void**)&serial_mat);
+
+	/*return:*/
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::MarshallSize{{{1*/
+int   PetscMatParam::MarshallSize(){
+
+	int M=0;
+	int N=0;
+	if(value)MatGetSize(value,&M,&N);
+			
+	return sizeof(M)+
+		sizeof(N)+
+		M*N*sizeof(double)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::MyRank{{{1*/
+int    PetscMatParam::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::GetParameterValue(Vec* pvalue){{{1*/
+void  GetParameterValue(Mat* poutput){
+	Mat output=NULL;
+
+	if(value){
+		MatDuplicate(value,MAT_COPY_VALUES,&output);
+	}
+	*pvalue=output;
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::GetParameterName(void); {{{1*/
+char* PetscMatParam::GetParameterName(void){
+	return  EnumAsString(this->enum_type);
+}
+/*}}}*/
+/*FUNCTION PetscMatParam::SetMatlabField(mxArray* dataref);{{{1*/
+void  PetscMatParam::SetMatlabField(mxArray* dataref){
+	
+	char* name=NULL;
+	int   M,N;
+	double* doublemat=NULL;
+	mxArray* pfield=NULL;
+
+	MatToSerial(&doublemat,value);
+	MatGetSize(value,&M,&N);
+	name=this->GetParameterName();
+				
+	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+	mxSetM(pfield,M);
+	mxSetN(pfield,N);
+	mxSetPr(pfield,doublemat);
+	mxSetField( dataref, 0, name, pfield);
+
+	/*Free ressources:*/
+	xfree((void**)&name);
+	xfree((void**)&doublemat);
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/ParamObjects/PetscMatParam.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/PetscMatParam.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/PetscMatParam.h	(revision 3673)
@@ -0,0 +1,56 @@
+/*! \file PetscMatParam.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _PETSCMATPARAM_H_
+#define _PETSCMATPARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Param.h"
+#include "../include/types.h"
+#include "../shared/shared.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+/*}}}*/
+
+class PetscMatParam: public Param{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int enum_type;
+		Mat value;
+
+	public:
+		/*constructors, destructors: {{{1*/
+		PetscMatParam();
+		PetscMatParam(int enum_type,Mat value);
+		~PetscMatParam();
+		/*}}}*/
+		/*Object methods: {{{1*/
+		Object* copy();
+		void  DeepEcho();
+		void  Demarshall(char** pmarshalled_dataset);
+		void  Echo();
+		int   Enum();
+		int   Id();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		int   MyRank();
+		/*}}}*/
+		/*Param methods: {{{1*/
+		int   EnumType(){return enum_type;}
+		void  GetParameterValue(bool* pbool){ISSMERROR("PetscMat param cannot return a bool");}
+		void  GetParameterValue(int* pinteger){ISSMERROR("PetscMat param cannot return an integer");}
+		void  GetParameterValue(double* pdouble){ISSMERROR("PetscMat param cannot return a double");}
+		void  GetParameterValue(char** pstring){ISSMERROR("PetscMat param cannot return a string");}
+		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("PetscMat param cannot return a string arrayl");}
+		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("PetscMat param cannot return a double array");}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("PetscMat param cannot return a double array");}
+		void  GetParameterValue(Vec* pvec){ISSMERROR("PetscMat param cannot return a vec");}
+		char* GetParameterName(void);
+		void  SetMatlabField(mxArray* dataref);
+		/*}}}*/
+};
+#endif  /* _PETSCMATPARAM_H */
Index: /issm/trunk/src/c/objects/ParamObjects/PetscVecParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/PetscVecParam.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/PetscVecParam.cpp	(revision 3673)
@@ -0,0 +1,218 @@
+/*!\file PetscVecParam.c
+ * \brief: implementation of the PetscVecParam object
+ */
+
+/*header files: */
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./PetscVecParam.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+/*}}}*/
+
+/*Object constructors and destructor*/
+/*FUNCTION PetscVecParam::PetscVecParam(){{{1*/
+PetscVecParam::PetscVecParam(){
+	return;
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::PetscVecParam(int enum_type,IssmPetscVec value){{{1*/
+PetscVecParam::PetscVecParam(int in_enum_type,Vec in_value){
+
+	enum_type=in_enum_type;
+
+	value=NULL;
+
+	if(in_value){
+		VecDuplicate(invalue,&value);
+		VecCopy(invalue,value);
+	}
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::~PetscVecParam(){{{1*/
+PetscVecParam::~PetscVecParam(){
+	VecFree(&value)
+	return;
+}
+/*}}}*/
+
+/*Object methods*/
+/*FUNCTION PetscVecParam::copy{{{1*/
+Object* PetscVecParam::copy() {
+	
+	return new PetscVecParam(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::DeepEcho{{{1*/
+void PetscVecParam::DeepEcho(void){
+
+	int i;
+	printf("PetscVecParam:\n");
+	printf("   enum: %i\n",this->enum_type);
+	VecView(value,PETSC_VIEWER_STDOUT_WORLD);
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::Demarshall{{{1*/
+void  PetscVecParam::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+	int   M;
+	double* serial_vec=NULL;
+	int*    idxm=NULL;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	
+	/*data: */
+	
+	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+	if(M){
+		serial_vec=(double*)xmalloc(M*sizeof(double));
+		memcpy(serial_vec,marshalled_dataset,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));
+
+		value=NewVec(M);
+		idxm=(int*)xmalloc(M*sizeof(int));
+		for(i=0;i<M;i++)idxm[i]=i;
+		VecSetValues(value,M,idxm,serial_vec,INSERT_VALUES);
+
+		VecAssemblyBegin(value);
+		VecAssemblyEnd(value);
+
+		
+	}
+	else{
+		vec=NULL;
+	}
+
+	/*Free ressources:*/
+	xfree((void**)&serial_vec);
+	xfree((void**)&idxm);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::Echo {{{1*/
+void PetscVecParam::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::Enum{{{1*/
+int PetscVecParam::Enum(void){
+
+	return PetscVecParamEnum;
+
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::Id{{{1*/
+int    PetscVecParam::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION PetscVecParam::Marshall{{{1*/
+void  PetscVecParam::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+	int   M;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of PetscVecParam: */
+	enum_value=PetscVecParamEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall PetscVecParam data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	if(value){
+		VecGetSize(value,&M);
+		VecToMPISerial(&serial_value,value);
+		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+		memcpy(marshalled_dataset,serial_value,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));
+	}
+	else{
+		M=0;
+		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+	}
+	/*Free ressources:*/
+	xfree((void**)&serial_value);
+
+	/*return:*/
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::MarshallSize{{{1*/
+int   PetscVecParam::MarshallSize(){
+
+	int M=0;
+	if(value)VecGetSize(value,&M);
+
+	return sizeof(M)+M*sizeof(double)
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::MyRank{{{1*/
+int    PetscVecParam::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::GetParameterValue(Vec* pvalue){{{1*/
+void  GetParameterValue(Vec* poutput){
+	Vec output=NULL;
+
+	if(value){
+		VecDuplicate(value,&output);
+		VecCopy(value,output);
+	}
+	*pvalue=output;
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::GetParameterName(void); {{{1*/
+char* PetscVecParam::GetParameterName(void){
+	return  EnumAsString(this->enum_type);
+}
+/*}}}*/
+/*FUNCTION PetscVecParam::SetMatlabField(mxArray* dataref);{{{1*/
+void  PetscVecParam::SetMatlabField(mxArray* dataref){
+
+	mxArray* pfield=NULL;
+	char* name=NULL;
+	double* doublevec=NULL;
+	int M;
+	
+	VecToMPISerial(&doublevec,value);
+	VecGetSize(value,&M);
+	name=this->GetParameterName();
+	
+	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+	mxSetM(pfield,M);
+	mxSetN(pfield,1);
+	mxSetPr(pfield,serial_vec);
+	
+	mxSetField( dataref, 0, name, pfield);
+
+	/*Free ressources:*/
+	xfree((void**)&name);
+	xfree((void**)&doublevec);
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/ParamObjects/PetscVecParam.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/PetscVecParam.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/PetscVecParam.h	(revision 3673)
@@ -0,0 +1,56 @@
+/*! \file PetscVecParam.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _PETSCVECPARAM_H_
+#define _PETSCVECPARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Param.h"
+#include "../include/types.h"
+#include "../shared/shared.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+/*}}}*/
+
+class PetscVecParam: public Param{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int enum_type;
+		Vec value;
+
+	public:
+		/*constructors, destructors: {{{1*/
+		PetscVecParam();
+		PetscVecParam(int enum_type,Vec value);
+		~PetscVecParam();
+		/*}}}*/
+		/*Object methods: {{{1*/
+		Object* copy();
+		void  DeepEcho();
+		void  Demarshall(char** pmarshalled_dataset);
+		void  Echo();
+		int   Enum();
+		int   Id();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		int   MyRank();
+		/*}}}*/
+		/*Param methods: {{{1*/
+		int   EnumType(){return enum_type;}
+		void  GetParameterValue(bool* pbool){ISSMERROR("PetscVec param cannot return a bool");}
+		void  GetParameterValue(int* pinteger){ISSMERROR("PetscVec param cannot return an integer");}
+		void  GetParameterValue(double* pdouble){ISSMERROR("PetscVec param cannot return a double");}
+		void  GetParameterValue(char** pstring){ISSMERROR("PetscVec param cannot return a string");}
+		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("PetscVec param cannot return a string arrayl");}
+		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("PetscVec param cannot return a double array");}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("PetscVec param cannot return a double array");}
+		void  GetParameterValue(Mat* pmat){ISSMERROR("PetscVec param cannot return a Mat");}
+		char* GetParameterName(void);
+		void  SetMatlabField(mxArray* dataref);
+		/*}}}*/
+};
+#endif  /* _PETSCVECPARAM_H */
Index: /issm/trunk/src/c/objects/ParamObjects/StringArrayParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/StringArrayParam.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/StringArrayParam.cpp	(revision 3673)
@@ -0,0 +1,248 @@
+/*!\file StringArrayParam.c
+ * \brief: implementation of the StringArrayParam object
+ */
+
+/*header files: */
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./StringArrayParam.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+/*}}}*/
+
+/*Object constructors and destructor*/
+/*FUNCTION StringArrayParam::StringArrayParam(){{{1*/
+StringArrayParam::StringArrayParam(){
+	return;
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::StringArrayParam(int enum_type,char** in_values,int in_numstrings){{{1*/
+StringArrayParam::StringArrayParam(int in_enum_type,char** in_values, int in_numstrings){
+
+	int i;
+		int size;
+
+	enum_type=in_enum_type;
+	numstrings=in_numstrings;
+
+	value=(char**)xmalloc(numstrings*sizef(char*));
+	for(i=0;i<numstrings;i++){
+		char* string=NULL
+		size=strlen(in_values[i])+1;
+		string=(char*)xmalloc(size*sizeof(char));
+		memcpy(string,in_values[i],size*sizeof(char));
+		values[i]=string;
+	}
+	
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::~StringArrayParam(){{{1*/
+StringArrayParam::~StringArrayParam(){
+		
+	int i;
+	
+	char* string=NULL;
+	for(i=0;i<this->numstrings;i++){
+		string=value[i];
+		xfree((void**)&string);
+	}
+	xfree((void**)&value);
+}
+/*}}}*/
+
+/*Object methods*/
+/*FUNCTION StringArrayParam::copy{{{1*/
+Object* StringArrayParam::copy() {
+	
+	return new StringArrayParam(this->enum_type,this->value,this->numstrings);
+
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::DeepEcho{{{1*/
+void StringArrayParam::DeepEcho(void){
+
+	int i;
+	char* string=NULL;
+
+	printf("StringArrayParam:\n");
+	printf("   enum: %i\n",this->enum_type);
+	for(i=0;i<this->numstrings;i++){
+		string=this->value[i];
+		printf("   %i: %s\n",i,string);
+	}
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::Demarshall{{{1*/
+void  StringArrayParam::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+	int   stringsize;
+	char* string=NULL;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+
+	memcpy(&numstrings,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+	this->value=(char**)xmalloc(numstrings*sizeof(char*));
+
+	for(i=0;i<numstrings;i++){
+		memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+	
+		string=(char*)xmalloc(stringsize*sizeof(char));
+		memcpy(string,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+
+		this->value[i]=string;
+	}
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::Echo {{{1*/
+void StringArrayParam::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::Enum{{{1*/
+int StringArrayParam::Enum(void){
+
+	return StringArrayParamEnum;
+
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::Id{{{1*/
+int    StringArrayParam::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION StringArrayParam::Marshall{{{1*/
+void  StringArrayParam::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+	int   stringsize;
+	char* string=NULL;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of StringArrayParam: */
+	enum_value=StringArrayParamEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	memcpy(marshalled_dataset,&numstrings,sizeof(numstrings));marshalled_dataset+=sizeof(numstrings);
+	for(i=0;i<numstrings;i++){
+		string=this->value[i];
+		stringsize=strlen(string)+1;
+		
+		memcpy(marshalled_dataset,&stringsize,sizeof(stringsize));marshalled_dataset+=sizeof(stringsize);
+		memcpy(marshalled_dataset,string,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+	}
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::MarshallSize{{{1*/
+int   StringArrayParam::MarshallSize(){
+
+	int i;
+	int marshallsize;
+	int stringsize;
+	char* string=NULL;
+
+	marshallsize+=sizeof(numstrings);
+
+	for(i=0;i<numstrings;i++){
+		string=this->value[i];
+		stringsize=strlen(string)+1;
+		marshallsize+=sizeof(stringsize);
+		marshallsize+=stringsize*sizeof(char);
+	}
+	
+	marshallsize+=sizeof(enum_type)
+	marshallsize+=sizeof(int); //sizeof(int) for enum value
+
+	return marshallsize;
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::MyRank{{{1*/
+int    StringArrayParam::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::GetParameterValue(char*** pstringarray, int* pnumstrings){{{1*/
+void  StringArrayParam::GetParameterValue(char*** pstringarray,int* pM){
+	
+	char** outstrings=NULL;
+	int   M;
+	char* string=NULL;
+	char* string2=NULL;
+	int   stringsize;
+
+	M=this->numstrings;
+	outstrings=(char**)xmalloc(this->numstrings*sizeof(char*));
+
+	for(i=0;i<this->numstrings;i++){
+		string=this->value[i];
+		stringsize=strlen(string)+1;
+
+		string2=(char*)xmalloc(stringsize*sizeof(char));
+		memcpy(string2,string,stringsize*sizeof(char));
+
+		outstrings[i]=string2;
+	}
+
+	/*Assign output pointers:*/
+	*pM=M;
+	*pstringarray=outstrings;
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::GetParameterName(void); {{{1*/
+char* StringArrayParam::GetParameterName(void){
+	return  EnumAsString(this->enum_type);
+}
+/*}}}*/
+/*FUNCTION StringArrayParam::SetMatlabField(mxArray* dataref);{{{1*/
+void  StringArrayParam::SetMatlabField(mxArray* dataref){
+	
+	int      i;
+	char*    name=NULL;
+	mwSize   dims[2]={0};
+	mxArray* pfield=NULL;
+	
+	name=this->GetParameterName();
+
+	dims[0]=this->numstrings;
+	dims[1]=1;
+	pfield=mxCreateCellArray(2,dims);
+	for(i=0;i<this->numstrings;i++){
+		char* string=value[i];
+		mxSetCell(pfield,i,mxCreateString(string));
+	}
+	mxSetField( dataref, 0, name,pfield);
+
+	/*Free ressources:*/
+	xfree((void**)&name);
+
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/ParamObjects/StringArrayParam.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/StringArrayParam.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/StringArrayParam.h	(revision 3673)
@@ -0,0 +1,59 @@
+/*! \file StringArrayParam.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _STRINGARRAYPARAM_H_
+#define _STRINGARRAYPARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Param.h"
+#include "../include/types.h"
+#include "../shared/shared.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+/*}}}*/
+
+class StringArrayParam: public Param{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int      enum_type;
+		char**   value;
+		int      numstrings;
+
+
+	public:
+		/*constructors, destructors: {{{1*/
+		StringArrayParam();
+		StringArrayParam(int enum_type,char** values, int numstrings);
+		~StringArrayParam();
+		/*}}}*/
+		/*Object methods: {{{1*/
+		Object* copy();
+		void  DeepEcho();
+		void  Demarshall(char** pmarshalled_dataset);
+		void  Echo();
+		int   Enum();
+		int   Id();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		int   MyRank();
+		/*}}}*/
+		/*Param methods: {{{1*/
+		int   EnumType(){return enum_type;}
+		void  GetParameterValue(bool* pbool){ISSMERROR("StringArray param cannot return a bool");}
+		void  GetParameterValue(int* pinteger){ISSMERROR("StringArray param cannot return an integer");}
+		void  GetParameterValue(double* pdouble){ISSMERROR("StringArray param cannot return a double");}
+		void  GetParameterValue(char** pstring){ISSMERROR("StringArray param cannot return a string");}
+		void  GetParameterValue(char*** pstringarray,int* pM);
+		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("StringArray param cannot return a double array");}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("StringArray param cannot return a double array");}
+		void  GetParameterValue(Vec* pvec){ISSMERROR("StringArray param cannot return a Vec");}
+		void  GetParameterValue(Mat* pmat){ISSMERROR("StringArray param cannot return a Mat");}
+		char* GetParameterName(void);
+		void  SetMatlabField(mxArray* dataref);
+		/*}}}*/
+};
+#endif  /* _STRINGARRAYPARAM_H */
Index: /issm/trunk/src/c/objects/ParamObjects/StringParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/StringParam.cpp	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/StringParam.cpp	(revision 3673)
@@ -0,0 +1,177 @@
+/*!\file StringParam.c
+ * \brief: implementation of the StringParam object
+ */
+
+/*header files: */
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include "./StringParam.h"
+#include <string.h>
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../shared/shared.h"
+#include "../DataSet/DataSet.h"
+#include "../include/typedefs.h"
+#include "../include/types.h"
+#include "../include/macros.h"
+/*}}}*/
+
+/*Object constructors and destructor*/
+/*FUNCTION StringParam::StringParam(){{{1*/
+StringParam::StringParam(){
+	return;
+}
+/*}}}*/
+/*FUNCTION StringParam::StringParam(int enum_type,IssmString value){{{1*/
+StringParam::StringParam(int in_enum_type,char* in_value){
+
+	enum_type=in_enum_type;
+	value=(char*)xmalloc((strlen(in_value)+1)*sizeof(char));
+	strcpy(value,in_value);
+	
+}
+/*}}}*/
+/*FUNCTION StringParam::~StringParam(){{{1*/
+StringParam::~StringParam(){
+	xfree((void**)&value);
+}
+/*}}}*/
+
+/*Object methods*/
+/*FUNCTION StringParam::copy{{{1*/
+Object* StringParam::copy() {
+	
+	return new StringParam(this->enum_type,this->value);
+
+}
+/*}}}*/
+/*FUNCTION StringParam::DeepEcho{{{1*/
+void StringParam::DeepEcho(void){
+
+	printf("StringParam:\n");
+	printf("   enum: %i\n",this->enum_type);
+	printf("   %s\n",this->value);
+}
+/*}}}*/
+/*FUNCTION StringParam::Demarshall{{{1*/
+void  StringParam::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+	int   stringsize;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+
+	memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+	
+	this->value=(char*)xmalloc(stringsize*sizeof(char));
+	memcpy(this->value,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION StringParam::Echo {{{1*/
+void StringParam::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION StringParam::Enum{{{1*/
+int StringParam::Enum(void){
+
+	return StringParamEnum;
+
+}
+/*}}}*/
+/*FUNCTION StringParam::Id{{{1*/
+int    StringParam::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION StringParam::Marshall{{{1*/
+void  StringParam::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   enum_value=0;
+	int   stringsize;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of StringParam: */
+	enum_value=StringParamEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+
+	/*marshall data: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+	stringsize=strlen(this->value)+1;
+	
+	memcpy(marshalled_dataset,&stringsize,sizeof(stringsize));marshalled_dataset+=sizeof(stringsize);
+	memcpy(marshalled_dataset,this->value,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION StringParam::MarshallSize{{{1*/
+int   StringParam::MarshallSize(){
+
+	int stringsize;
+	stringsize=strlen(this->value)+1;
+	
+	return sizeof(value)+
+		sizeof(int)+
+		stringsize*sizeof(char)+
+		+sizeof(enum_type)+
+		+sizeof(int); //sizeof(int) for enum value
+}
+/*}}}*/
+/*FUNCTION StringParam::MyRank{{{1*/
+int    StringParam::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION StringParam::GetParameterValue(char** pstring){{{1*/
+void  StringParam::GetParameterValue(char** pstring){
+	
+	char* outstring=NULL;
+	int   stringsize;
+
+	stringsize=strlen(this->value)+1;
+
+	outstring=(char*)xmalloc(stringsize*sizeof(char));
+	memcpy(outstring,this->value,stringsize*sizeof(char));
+
+	*pstring=outstring;
+
+}
+/*}}}*/
+/*FUNCTION StringParam::GetParameterName(void); {{{1*/
+char* StringParam::GetParameterName(void){
+	return  EnumAsString(this->enum_type);
+}
+/*}}}*/
+/*FUNCTION StringParam::SetMatlabField(mxArray* dataref);{{{1*/
+void  StringParam::SetMatlabField(mxArray* dataref){
+	
+	char* name=NULL;
+
+	name=this->GetParameterName();
+	mxSetField( dataref, 0, name, mxCreateString(value));
+
+	/*Free ressources:*/
+	xfree((void**)&name);
+
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/ParamObjects/StringParam.h
===================================================================
--- /issm/trunk/src/c/objects/ParamObjects/StringParam.h	(revision 3673)
+++ /issm/trunk/src/c/objects/ParamObjects/StringParam.h	(revision 3673)
@@ -0,0 +1,57 @@
+/*! \file StringParam.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _STRINGPARAM_H_
+#define _STRINGPARAM_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Param.h"
+#include "../include/types.h"
+#include "../shared/shared.h"
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+/*}}}*/
+
+class StringParam: public Param{
+
+	private: 
+		/*just hold 3 values for 3 vertices: */
+		int enum_type;
+		char* value;
+
+	public:
+		/*constructors, destructors: {{{1*/
+		StringParam();
+		StringParam(int enum_type,char* value);
+		~StringParam();
+		/*}}}*/
+		/*Object methods: {{{1*/
+		Object* copy();
+		void  DeepEcho();
+		void  Demarshall(char** pmarshalled_dataset);
+		void  Echo();
+		int   Enum();
+		int   Id();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		int   MyRank();
+		/*}}}*/
+		/*Param methods: {{{1*/
+		int   EnumType(){return enum_type;}
+		void  GetParameterValue(bool* pbool){ISSMERROR("String param cannot return a bool");}
+		void  GetParameterValue(int* pinteger){ISSMERROR("String param cannot return an integer");}
+		void  GetParameterValue(double* pdouble){ISSMERROR("String param cannot return a double");}
+		void  GetParameterValue(char** pstring);
+		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("String param cannot return a string arrayl");}
+		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("String param cannot return a double array");}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("String param cannot return a double array");}
+		void  GetParameterValue(Vec* pvec){ISSMERROR("String param cannot return a Vec");}
+		void  GetParameterValue(Mat* pmat){ISSMERROR("String param cannot return a Mat");}
+		char* GetParameterName(void);
+		void  SetMatlabField(mxArray* dataref);
+		/*}}}*/
+};
+#endif  /* _STRINGPARAM_H */
Index: /issm/trunk/src/c/objects/Pengrid.cpp
===================================================================
--- /issm/trunk/src/c/objects/Pengrid.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Pengrid.cpp	(revision 3673)
@@ -51,5 +51,5 @@
 }
 /*}}}*/
-/*FUNCTION Pengrid::Pengrid(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, DataSet* parameters, Inputs* pengrid_inputs) {{{1*/
+/*FUNCTION Pengrid::Pengrid(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, Parameters* parameters, Inputs* pengrid_inputs) {{{1*/
 Pengrid::Pengrid(int pengrid_id,Hook* pengrid_hnode, Hook* pengrid_helement,Hook* pengrid_hmatpar, Parameters* pengrid_parameters, Inputs* pengrid_inputs):
 	hnode(pengrid_hnode),
@@ -191,11 +191,6 @@
 }
 /*}}}1*/
-/*FUNCTION Pengrid::GetId {{{1*/
-int    Pengrid::GetId(void){ return id; }
-/*}}}1*/
-/*FUNCTION Pengrid::GetName {{{1*/
-char* Pengrid::GetName(void){
-	return "pengrid";
-}
+/*FUNCTION Pengrid::Id {{{1*/
+int    Pengrid::Id(void){ return id; }
 /*}}}1*/
 /*FUNCTION Pengrid::Marshall {{{1*/
@@ -371,5 +366,5 @@
 	meltingpoint=matpar->GetMeltingPoint();
 	beta=matpar->GetBeta();
-	parameters->FindParam(&stabilize_constraints,"stabilize_constraints");
+	parameters->FindParam(&stabilize_constraints,StabilizeConstraintsEnum);
 	
 	if(reset_penalties)zigzag_counter=0;
@@ -467,5 +462,5 @@
 	
 	/*recover parameters: */
-	parameters->FindParam(&penalty_offset,"penalty_offset");
+	parameters->FindParam(&penalty_offset,PenaltyOffsetEnum);
 
 	//Create elementary matrix: add penalty to contrain wb (wb=ub*db/dx+vb*db/dy)
@@ -515,5 +510,5 @@
 
 	/*recover parameters: */
-	parameters->FindParam(&penalty_offset,"penalty_offset");
+	parameters->FindParam(&penalty_offset,PenaltyOffsetEnum);
 
 	/*Get dof list: */
@@ -549,5 +544,5 @@
 
 	/*recover parameters: */
-	parameters->FindParam(&penalty_offset,"penalty_offset");
+	parameters->FindParam(&penalty_offset,PenaltyOffsetEnum);
 
 	/*Get dof list: */
@@ -625,6 +620,6 @@
 	penta->inputs->GetParameterValue(&temperature,node,TemperatureEnum);
 	inputs->GetParameterValue(&melting_offset,MeltingOffsetEnum);
-	parameters->FindParam(&dt,"dt");
-	parameters->FindParam(&penalty_offset,"penalty_offset");
+	parameters->FindParam(&dt,DtEnum);
+	parameters->FindParam(&penalty_offset,PenaltyOffsetEnum);
 
 	meltingpoint=matpar->GetMeltingPoint();
@@ -690,5 +685,5 @@
 	//First recover pressure  and penalty_offset
 	penta->inputs->GetParameterValue(&pressure,node,PressureEnum);
-	parameters->FindParam(&penalty_offset,"penalty_offset");
+	parameters->FindParam(&penalty_offset,PenaltyOffsetEnum);
 
 	//Compute pressure melting point
Index: /issm/trunk/src/c/objects/Pengrid.h
===================================================================
--- /issm/trunk/src/c/objects/Pengrid.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Pengrid.h	(revision 3673)
@@ -48,6 +48,5 @@
 		void  Echo();
 		int   Enum();
-		int   GetId(); 
-		char* GetName();
+		int   Id(); 
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
Index: /issm/trunk/src/c/objects/Penpair.cpp
===================================================================
--- /issm/trunk/src/c/objects/Penpair.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Penpair.cpp	(revision 3673)
@@ -170,11 +170,6 @@
 }
 /*}}}1*/
-/*FUNCTION Penpair::GetId {{{1*/
-int    Penpair::GetId(void){ return id; }
-/*}}}1*/
-/*FUNCTION Penpair::GetName {{{1*/
-char* Penpair::GetName(void){
-	return "penpair";
-}
+/*FUNCTION Penpair::Id {{{1*/
+int    Penpair::Id(void){ return id; }
 /*}}}1*/
 /*FUNCTION Penpair::MyRank {{{1*/
Index: /issm/trunk/src/c/objects/Penpair.h
===================================================================
--- /issm/trunk/src/c/objects/Penpair.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Penpair.h	(revision 3673)
@@ -33,8 +33,7 @@
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
-		char* GetName();
 		void  Demarshall(char** pmarshalled_dataset);
 		int   Enum();
-		int   GetId(); 
+		int   Id(); 
 		int   MyRank();
 		void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* vertices,DataSet* materials,Parameters* parameters);
Index: /issm/trunk/src/c/objects/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Penta.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Penta.cpp	(revision 3673)
@@ -41,5 +41,5 @@
 }
 /*}}}*/
-/*FUNCTION Penta::Penta(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, DataSet* parameters, Inputs* penta_inputs) {{{1*/
+/*FUNCTION Penta::Penta(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, Parameters* parameters, Inputs* penta_inputs) {{{1*/
 Penta::Penta(int penta_id,Hook* penta_hnodes, Hook* penta_hmatice, Hook* penta_hmatpar, Parameters* penta_parameters, Inputs* penta_inputs):
 	hnodes(penta_hnodes),
@@ -510,5 +510,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&stokesreconditioning,"stokesreconditioning");
+	this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
 	
 	if(!onbed){
@@ -900,5 +900,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&viscosity_overshoot,"viscosity_overshoot");
+	this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum);
 
 	/*If on water, skip stiffness: */
@@ -1144,5 +1144,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&stokesreconditioning,"stokesreconditioning");
+	this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
 
 	/* Get node coordinates and dof list: */
@@ -1665,7 +1665,7 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&dt,"dt");
-	this->parameters->FindParam(&artdiff,"art_diff");
-	this->parameters->FindParam(&epsvel,"epsvel");
+	this->parameters->FindParam(&dt,DtEnum);
+	this->parameters->FindParam(&artdiff,ArtDiffEnum);
+	this->parameters->FindParam(&epsvel,EpsVelEnum);
 
 	/* Get gaussian points and weights. Penta is an extrusion of a Tria, we therefore 
@@ -2164,5 +2164,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&stokesreconditioning,"stokesreconditioning");
+	this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
 
 	/*If on water, skip load: */
@@ -2613,5 +2613,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&dt,"dt");
+	this->parameters->FindParam(&dt,DtEnum);
 
 	/*If on water, skip: */
@@ -3368,6 +3368,6 @@
 }
 /*}}}*/
-/*FUNCTION GetId {{{1*/
-int    Penta::GetId(void){
+/*FUNCTION Id {{{1*/
+int    Penta::Id(void){
 	return id; 
 }
@@ -3709,9 +3709,4 @@
 }
 /*}}}*/
-/*FUNCTION GetName {{{1*/
-char* Penta::GetName(void){
-	return "penta";
-}
-/*}}}*/
 /*FUNCTION GetNodalFunctions {{{1*/
 void Penta::GetNodalFunctions(double* l1l6, double* gauss_coord){
Index: /issm/trunk/src/c/objects/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Penta.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Penta.h	(revision 3673)
@@ -20,4 +20,6 @@
 #include "./Matice.h"
 #include "./Tria.h"
+#include "../shared/Exceptions/exceptions.h"
+#include "../include/macros.h"
 #include "./Hook.h"
 #include "../ModelProcessorx/IoModel.h"
@@ -54,6 +56,5 @@
 		void  Echo();
 		int   Enum();
-		int   GetId(); 
-		char* GetName();
+		int   Id(); 
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
@@ -147,4 +148,5 @@
 		void  UpdateInputsBalancedthickness2( double* solution,int analysis_type,int sub_analysis_type);
 		void  UpdateInputsBalancedvelocities( double* solution,int analysis_type,int sub_analysis_type);
+		void AddInput(double value, int enum_type){ISSMERROR("not supporte yet!");}
 
 		/*}}}*/
Index: sm/trunk/src/c/objects/PentaVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/PentaVertexInput.cpp	(revision 3672)
+++ 	(revision )
@@ -1,144 +1,0 @@
-/*!\file PentaVertexInput.c
- * \brief: implementation of the PentaVertexInput object
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include "./PentaVertexInput.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "../include/typedefs.h"
-#include "../include/macros.h"
-
-/*Object constructors and destructor*/
-/*FUNCTION PentaVertexInput::PentaVertexInput(){{{1*/
-PentaVertexInput::PentaVertexInput(){
-	return;
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::PentaVertexInput(double* values){{{1*/
-PentaVertexInput::PentaVertexInput(int in_enum_type,double* in_values){
-
-	enum_type=in_enum_type;
-	values[0]=in_values[0];
-	values[1]=in_values[1];
-	values[2]=in_values[2];
-	values[3]=in_values[3];
-	values[4]=in_values[4];
-	values[5]=in_values[5];
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::~PentaVertexInput(){{{1*/
-PentaVertexInput::~PentaVertexInput(){
-	return;
-}
-/*}}}*/
-
-/*Object management*/
-/*FUNCTION PentaVertexInput::copy{{{1*/
-Object* PentaVertexInput::copy() {
-	
-	return new PentaVertexInput(this->enum_type,this->values);
-
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::DeepEcho{{{1*/
-void PentaVertexInput::DeepEcho(void){
-
-	printf("PentaVertexInput:\n");
-	printf("   enum: %i\n",this->enum_type);
-	printf("   %g|%g|%g|%g|%g|%g\n",this->values[0],this->values[1],this->values[2],this->values[3],this->values[4],this->values[5]);
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::Demarshall{{{1*/
-void  PentaVertexInput::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   i;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::Echo {{{1*/
-void PentaVertexInput::Echo(void){
-	this->DeepEcho();
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::Enum{{{1*/
-int PentaVertexInput::Enum(void){
-
-	return PentaVertexInputEnum;
-
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::EnumType{{{1*/
-int PentaVertexInput::EnumType(void){
-
-	return this->enum_type;
-
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::GetId{{{1*/
-int    PentaVertexInput::GetId(void){ return -1; }
-/*}}}*/
-/*FUNCTION PentaVertexInput::GetName{{{1*/
-char* PentaVertexInput::GetName(void){
-	return "pentavertexinput";
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::Marshall{{{1*/
-void  PentaVertexInput::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of PentaVertexInput: */
-	enum_type=PentaVertexInputEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	/*marshall PentaVertexInput data: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
-
-	*pmarshalled_dataset=marshalled_dataset;
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::MarshallSize{{{1*/
-int   PentaVertexInput::MarshallSize(){
-	
-	return sizeof(values)+
-		sizeof(enum_type)+
-		+sizeof(int); //sizeof(int) for enum type
-}
-/*}}}*/
-/*FUNCTION PentaVertexInput::MyRank{{{1*/
-int    PentaVertexInput::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
-}
-/*}}}*/
-
-/*Object functions*/
-
Index: sm/trunk/src/c/objects/PentaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/PentaVertexInput.h	(revision 3672)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*! \file PentaVertexInput.h 
- *  \brief: header file for triavertexinput object
- */
-
-
-#ifndef _PENTAVERTEXINPUT_H_
-#define _PENTAVERTEXINPUT_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Input.h"
-/*}}}*/
-
-class PentaVertexInput: public Input{
-
-	private: 
-		/*just hold 3 values for 3 vertices: */
-		int    enum_type;
-		double values[6];
-
-	public:
-
-		/*constructors, destructors: {{{1*/
-		PentaVertexInput();
-		PentaVertexInput(int enum_type,double* values);
-		~PentaVertexInput();
-		/*}}}*/
-		/*object management: {{{1*/
-		void  DeepEcho();
-		void  Echo();
-		int   GetId(); 
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		char* GetName();
-		void  Demarshall(char** pmarshalled_dataset);
-		int   Enum();
-		int   MyRank();
-		Object* copy();
-		int   EnumType();
-
-		/*}}}*/
-		/*numerics: {{{1*/
-		/*}}}*/
-
-};
-#endif  /* _PENTAVERTEXINPUT_H */
Index: /issm/trunk/src/c/objects/Result.cpp
===================================================================
--- /issm/trunk/src/c/objects/Result.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Result.cpp	(revision 3673)
@@ -234,11 +234,6 @@
 }
 /*}}}1*/
-/*FUNCTION Result::GetId {{{1*/
-int    Result::GetId(void){ return id; }
-/*}}}1*/
-/*FUNCTION Result::GetName {{{1*/
-char* Result::GetName(void){
-	return "result";
-}
+/*FUNCTION Result::Id {{{1*/
+int    Result::Id(void){ return id; }
 /*}}}1*/
 /*FUNCTION Result::GetStep {{{1*/
Index: /issm/trunk/src/c/objects/Result.h
===================================================================
--- /issm/trunk/src/c/objects/Result.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Result.h	(revision 3673)
@@ -36,9 +36,8 @@
 		void  Echo();
 		void  DeepEcho();
-		int   GetId(void); 
+		int   Id(void); 
 		int   MyRank(void);
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
-		char* GetName();
 		void  Demarshall(char** pmarshalled_dataset);
 		int   Enum();
Index: /issm/trunk/src/c/objects/Rgb.cpp
===================================================================
--- /issm/trunk/src/c/objects/Rgb.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Rgb.cpp	(revision 3673)
@@ -134,11 +134,6 @@
 }
 /*}}}1*/
-/*FUNCTION Rgb::GetId {{{1*/
-int    Rgb::GetId(void){ return id; }
-/*}}}1*/
-/*FUNCTION Rgb::GetName {{{1*/
-char* Rgb::GetName(void){
-	return "rgb";
-}
+/*FUNCTION Rgb::Id {{{1*/
+int    Rgb::Id(void){ return id; }
 /*}}}1*/
 /*FUNCTION Rgb::GetNodeId1{{{1*/
Index: /issm/trunk/src/c/objects/Rgb.h
===================================================================
--- /issm/trunk/src/c/objects/Rgb.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Rgb.h	(revision 3673)
@@ -30,8 +30,7 @@
 		void   Marshall(char** pmarshalled_dataset);
 		int    MarshallSize();
-		char*  GetName();
 		void   Demarshall(char** pmarshalled_dataset);
 		int    Enum();
-		int    GetId(); 
+		int    Id(); 
 		int    MyRank();
 
Index: /issm/trunk/src/c/objects/Riftfront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Riftfront.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Riftfront.cpp	(revision 3673)
@@ -41,5 +41,5 @@
 }
 /*}}}*/
-/*FUNCTION Riftfront::Riftfront(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, DataSet* parameters, Inputs* riftfront_inputs) {{{1*/
+/*FUNCTION Riftfront::Riftfront(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, Parameters* parameters, Inputs* riftfront_inputs) {{{1*/
 Riftfront::Riftfront(int riftfront_id,Hook* riftfront_hnodes, Hook* riftfront_hmatpar, Parameters* riftfront_parameters, Inputs* riftfront_inputs):
 	hnodes(riftfront_hnodes),
@@ -213,11 +213,6 @@
 }
 /*}}}1*/
-/*FUNCTION Riftfront::GetId {{{1*/
-int    Riftfront::GetId(void){ return id; }
-/*}}}1*/
-/*FUNCTION Riftfront::GetName {{{1*/
-char* Riftfront::GetName(void){
-	return "riftfront";
-}
+/*FUNCTION Riftfront::Id {{{1*/
+int    Riftfront::Id(void){ return id; }
 /*}}}1*/
 /*FUNCTION Riftfront::Marshall {{{1*/
@@ -358,5 +353,5 @@
 		this->fraction+=fractionincrement;
 		if (this->fraction>1)this->fraction=(double)1.0;
-		//printf("riftfront %i fraction: %g\n",this->GetId(),this->fraction);
+		//printf("riftfront %i fraction: %g\n",this->Id(),this->fraction);
 	}
 
@@ -373,5 +368,5 @@
 	this->active=activate;
 
-	//if ((penetration>0) & (this->active==1))printf("Riftfront %i wants to be released\n",GetId());
+	//if ((penetration>0) & (this->active==1))printf("Riftfront %i wants to be released\n",Id());
 
 	/*assign output pointer: */
@@ -504,5 +499,5 @@
 
 	/*recover id of penalty: */
-	row_id=this->GetId()-1; //c indexing, ids were matlab indexed
+	row_id=this->Id()-1; //c indexing, ids were matlab indexed
 	value=(double)this->fraction;
 
@@ -552,5 +547,5 @@
 
 	/*Get some parameters: */
-	this->parameters->FindParam(&penalty_offset,"penalty_offset");
+	this->parameters->FindParam(&penalty_offset,PenaltyOffsetEnum);
 	this->inputs->GetParameterValue(&friction,FrictionEnum);
 
Index: /issm/trunk/src/c/objects/Riftfront.h
===================================================================
--- /issm/trunk/src/c/objects/Riftfront.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Riftfront.h	(revision 3673)
@@ -57,6 +57,5 @@
 		void  Echo();
 		int   Enum();
-		int   GetId(); 
-		char* GetName();
+		int   Id(); 
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
Index: /issm/trunk/src/c/objects/Sing.cpp
===================================================================
--- /issm/trunk/src/c/objects/Sing.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Sing.cpp	(revision 3673)
@@ -451,6 +451,6 @@
 }
 /*}}}*/
-/*FUNCTION Sing::GetId {{{1*/
-int    Sing::GetId(void){ return id; }
+/*FUNCTION Sing::Id {{{1*/
+int    Sing::Id(void){ return id; }
 /*}}}*/
 /*FUNCTION Sing::GetMatPar {{{1*/
@@ -464,9 +464,4 @@
 
 	return matpar;
-}
-/*}}}*/
-/*FUNCTION Sing::GetName {{{1*/
-char* Sing::GetName(void){
-	return "sing";
 }
 /*}}}*/
Index: /issm/trunk/src/c/objects/Sing.h
===================================================================
--- /issm/trunk/src/c/objects/Sing.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Sing.h	(revision 3673)
@@ -13,4 +13,6 @@
 #include "./Matpar.h"
 #include "../ModelProcessorx/IoModel.h"
+#include "../include/macros.h"
+#include "../shared/Exceptions/exceptions.h"
 #include "./Hook.h"
 #include "../DataSet/Inputs.h"
@@ -48,6 +50,5 @@
 		void  Echo();
 		int   Enum();
-		int   GetId(); 
-		char* GetName();
+		int   Id(); 
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
@@ -83,4 +84,5 @@
 		double CostFunction(int,int);
 		double MassFlux(double* segment,double* ug);
+		void AddInput(double value, int enum_type){ISSMERROR("not supporte yet!");}
 		/*}}}*/
 
Index: sm/trunk/src/c/objects/SingVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/SingVertexInput.cpp	(revision 3672)
+++ 	(revision )
@@ -1,139 +1,0 @@
-/*!\file SingVertexInput.c
- * \brief: implementation of the SingVertexInput object
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include "./SingVertexInput.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "../include/typedefs.h"
-#include "../include/macros.h"
-
-/*Object constructors and destructor*/
-/*FUNCTION SingVertexInput::SingVertexInput(){{{1*/
-SingVertexInput::SingVertexInput(){
-	return;
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::SingVertexInput(double* values){{{1*/
-SingVertexInput::SingVertexInput(int in_enum_type,double in_value){
-
-	enum_type=in_enum_type;
-	value=in_value;
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::~SingVertexInput(){{{1*/
-SingVertexInput::~SingVertexInput(){
-	return;
-}
-/*}}}*/
-
-/*Object management*/
-/*FUNCTION SingVertexInput::copy{{{1*/
-Object* SingVertexInput::copy() {
-	
-	return new SingVertexInput(this->enum_type,this->value);
-
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::DeepEcho{{{1*/
-void SingVertexInput::DeepEcho(void){
-
-	printf("SingVertexInput:\n");
-	printf("   enum: %i\n",this->enum_type);
-	printf("   %g\n",this->value);
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::Demarshall{{{1*/
-void  SingVertexInput::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   i;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::Echo {{{1*/
-void SingVertexInput::Echo(void){
-	this->DeepEcho();
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::Enum{{{1*/
-int SingVertexInput::Enum(void){
-
-	return SingVertexInputEnum;
-
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::EnumType{{{1*/
-int SingVertexInput::EnumType(void){
-
-	return this->enum_type;
-
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::GetId{{{1*/
-int    SingVertexInput::GetId(void){ return -1; }
-/*}}}*/
-/*FUNCTION SingVertexInput::GetName{{{1*/
-char* SingVertexInput::GetName(void){
-	return "triavertexinput";
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::Marshall{{{1*/
-void  SingVertexInput::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of SingVertexInput: */
-	enum_type=SingVertexInputEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	/*marshall SingVertexInput data: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
-
-	*pmarshalled_dataset=marshalled_dataset;
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::MarshallSize{{{1*/
-int   SingVertexInput::MarshallSize(){
-	
-	return sizeof(value)+
-		sizeof(enum_type)+
-		+sizeof(int); //sizeof(int) for enum type
-}
-/*}}}*/
-/*FUNCTION SingVertexInput::MyRank{{{1*/
-int    SingVertexInput::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
-}
-/*}}}*/
-
-/*Object functions*/
-
Index: sm/trunk/src/c/objects/SingVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/SingVertexInput.h	(revision 3672)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*! \file SingVertexInput.h 
- *  \brief: header file for triavertexinput object
- */
-
-
-#ifndef _SINGVERTEXINPUT_H_
-#define _SINGVERTEXINPUT_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Input.h"
-/*}}}*/
-
-class SingVertexInput: public Input{
-
-	private: 
-		/*just hold 1 value for 1 vertex: */
-		int    enum_type;
-		double value;
-
-	public:
-
-		/*constructors, destructors: {{{1*/
-		SingVertexInput();
-		SingVertexInput(int enum_type,double value);
-		~SingVertexInput();
-		/*}}}*/
-		/*object management: {{{1*/
-		void  DeepEcho();
-		void  Echo();
-		int   GetId(); 
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		char* GetName();
-		void  Demarshall(char** pmarshalled_dataset);
-		int   Enum();
-		int   MyRank();
-		Object* copy();
-		int   EnumType();
-
-		/*}}}*/
-		/*numerics: {{{1*/
-		/*}}}*/
-
-};
-#endif  /* _SINGVERTEXINPUT_H */
Index: /issm/trunk/src/c/objects/SolPar.h
===================================================================
--- /issm/trunk/src/c/objects/SolPar.h	(revision 3672)
+++ /issm/trunk/src/c/objects/SolPar.h	(revision 3673)
@@ -32,9 +32,8 @@
 		void  Echo();
 		void  DeepEcho();
-		int   GetId(); 
+		int   Id(); 
 		int   MyRank();
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
-		char* GetName();
 		void  Demarshall(char** pmarshalled_dataset);
 		int   Enum();
Index: /issm/trunk/src/c/objects/Spc.cpp
===================================================================
--- /issm/trunk/src/c/objects/Spc.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Spc.cpp	(revision 3673)
@@ -139,11 +139,6 @@
 }
 /*}}}1*/
-/*FUNCTION Spc::GetId {{{1*/
-int    Spc::GetId(void){ return sid; }
-/*}}}1*/
-/*FUNCTION Spc::GetName {{{1*/
-char* Spc::GetName(void){
-	return "spc";
-}
+/*FUNCTION Spc::Id {{{1*/
+int    Spc::Id(void){ return sid; }
 /*}}}1*/
 /*FUNCTION Spc::GetNodeId {{{1*/
Index: /issm/trunk/src/c/objects/Spc.h
===================================================================
--- /issm/trunk/src/c/objects/Spc.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Spc.h	(revision 3673)
@@ -30,8 +30,7 @@
 		void   Marshall(char** pmarshalled_dataset);
 		int    MarshallSize();
-		char*  GetName();
 		void   Demarshall(char** pmarshalled_dataset);
 		int    Enum();
-		int    GetId(); 
+		int    Id(); 
 		int    MyRank();
 		void   DistributeNumDofs(int* numdofspernode,int analysis_type);
Index: /issm/trunk/src/c/objects/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Tria.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Tria.cpp	(revision 3673)
@@ -47,5 +47,5 @@
 }
 /*}}}*/
-/*FUNCTION Tria::Tria(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, DataSet* parameters, Inputs* tria_inputs) {{{1*/
+/*FUNCTION Tria::Tria(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, Parameters* parameters, Inputs* tria_inputs) {{{1*/
 Tria::Tria(int tria_id,Hook* tria_hnodes, Hook* tria_hmatice, Hook* tria_hmatpar, Parameters* tria_parameters, Inputs* tria_inputs):
 	hnodes(tria_hnodes),
@@ -597,6 +597,6 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&control_type,"control_type");
-	this->parameters->FindParam(&cm_noisedmp,"cm_noisedmp");
+	this->parameters->FindParam(&control_type,ControlTypeEnum);
+	this->parameters->FindParam(&cm_noisedmp,CmNoiseDmpEnum);
 
 	/* Get node coordinates and dof list: */
@@ -773,5 +773,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&artdiff,"artdiff");
+	this->parameters->FindParam(&artdiff,ArtDiffEnum);
 
 	//Create Artificial diffusivity once for all if requested
@@ -1045,5 +1045,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&artdiff,"artdiff");
+	this->parameters->FindParam(&artdiff,ArtDiffEnum);
 
 	/* Get node coordinates and dof list: */
@@ -1221,5 +1221,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&viscosity_overshoot,"viscosity_overshoot");
+	this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum);
 
 	/*First, if we are on water, return empty matrix: */
@@ -1763,6 +1763,6 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&dt,"dt");
-	this->parameters->FindParam(&artdiff,"artdiff");
+	this->parameters->FindParam(&dt,DtEnum);
+	this->parameters->FindParam(&artdiff,ArtDiffEnum);
 
 	/* Get node coordinates and dof list: */
@@ -1939,5 +1939,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&dt,"dt");
+	this->parameters->FindParam(&dt,DtEnum);
 
 	/* Get node coordinates and dof list: */
@@ -2147,5 +2147,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&dt,"dt");
+	this->parameters->FindParam(&dt,DtEnum);
 
 	/* Get node coordinates and dof list: */
@@ -2788,5 +2788,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&dt,"dt");
+	this->parameters->FindParam(&dt,DtEnum);
 
 	/* Get node coordinates and dof list: */
@@ -2877,5 +2877,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&dt,"dt");
+	this->parameters->FindParam(&dt,DtEnum);
 
 	/* Get node coordinates and dof list: */
@@ -3085,5 +3085,5 @@
 	
 	/*retrieve some solution parameters: */
-	this->parameters->FindParam(&dt,"dt");
+	this->parameters->FindParam(&dt,DtEnum);
 
 	/* Ice/ocean heat exchange flux on ice shelf base */
@@ -3201,5 +3201,5 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&dt,"dt");
+	this->parameters->FindParam(&dt,DtEnum);
 
 
@@ -3351,6 +3351,6 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&meanvel,"meanvel");
-	this->parameters->FindParam(&epsvel,"epsvel");
+	this->parameters->FindParam(&meanvel,MeanVelEnum);
+	this->parameters->FindParam(&epsvel,EpsVelEnum);
 
 	/* Get node coordinates and dof list: */
@@ -3790,6 +3790,6 @@
 }
 /*}}}*/
-/*FUNCTION Tria::GetId {{{1*/
-int    Tria::GetId(){ return id; }
+/*FUNCTION Tria::Id {{{1*/
+int    Tria::Id(){ return id; }
 /*}}}*/
 /*FUNCTION Tria::GetJacobian {{{1*/
@@ -3945,9 +3945,4 @@
 }
 /*}}}*/
-/*FUNCTION Tria::GetName {{{1*/
-char* Tria::GetName(void){
-	return "tria";
-}
-/*}}}*/
 /*FUNCTION Tria::GetNodalFunctions {{{1*/
 void Tria::GetNodalFunctions(double* l1l2l3, double* gauss_l1l2l3){
@@ -4226,9 +4221,9 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&cm_noisedmp,"cm_noisedmp");
-	this->parameters->FindParam(&cm_mindmp_value,"cm_mindmp_value");
-	this->parameters->FindParam(&cm_mindmp_slope,"cm_mindmp_slope");
-	this->parameters->FindParam(&cm_maxdmp_value,"cm_maxdmp_value");
-	this->parameters->FindParam(&cm_maxdmp_slope,"cm_maxdmp_slope");
+	this->parameters->FindParam(&cm_noisedmp,CmNoiseDmpEnum);
+	this->parameters->FindParam(&cm_mindmp_value,CmMinDmpValueEnum);
+	this->parameters->FindParam(&cm_mindmp_slope,CmMinDmpSlopeEnum);
+	this->parameters->FindParam(&cm_maxdmp_value,CmMaxDmpValueEnum);
+	this->parameters->FindParam(&cm_maxdmp_slope,CmMaxDmpSlopeEnum);
 
 	/* Get node coordinates and dof list: */
@@ -4394,9 +4389,10 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&cm_noisedmp,"cm_noisedmp");
-	this->parameters->FindParam(&cm_mindmp_value,"cm_mindmp_value");
-	this->parameters->FindParam(&cm_mindmp_slope,"cm_mindmp_slope");
-	this->parameters->FindParam(&cm_maxdmp_value,"cm_maxdmp_value");
-	this->parameters->FindParam(&cm_maxdmp_slope,"cm_maxdmp_slope");
+	this->parameters->FindParam(&cm_noisedmp,CmNoiseDmpEnum);
+	this->parameters->FindParam(&cm_mindmp_value,CmMinDmpValueEnum);
+	this->parameters->FindParam(&cm_mindmp_slope,CmMinDmpSlopeEnum);
+	this->parameters->FindParam(&cm_maxdmp_value,CmMaxDmpValueEnum);
+	this->parameters->FindParam(&cm_maxdmp_slope,CmMaxDmpSlopeEnum);
+
 
 	/*Get out if shelf*/
@@ -4600,9 +4596,9 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&cm_noisedmp,"cm_noisedmp");
-	this->parameters->FindParam(&cm_mindmp_value,"cm_mindmp_value");
-	this->parameters->FindParam(&cm_mindmp_slope,"cm_mindmp_slope");
-	this->parameters->FindParam(&cm_maxdmp_value,"cm_maxdmp_value");
-	this->parameters->FindParam(&cm_maxdmp_slope,"cm_maxdmp_slope");
+	this->parameters->FindParam(&cm_noisedmp,CmNoiseDmpEnum);
+	this->parameters->FindParam(&cm_mindmp_value,CmMinDmpValueEnum);
+	this->parameters->FindParam(&cm_mindmp_slope,CmMinDmpSlopeEnum);
+	this->parameters->FindParam(&cm_maxdmp_value,CmMaxDmpValueEnum);
+	this->parameters->FindParam(&cm_maxdmp_slope,CmMaxDmpSlopeEnum);
 
 	/*Get out if shelf*/
@@ -4906,6 +4902,6 @@
 
 	/*retrieve some parameters: */
-	this->parameters->FindParam(&meanvel,"meanvel");
-	this->parameters->FindParam(&epsvel,"epsvel");
+	this->parameters->FindParam(&meanvel,MeanVelEnum);
+	this->parameters->FindParam(&epsvel,EpsVelEnum);
 	
 	/* Compute Misfit at the 3 nodes
@@ -5084,7 +5080,12 @@
 	/*inputs: */
 	bool onwater;
+	int  fit;
 
 	/*retrieve inputs :*/
+	inputs->GetParameterValue(&fit,FitEnum);
 	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
+
+	/*If fit!=3, do not compute surface: */
+	if(fit!=3)return 0;
 
 	/*recover objects from hooks: */
Index: /issm/trunk/src/c/objects/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Tria.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Tria.h	(revision 3673)
@@ -10,4 +10,6 @@
 #include "./Object.h"
 #include "./Element.h"
+#include "../include/macros.h"
+#include "../shared/Exceptions/exceptions.h"
 #include "./Hook.h"
 #include "./Node.h"
@@ -45,6 +47,5 @@
 		void  Echo();
 		int   Enum();
-		int   GetId(); 
-		char* GetName();
+		int   Id(); 
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
@@ -126,4 +127,5 @@
 		void  UpdateInputsBalancedthickness2( double* solution,int analysis_type,int sub_analysis_type);
 		void  UpdateInputsBalancedvelocities( double* solution,int analysis_type,int sub_analysis_type);
+		void  AddInput(double value, int enum_type){ISSMERROR("not supporte yet!");}
 
 		/*}}}*/
Index: sm/trunk/src/c/objects/TriaVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/TriaVertexInput.cpp	(revision 3672)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/*!\file TriaVertexInput.c
- * \brief: implementation of the TriaVertexInput object
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include "./TriaVertexInput.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "../include/typedefs.h"
-#include "../include/macros.h"
-
-/*Object constructors and destructor*/
-/*FUNCTION TriaVertexInput::TriaVertexInput(){{{1*/
-TriaVertexInput::TriaVertexInput(){
-	return;
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::TriaVertexInput(double* values){{{1*/
-TriaVertexInput::TriaVertexInput(int in_enum_type,double* in_values){
-
-	enum_type=in_enum_type;
-	values[0]=in_values[0];
-	values[1]=in_values[1];
-	values[2]=in_values[2];
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::~TriaVertexInput(){{{1*/
-TriaVertexInput::~TriaVertexInput(){
-	return;
-}
-/*}}}*/
-
-/*Object management*/
-/*FUNCTION TriaVertexInput::copy{{{1*/
-Object* TriaVertexInput::copy() {
-	
-	return new TriaVertexInput(this->enum_type,this->values);
-
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::DeepEcho{{{1*/
-void TriaVertexInput::DeepEcho(void){
-
-	printf("TriaVertexInput:\n");
-	printf("   enum: %i\n",this->enum_type);
-	printf("   %g|%g|%g\n",this->values[0],this->values[1],this->values[2]);
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::Demarshall{{{1*/
-void  TriaVertexInput::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   i;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::Echo {{{1*/
-void TriaVertexInput::Echo(void){
-	this->DeepEcho();
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::Enum{{{1*/
-int TriaVertexInput::Enum(void){
-
-	return TriaVertexInputEnum;
-
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::EnumType{{{1*/
-int TriaVertexInput::EnumType(void){
-
-	return this->enum_type;
-
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::GetId{{{1*/
-int    TriaVertexInput::GetId(void){ return -1; }
-/*}}}*/
-/*FUNCTION TriaVertexInput::GetName{{{1*/
-char* TriaVertexInput::GetName(void){
-	return "triavertexinput";
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::Marshall{{{1*/
-void  TriaVertexInput::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of TriaVertexInput: */
-	enum_type=TriaVertexInputEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	/*marshall TriaVertexInput data: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
-
-	*pmarshalled_dataset=marshalled_dataset;
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::MarshallSize{{{1*/
-int   TriaVertexInput::MarshallSize(){
-	
-	return sizeof(values)+
-		sizeof(enum_type)+
-		+sizeof(int); //sizeof(int) for enum type
-}
-/*}}}*/
-/*FUNCTION TriaVertexInput::MyRank{{{1*/
-int    TriaVertexInput::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
-}
-/*}}}*/
-
-/*Object functions*/
-
Index: sm/trunk/src/c/objects/TriaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/TriaVertexInput.h	(revision 3672)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*! \file TriaVertexInput.h 
- *  \brief: header file for triavertexinput object
- */
-
-
-#ifndef _TRIAVERTEXINPUT_H_
-#define _TRIAVERTEXINPUT_H_
-
-/*Headers:*/
-/*{{{1*/
-#include "./Input.h"
-/*}}}*/
-
-class TriaVertexInput: public Input{
-
-	private: 
-		/*just hold 3 values for 3 vertices: */
-		int    enum_type;
-		double values[3];
-
-	public:
-
-		/*constructors, destructors: {{{1*/
-		TriaVertexInput();
-		TriaVertexInput(int enum_type,double* values);
-		~TriaVertexInput();
-		/*}}}*/
-		/*object management: {{{1*/
-		void  DeepEcho();
-		void  Echo();
-		int   GetId(); 
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		char* GetName();
-		void  Demarshall(char** pmarshalled_dataset);
-		int   Enum();
-		int   MyRank();
-		Object* copy();
-		int   EnumType();
-
-		/*}}}*/
-		/*numerics: {{{1*/
-		/*}}}*/
-
-};
-#endif  /* _TRIAVERTEXINPUT_H */
Index: /issm/trunk/src/c/objects/Vertex.cpp
===================================================================
--- /issm/trunk/src/c/objects/Vertex.cpp	(revision 3672)
+++ /issm/trunk/src/c/objects/Vertex.cpp	(revision 3673)
@@ -120,11 +120,6 @@
 }
 /*}}}*/
-/*FUNCTION GetId{{{2*/
-int    Vertex::GetId(void){ return id; }
-/*}}}*/
-/*FUNCTION GetName{{{2*/
-char* Vertex::GetName(void){
-	return "node";
-}
+/*FUNCTION Id{{{2*/
+int    Vertex::Id(void){ return id; }
 /*}}}*/
 /*FUNCTION Marshall {{{2*/
Index: /issm/trunk/src/c/objects/Vertex.h
===================================================================
--- /issm/trunk/src/c/objects/Vertex.h	(revision 3672)
+++ /issm/trunk/src/c/objects/Vertex.h	(revision 3673)
@@ -43,6 +43,5 @@
 		void  Echo();
 		int   Enum();
-		int   GetId(void); 
-		char* GetName();
+		int   Id(void); 
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
Index: /issm/trunk/src/c/objects/objects.h
===================================================================
--- /issm/trunk/src/c/objects/objects.h	(revision 3672)
+++ /issm/trunk/src/c/objects/objects.h	(revision 3673)
@@ -27,4 +27,5 @@
 #include "./Numericalflux.h"
 #include "./Param.h"
+#include "./DoubleParam.h"
 #include "./Element.h" 
 #include "./NodeSets.h"
@@ -33,5 +34,4 @@
 #include "./TriaVertexInput.h"
 #include "./Vertex.h"
-#include "./Numpar.h"
 #include "./BoolInput.h"
 #include "./IntInput.h"
Index: /issm/trunk/src/c/parallel/convergence.cpp
===================================================================
--- /issm/trunk/src/c/parallel/convergence.cpp	(revision 3672)
+++ /issm/trunk/src/c/parallel/convergence.cpp	(revision 3673)
@@ -6,5 +6,5 @@
 #include "../issm.h"
 
-void convergence(int* pconverged, Mat Kff,Vec pf,Vec uf,Vec old_uf,DataSet* 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 3672)
+++ /issm/trunk/src/c/parallel/diagnostic.cpp	(revision 3673)
@@ -32,5 +32,4 @@
 	Result*  result=NULL;
 	
-	ParameterInputs* inputs=NULL;
 	double waitonlock=0;
 	int    numberofnodes;
@@ -41,5 +40,5 @@
 	Param*  param=NULL;
 	int      count;
-	DataSet* parameters=NULL;
+	Parameters* parameters=NULL;
 
 	/*time*/
Index: /issm/trunk/src/c/parallel/parallel.h
===================================================================
--- /issm/trunk/src/c/parallel/parallel.h	(revision 3672)
+++ /issm/trunk/src/c/parallel/parallel.h	(revision 3673)
@@ -30,5 +30,5 @@
 void diagnostic_core_nonlinear(Vec* pug,Mat* pK_ff0,Mat* pK_fs0, DataSet* loads, FemModel* fem,int analysis_type,int sub_analysis_type);
 void diagnostic_core_linear(Vec* ppg,FemModel* fem,int  analysis_type,int sub_analysis_type);
-void convergence(int* pconverged, Mat K_ff,Vec p_f,Vec u_f,Vec u_f_old,DataSet* parameters);
+void convergence(int* pconverged, Mat K_ff,Vec p_f,Vec u_f,Vec u_f_old,Parameters* parameters);
 
 void transient_core(DataSet* results,Model* model);
Index: /issm/trunk/src/c/shared/Elements/ResolvePointers.cpp
===================================================================
--- /issm/trunk/src/c/shared/Elements/ResolvePointers.cpp	(revision 3672)
+++ /issm/trunk/src/c/shared/Elements/ResolvePointers.cpp	(revision 3673)
@@ -30,5 +30,5 @@
 		/*Check whether existing objects are correct: */
 		if(objects[i]){
-			if(objects[i]->GetId()==object_ids[i]) continue; //this node is good.
+			if(objects[i]->Id()==object_ids[i]) continue; //this node is good.
 			else objects[i]=NULL; //this node was incorrect, reset it.
 		}
@@ -39,5 +39,5 @@
 			 * we are good: */
 			object=(Object*)dataset->GetObjectByOffset(object_offsets[i]);
-			if (object->GetId()==object_ids[i]){
+			if (object->Id()==object_ids[i]){
 				objects[i]=object;
 				continue;
@@ -50,5 +50,5 @@
 			objects[i]=(Object*)dataset->GetObjectById(object_offsets+i,object_ids[i]); //remember the offset for later on.
 			/*check the id is correct!: */
-			if (objects[i]->GetId()!=object_ids[i])ISSMERROR("%s%i%s%i%s"," wrong id: ",objects[i]->GetId()," vs ",object_ids[i],"  in resolved pointer!");
+			if (objects[i]->Id()!=object_ids[i])ISSMERROR("%s%i%s%i%s"," wrong id: ",objects[i]->Id()," vs ",object_ids[i],"  in resolved pointer!");
 		}
 	}
Index: /issm/trunk/src/c/shared/Numerics/OptFunc.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/OptFunc.cpp	(revision 3672)
+++ /issm/trunk/src/c/shared/Numerics/OptFunc.cpp	(revision 3673)
@@ -20,5 +20,5 @@
 	double J;
 
-	mxArray*   inputs[8];
+	mxArray*   inputs[7];
 	mxArray*   psearch_scalar=NULL;
 	mxArray*   mxJ=NULL;
@@ -27,5 +27,4 @@
 	inputs[0]=psearch_scalar;
 	inputs[1]=optargs->models;
-	inputs[2]=optargs->inputs;
 	inputs[3]=optargs->param_g;
 	inputs[4]=optargs->grad_g;
Index: /issm/trunk/src/c/shared/Numerics/numerics.h
===================================================================
--- /issm/trunk/src/c/shared/Numerics/numerics.h	(revision 3672)
+++ /issm/trunk/src/c/shared/Numerics/numerics.h	(revision 3673)
@@ -8,5 +8,6 @@
 #include "./GaussPoints.h"
 #include "./isnan.h"
-#include "../../objects/objects.h"
+#include "../../objects/OptArgs.h"
+#include "../../objects/OptPars.h"
 
 double min(double a,double b);
