Index: /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.cpp
===================================================================
--- /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.cpp	(revision 3908)
+++ /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.cpp	(revision 3908)
@@ -0,0 +1,47 @@
+/*!\file SpcNodesx
+ * \brief: establish single point constraints on all grids, as well as constraints vector.
+ */
+
+#include "./SpcNodesx.h"
+
+#include "../shared/shared.h"
+#include "../include/include.h"
+#include "../toolkits/toolkits.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+void SpcNodesx( DofVec** pyg, DataSet* nodes,DataSet* constraints){
+
+	int i;
+	int numberofdofs;
+	int gsize;
+
+	/*output: */
+	DofVec* yg=NULL;
+
+	/*First, recover number of dofs from nodes: */
+	numberofdofs=nodes->NumberOfDofs();
+
+	if(numberofdofs){
+		
+		/*Allocate dofvec: */
+		yg=new DofVec("yg");
+		yg->numdofs=numberofdofs;
+
+		/*Allocate yg: */
+		yg->vector=NewVec(numberofdofs);
+
+		/*Now, go through constraints, and update the nodes and the constraint vector at the same time: */
+		constraints->SetupSpcs(nodes,yg->vector);
+
+		/*Specify numentries: */
+		VecGetSize(yg->vector,&gsize);
+		yg->numentries=(int)gsize/yg->numdofs;
+	}
+	else{
+		/*Allocate dofvec: */
+		yg=new DofVec("yg");
+	}
+
+	/*Assign output pointers: */
+	*pyg=yg;
+}
Index: /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.h
===================================================================
--- /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.h	(revision 3908)
+++ /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.h	(revision 3908)
@@ -0,0 +1,16 @@
+/*!\file:  SpcNodesx.h
+ * \brief header file for node single point constraints
+ */ 
+
+#ifndef _SPCNODESX_H
+#define _SPCNODESX_H
+
+#include "../objects/objects.h"
+#include "../DataSet/DataSet.h"
+#include "../toolkits/toolkits.h"
+
+/* local prototypes: */
+void SpcNodesx( DofVec** pyg, DataSet* nodesin,DataSet* constraints);
+
+#endif  /* _SPCNODESX_H */
+
Index: /issm/trunk/src/c/modules/SplitSolutionVectorx/SplitSolutionVectorx.cpp
===================================================================
--- /issm/trunk/src/c/modules/SplitSolutionVectorx/SplitSolutionVectorx.cpp	(revision 3908)
+++ /issm/trunk/src/c/modules/SplitSolutionVectorx/SplitSolutionVectorx.cpp	(revision 3908)
@@ -0,0 +1,48 @@
+/*!\file SplitSolutionVectorx
+ */
+
+#include "./SplitSolutionVectorx.h"
+#include "../shared/shared.h"
+
+void SplitSolutionVectorx(Vec u_g,int numberofnodes,int numberofdofs, ...){
+	
+	/*http://www.dreamincode.net/forums/topic/79104-variadic-functions-or-how-printf-works */
+
+	/*Intermediary*/
+	va_list  outputlist;
+	double*  u_g_serial=NULL;
+	double** pvector;
+	int     i,count;
+
+	/*Serialize vector and allocate once for all*/
+	VecToMPISerial(&u_g_serial,u_g);
+
+	/* va_start() takes the arg list type we just declared, as well
+	as the last argument in this function's definition, ie. 'int numberofdofs'*/
+	va_start(outputlist,numberofdofs);
+
+	/*Loop over the arguments*/
+	count=0;
+	while (count<numberofdofs){
+		/* va_arg() takes the arg list from above, and the type
+		the argument is supposed to be and then (hopefully) returns it*/
+		pvector=va_arg(outputlist,double**);
+
+		//continue if the pointer is NULL (output not requested)
+		if (pvector==NULL) continue;
+
+		/*Dynamically allocate single dof vector*/
+		double* vector=NULL;
+		vector=(double*)xmalloc(numberofnodes*sizeof(double));
+
+		/*Fill vector*/
+		for (i=0;i<numberofnodes;i++) vector[i]=u_g_serial[i*numberofdofs+count];
+
+		/*Assign vector*/
+		*pvector=vector;
+
+		/*update counter*/
+		count++;
+	}
+	va_end (outputlist);
+}
Index: /issm/trunk/src/c/modules/SplitSolutionVectorx/SplitSolutionVectorx.h
===================================================================
--- /issm/trunk/src/c/modules/SplitSolutionVectorx/SplitSolutionVectorx.h	(revision 3908)
+++ /issm/trunk/src/c/modules/SplitSolutionVectorx/SplitSolutionVectorx.h	(revision 3908)
@@ -0,0 +1,19 @@
+/*!\file:  SplitSolutionVectorx.h
+ */ 
+
+#ifndef _SPLITSOLUTIONVECTORX_H
+#define _SPLITSOLUTIONVECTORX_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include <stdarg.h>
+#include "../toolkits/toolkits.h"
+
+void SplitSolutionVectorx(Vec u_g,int numberofnodes,int numberofdofs, ...);
+
+#endif  /* _SPLITSOLUTIONVECTORX_H */
+
Index: /issm/trunk/src/c/modules/SurfaceAreax/SurfaceAreax.cpp
===================================================================
--- /issm/trunk/src/c/modules/SurfaceAreax/SurfaceAreax.cpp	(revision 3908)
+++ /issm/trunk/src/c/modules/SurfaceAreax/SurfaceAreax.cpp	(revision 3908)
@@ -0,0 +1,33 @@
+/*!\file SurfaceAreax
+ * \brief: compute Surface area
+ */
+
+#include "./SurfaceAreax.h"
+
+#include "../shared/shared.h"
+#include "../include/include.h"
+#include "../toolkits/toolkits.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+void SurfaceAreax( double* pS, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials,Parameters* parameters,
+			int analysis_type,int sub_analysis_type){
+	
+	/*output: */
+	double S;
+	double S_sum;
+	
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	/*Compute gradients: */
+	elements->SurfaceArea(&S,analysis_type,sub_analysis_type);
+
+	/*Sum all J from all cpus of the cluster:*/
+	MPI_Reduce (&S,&S_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+	MPI_Bcast(&S_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+	S=S_sum;
+
+	/*Assign output pointers: */
+	*pS=S;
+}
Index: /issm/trunk/src/c/modules/SurfaceAreax/SurfaceAreax.h
===================================================================
--- /issm/trunk/src/c/modules/SurfaceAreax/SurfaceAreax.h	(revision 3908)
+++ /issm/trunk/src/c/modules/SurfaceAreax/SurfaceAreax.h	(revision 3908)
@@ -0,0 +1,16 @@
+/*!\file:  SurfaceAreax.h
+ * \brief header file for ...
+ */ 
+
+#ifndef _SURFACEAREAX_H
+#define _SURFACEAREAX_H
+
+#include "../objects/objects.h"
+#include "../DataSet/DataSet.h"
+
+/* local prototypes: */
+void SurfaceAreax( double* pS, DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters, 
+			int analysis_type,int sub_analysis_type);
+
+#endif  /* _SURFACEAREAX_H */
+
Index: /issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
===================================================================
--- /issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 3908)
+++ /issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 3908)
@@ -0,0 +1,66 @@
+/*!\file SystemMatricesx
+ * \brief: create system matrices (stiffness matrix, loads vector)
+ */
+
+#include "./SystemMatricesx.h"
+
+#include "../shared/shared.h"
+#include "../include/include.h"
+#include "../toolkits/toolkits.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+void SystemMatricesx(Mat* pKgg, Vec* ppg,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, Parameters* parameters,
+		int kflag,int pflag,int analysis_type,int sub_analysis_type){
+	
+	extern int num_procs;
+	extern int my_rank;
+	
+	/*intermediary: */
+	int gsize;
+	int connectivity;
+	int numberofdofspernode;
+	
+	/*output: */
+	Mat Kgg=NULL;
+	Vec pg=NULL;
+
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	nodes->Configure(elements,loads, nodes,vertices, materials,parameters);
+	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	/*Recover parameters: */
+	parameters->FindParam(&connectivity,ConnectivityEnum);
+	parameters->FindParam(&numberofdofspernode,NumberOfDofsPerNodeEnum);
+
+	/*Get size of matrix: */
+	gsize=nodes->NumberOfDofs();
+
+	/*Allocate Kgg and pg: */
+	if(kflag)Kgg=NewMat(gsize,gsize,NULL,&connectivity,&numberofdofspernode);
+	if(pflag)pg=NewVec(gsize);
+
+	/*Fill stiffness matrix and right hand side vector, from elements: */
+	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,analysis_type,sub_analysis_type);
+	if(pflag)loads->CreatePVector(pg,analysis_type,sub_analysis_type);
+
+	/*Assemble matrices: */
+	if(kflag){
+		MatAssemblyBegin(Kgg,MAT_FINAL_ASSEMBLY);
+		MatAssemblyEnd(Kgg,MAT_FINAL_ASSEMBLY);
+		MatCompress(Kgg);
+	}
+	if(pflag){
+		VecAssemblyBegin(pg);
+		VecAssemblyEnd(pg);
+	}
+	
+	/*Assign output pointers: */
+	*pKgg=Kgg;
+	*ppg=pg;
+}
Index: /issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.h
===================================================================
--- /issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.h	(revision 3908)
+++ /issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.h	(revision 3908)
@@ -0,0 +1,16 @@
+/*!\file:  SystemMatricesx.h
+ * \brief header file for degree of freedoms distribution routines.
+ */ 
+
+#ifndef _SYSTEMMATRICESX_H
+#define _SYSTEMMATRICESX_H
+
+#include "../DataSet/DataSet.h"
+#include "../objects/objects.h"
+
+/* local prototypes: */
+void SystemMatricesx(Mat* pKgg, Vec* ppg,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, Parameters* parameters,
+		int kflag,int pflag,int analysis_type,int sub_analysis_type); 
+
+#endif  /* _SYSTEMMATRICESX_H */
+
Index: /issm/trunk/src/c/modules/UpdateGeometryx/UpdateGeometryx.cpp
===================================================================
--- /issm/trunk/src/c/modules/UpdateGeometryx/UpdateGeometryx.cpp	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateGeometryx/UpdateGeometryx.cpp	(revision 3908)
@@ -0,0 +1,122 @@
+/*!\file UpdateGeometryx
+ * \brief: update geometry node by node
+ */
+
+#include "./UpdateGeometryx.h"
+
+#include "../shared/shared.h"
+#include "../include/include.h"
+#include "../toolkits/toolkits.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+#include "../DataSet/DataSet.h"
+
+void UpdateGeometryx(Vec* poutthickness,Vec* poutbed,Vec* poutsurface, 
+		DataSet* elements, DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,
+		Vec vec_newthickness,Vec vec_bed,Vec vec_surface){
+
+	int i;
+	int dof;
+
+	/*serialized input: */
+	double* newthickness=NULL;
+	double* bed=NULL;
+	double* surface=NULL;
+
+	/*objects: */
+	Node* node=NULL;
+	Object* object=NULL;
+	Matpar* matpar=NULL;
+
+	/*parameters: */
+	double h,b,s;
+	double rho_ice,rho_water;
+
+	/*output: */
+	Vec outthickness=NULL;
+	Vec outbed=NULL;
+	Vec outsurface=NULL;
+
+	/*Duplicate inputs to outputs, do not copy values!: */
+	VecDuplicate(vec_newthickness,&outthickness);
+	VecDuplicate(vec_bed,&outbed);
+	VecDuplicate(vec_surface,&outsurface);
+
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	nodes->Configure(elements,loads, nodes,vertices, materials,parameters);
+	materials->Configure(elements, loads, nodes,vertices, materials,parameters);
+	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	/*Serialize inputs :*/
+	VecToMPISerial(&newthickness,vec_newthickness);
+	VecToMPISerial(&bed,vec_bed);
+	VecToMPISerial(&surface,vec_surface);
+
+	/*First, find the matpar object in materials: */
+	for(i=0;i<materials->Size();i++){
+		Object* object=materials->GetObjectByOffset(i);
+		if  (object->Enum()==MatparEnum){
+			matpar=(Matpar*)object;
+			break;
+		}
+	}
+
+	/*recover material parameters: */
+	rho_ice=matpar->GetRhoIce();
+	rho_water=matpar->GetRhoWater();
+
+	/*Go through nodes and for each node, update the thickness, bed and surface, using the 
+	 * new thickness computed in the prognostic_core part of the transient solution sequence: */
+
+	for(i=0;i<nodes->Size();i++){
+
+		/*get i'th node: */
+		node=(Node*)nodes->GetObjectByOffset(i);
+
+		/*first, recover thickness, surface and bed for this node: */
+		dof=node->GetDofList1();
+		h=newthickness[dof];
+		s=surface[dof];
+		b=bed[dof];
+
+		//First, check that thickness is >0
+		if(h<0)h=10; 
+
+		//For grids on ice sheet, the new bed remains the same, the new surface becomes bed+new_thickness. 
+		if (node->IsOnSheet()){
+			s=b+h;
+		}
+
+		//For grids on ice shelt, we have hydrostatic equilibrium (for now)
+		if (node->IsOnShelf()){
+			b=-rho_ice/rho_water*h;
+			s=(1-rho_ice/rho_water)*h;
+		}
+
+		/*Ok, plug values of thickness, surafce and bed into our outputs: */
+		VecSetValues(outthickness,1,&dof,&h,INSERT_VALUES);
+		VecSetValues(outbed,1,&dof,&b,INSERT_VALUES);
+		VecSetValues(outsurface,1,&dof,&s,INSERT_VALUES);
+	}
+
+	/*Assemble vectors: */
+	VecAssemblyBegin(outthickness);
+	VecAssemblyEnd(outthickness);
+
+	VecAssemblyBegin(outbed);
+	VecAssemblyEnd(outbed);
+
+	VecAssemblyBegin(outsurface);
+	VecAssemblyEnd(outsurface);
+
+	/*Free ressources:*/
+	xfree((void**)&newthickness);
+	xfree((void**)&bed);
+	xfree((void**)&surface);
+	
+	/*Assign output pointers: */
+	*poutthickness=outthickness;
+	*poutbed=outbed;
+	*poutsurface=outsurface;
+}
Index: /issm/trunk/src/c/modules/UpdateGeometryx/UpdateGeometryx.h
===================================================================
--- /issm/trunk/src/c/modules/UpdateGeometryx/UpdateGeometryx.h	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateGeometryx/UpdateGeometryx.h	(revision 3908)
@@ -0,0 +1,17 @@
+/*!\file:  UpdateGeometryx.h
+ * \brief header file for updating geometry
+ */ 
+
+#ifndef _UPDATEGEOMETRYX_H
+#define _UPDATEGEOMETRYX_H
+
+#include "../DataSet/DataSet.h"
+#include "../objects/objects.h"
+
+/* local prototypes: */
+void UpdateGeometryx(Vec* poutthickness,Vec* poutbed,Vec* poutsurface, 
+		DataSet* elements, DataSet* nodes,DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,
+		Vec newthickness,Vec bed,Vec surface);
+
+#endif  /* _UPDATEGEOMETRYX_H */
+
Index: /issm/trunk/src/c/modules/UpdateInputsFromConstantx/UpdateInputsFromConstantx.cpp
===================================================================
--- /issm/trunk/src/c/modules/UpdateInputsFromConstantx/UpdateInputsFromConstantx.cpp	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateInputsFromConstantx/UpdateInputsFromConstantx.cpp	(revision 3908)
@@ -0,0 +1,22 @@
+/*!\file UpdateInputsFromConstantx
+ * \brief: update datasets using  parameter inputs
+ */
+
+#include "./UpdateInputsFromConstantx.h"
+#include "../shared/shared.h"
+#include "../include/include.h"
+#include "../toolkits/toolkits.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+void UpdateInputsFromConstantx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,double constant, int name){
+
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
+	nodes->Configure(elements, loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+	
+	/*Elements drive the update: */
+	elements->UpdateInputsFromConstant(constant,name);
+	loads->UpdateInputsFromConstant(constant,name);
+}
Index: /issm/trunk/src/c/modules/UpdateInputsFromConstantx/UpdateInputsFromConstantx.h
===================================================================
--- /issm/trunk/src/c/modules/UpdateInputsFromConstantx/UpdateInputsFromConstantx.h	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateInputsFromConstantx/UpdateInputsFromConstantx.h	(revision 3908)
@@ -0,0 +1,15 @@
+/*!\file:  UpdateInputsFromConstantx.h
+ * \brief header file for updating datasets from inputs
+ */ 
+
+#ifndef _UPDATEINPUTSFROMCONSTANTXX_H
+#define _UPDATEINPUTSFROMCONSTANTXX_H
+
+#include "../objects/objects.h"
+#include "../DataSet/DataSet.h"
+
+/* local prototypes: */
+void		UpdateInputsFromConstantx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters, double constant, int name);
+
+#endif  /* _UPDATEINPUTSFROMCONSTANTXX_H */
+
Index: /issm/trunk/src/c/modules/UpdateInputsFromSolutionx/UpdateInputsFromSolutionx.cpp
===================================================================
--- /issm/trunk/src/c/modules/UpdateInputsFromSolutionx/UpdateInputsFromSolutionx.cpp	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateInputsFromSolutionx/UpdateInputsFromSolutionx.cpp	(revision 3908)
@@ -0,0 +1,31 @@
+/*!\file UpdateInputsFromSolutionx
+ * \brief: update datasets using  parameter inputs
+ */
+
+#include "./UpdateInputsFromSolutionx.h"
+#include "../shared/shared.h"
+#include "../include/include.h"
+#include "../toolkits/toolkits.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+void UpdateInputsFromSolutionx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,Vec solution, int analysis_type, int sub_analysis_type){
+
+	double* serial_solution=NULL;
+
+	/*Serialize solution, so that elements can index into it on every CPU: */
+	VecToMPISerial(&serial_solution,solution);
+
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
+	nodes->Configure(elements, loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	
+	/*Elements drive the update: */
+	elements->UpdateInputsFromSolution(serial_solution,analysis_type,sub_analysis_type);
+
+	/*Free ressources:*/
+	xfree((void**)&serial_solution);
+
+}
Index: /issm/trunk/src/c/modules/UpdateInputsFromSolutionx/UpdateInputsFromSolutionx.h
===================================================================
--- /issm/trunk/src/c/modules/UpdateInputsFromSolutionx/UpdateInputsFromSolutionx.h	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateInputsFromSolutionx/UpdateInputsFromSolutionx.h	(revision 3908)
@@ -0,0 +1,15 @@
+/*!\file:  UpdateInputsFromSolutionx.h
+ * \brief header file for updating datasets from inputs
+ */ 
+
+#ifndef _UPDATEINPUTSFROMSOLUTIONXX_H
+#define _UPDATEINPUTSFROMSOLUTIONXX_H
+
+#include "../objects/objects.h"
+#include "../DataSet/DataSet.h"
+
+/* local prototypes: */
+void		UpdateInputsFromSolutionx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,Vec solution, int analysis_type, int sub_analysis_type);
+
+#endif  /* _UPDATEINPUTSFROMSOLUTIONXX_H */
+
Index: /issm/trunk/src/c/modules/UpdateInputsFromVectorx/UpdateInputsFromVectorx.cpp
===================================================================
--- /issm/trunk/src/c/modules/UpdateInputsFromVectorx/UpdateInputsFromVectorx.cpp	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateInputsFromVectorx/UpdateInputsFromVectorx.cpp	(revision 3908)
@@ -0,0 +1,76 @@
+/*!\file UpdateInputsFromVectorx
+ * \brief: update datasets using  parameter inputs
+ */
+
+#include "./UpdateInputsFromVectorx.h"
+#include "../shared/shared.h"
+#include "../include/include.h"
+#include "../toolkits/toolkits.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,Vec vector, int NameEnum, int TypeEnum){
+
+	double* serial_vector=NULL;
+
+	VecToMPISerial(&serial_vector,vector);
+
+	UpdateInputsFromVectorx( elements,nodes, vertices, loads, materials, parameters,serial_vector,NameEnum, TypeEnum);
+
+	/*Free ressources:*/
+	xfree((void**)&serial_vector);
+}
+
+	
+void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,double* vector, int NameEnum, int TypeEnum){
+
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
+	nodes->Configure(elements, loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	/*Update elements, nodes, loads and materials from inputs: */
+	elements->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	nodes->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	vertices->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	loads->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	materials->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	parameters->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+
+}
+
+void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,int* vector, int NameEnum, int TypeEnum){
+
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
+	nodes->Configure(elements, loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	/*Update elements, nodes, loads and materials from inputs: */
+	elements->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	nodes->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	vertices->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	loads->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	materials->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	parameters->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+
+}
+
+void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,bool* vector, int NameEnum, int TypeEnum){
+
+	/*First, get elements and loads configured: */
+	elements->Configure(elements,loads, nodes,vertices, materials,parameters);
+	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
+	nodes->Configure(elements, loads, nodes,vertices, materials,parameters);
+	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	/*Update elements, nodes, loads and materials from inputs: */
+	elements->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	nodes->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	vertices->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	loads->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	materials->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+	parameters->UpdateInputsFromVector(vector,NameEnum,TypeEnum);
+
+}
Index: /issm/trunk/src/c/modules/UpdateInputsFromVectorx/UpdateInputsFromVectorx.h
===================================================================
--- /issm/trunk/src/c/modules/UpdateInputsFromVectorx/UpdateInputsFromVectorx.h	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateInputsFromVectorx/UpdateInputsFromVectorx.h	(revision 3908)
@@ -0,0 +1,18 @@
+/*!\file:  UpdateInputsFromVectorx.h
+ * \brief header file for updating datasets from inputs
+ */ 
+
+#ifndef _UPDATEINPUTSFROMVECTORXX_H
+#define _UPDATEINPUTSFROMVECTORXX_H
+
+#include "../objects/objects.h"
+#include "../DataSet/DataSet.h"
+
+/* local prototypes: */
+void	UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,Vec vector, int NameEnum,int TypeEnum);
+void	UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,double* vector, int NameEnum,int TypeEnum);
+void	UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,int* vector, int NameEnum,int TypeEnum);
+void	UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,bool* vector, int NameEnum,int TypeEnum);
+
+#endif  /* _UPDATEINPUTSFROMVECTORXX_H */
+
Index: /issm/trunk/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp
===================================================================
--- /issm/trunk/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp	(revision 3908)
@@ -0,0 +1,28 @@
+/*!\file UpdateVertexPositionsx
+ * \brief update vertex positions using new geometry defined by new thickness and new bed.
+ */
+
+#include "./UpdateVertexPositionsx.h"
+
+#include "../shared/shared.h"
+#include "../include/include.h"
+#include "../toolkits/toolkits.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+void UpdateVertexPositionsx( DataSet* vertices, Vec thickness,Vec bed){
+
+	/*intermediary: */
+	double* thickness_serial=NULL;
+	double* bed_serial=NULL;
+
+	/*serialize inputs: */
+	VecToMPISerial(&thickness_serial,thickness);
+	VecToMPISerial(&bed_serial,bed);
+	
+	/*Update elements, nodes, loads and materials from new geometry: */
+	vertices->UpdateVertexPositions(thickness_serial,bed_serial);
+
+	/*Free ressources:*/
+	xfree((void**)&thickness_serial);
+	xfree((void**)&bed_serial);
+}
Index: /issm/trunk/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.h
===================================================================
--- /issm/trunk/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.h	(revision 3908)
+++ /issm/trunk/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.h	(revision 3908)
@@ -0,0 +1,14 @@
+/*!\file:  UpdateVertexPositionsx.h
+ * \brief header file for updating node positions using new geometry defined by new thickness and new bed.
+ */ 
+
+#ifndef _UPDATEVERTEXPOSITIONSXX_H
+#define _UPDATEVERTEXPOSITIONSXX_H
+
+#include "../DataSet/DataSet.h"
+
+/* local prototypes: */
+void UpdateVertexPositionsx( DataSet* vertices, Vec thickness,Vec bed);
+
+#endif  /* _UPDATEVERTEXPOSITIONSXX_H */
+
