Index: /issm/trunk/src/mex/FieldDepthAverage/FieldDepthAverage.cpp
===================================================================
--- /issm/trunk/src/mex/FieldDepthAverage/FieldDepthAverage.cpp	(revision 847)
+++ /issm/trunk/src/mex/FieldDepthAverage/FieldDepthAverage.cpp	(revision 847)
@@ -0,0 +1,57 @@
+/*\file FieldDepthAverage.c
+ *\brief: average field throfieldh thickness
+ */
+
+#include "./FieldDepthAverage.h"
+
+void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+
+	/*diverse: */
+	int   noerr=1;
+
+	/*input datasets: */
+	DataSet* elements=NULL;
+	DataSet* nodes=NULL;
+	DataSet* loads=NULL;
+	DataSet* materials=NULL;
+	Vec      field=NULL;
+	char*    fieldname=NULL;
+
+	/*Boot module: */
+	MODULEBOOT();
+
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&FieldDepthAverageUsage);
+
+	/*Input datasets: */
+	FetchData((void**)&elements,NULL,NULL,ELEMENTS,"DataSet",NULL);
+	FetchData((void**)&nodes,NULL,NULL,NODES,"DataSet",NULL);
+	FetchData((void**)&loads,NULL,NULL,LOADS,"DataSet",NULL);
+	FetchData((void**)&materials,NULL,NULL,MATERIALS,"DataSet",NULL);
+	FetchData((void**)&field,NULL,NULL,FIELD,"Vector",NULL);
+	FetchData((void**)&fieldname,NULL,NULL,FIELDNAME,"String",NULL);
+
+	/*!Call core code: */
+	FieldDepthAveragex(field,elements,nodes,loads,materials,fieldname);
+
+	/*write output : */
+	WriteData(FIELDOUT,field,0,0,"Vector",NULL);
+	/*Free ressources: */
+	delete elements;
+	delete nodes;
+	delete loads;
+	delete materials;
+	VecFree(&field);
+	xfree((void**)&fieldname);
+	
+	/*end module: */
+	MODULEEND();
+
+}
+
+void FieldDepthAverageUsage(void)
+{
+	_printf_("\n");
+	_printf_("   usage: [field] = %s(elements, nodes,loads, materials, field,fieldname);\n",__FUNCT__);
+	_printf_("\n");
+}
Index: /issm/trunk/src/mex/FieldDepthAverage/FieldDepthAverage.h
===================================================================
--- /issm/trunk/src/mex/FieldDepthAverage/FieldDepthAverage.h	(revision 847)
+++ /issm/trunk/src/mex/FieldDepthAverage/FieldDepthAverage.h	(revision 847)
@@ -0,0 +1,36 @@
+
+/*
+	FieldDepthAverage.h
+*/
+
+
+#ifndef _FIELDDEPTHAVERAGE_H
+#define _FIELDDEPTHAVERAGE_H
+
+/* local prototypes: */
+void FieldDepthAverageUsage(void);
+
+#include "../../c/issm.h"
+
+#undef __FUNCT__ 
+#define __FUNCT__  "FieldDepthAverage"
+
+/* serial input macros: */
+#define ELEMENTS (mxArray*)prhs[0]
+#define NODES (mxArray*)prhs[1]
+#define LOADS (mxArray*)prhs[2]
+#define MATERIALS (mxArray*)prhs[3]
+#define FIELD (mxArray*)prhs[4]
+#define FIELDNAME (mxArray*)prhs[5]
+
+/* serial output macros: */
+#define FIELDOUT (mxArray**)&plhs[0]
+
+/* serial arg counts: */
+#undef NLHS
+#define NLHS  1
+#undef NRHS
+#define NRHS  6
+
+
+#endif  /* _FIELDDEPTHAVERAGE_H */
Index: /issm/trunk/src/mex/FieldExtrude/FieldExtrude.cpp
===================================================================
--- /issm/trunk/src/mex/FieldExtrude/FieldExtrude.cpp	(revision 847)
+++ /issm/trunk/src/mex/FieldExtrude/FieldExtrude.cpp	(revision 847)
@@ -0,0 +1,59 @@
+/*\file FieldExtrude.c
+ *\brief: extrude field vertically
+ */
+
+#include "./FieldExtrude.h"
+
+void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+
+	/*diverse: */
+	int   noerr=1;
+
+	/*input datasets: */
+	DataSet* elements=NULL;
+	DataSet* nodes=NULL;
+	DataSet* loads=NULL;
+	DataSet* materials=NULL;
+	Vec      field=NULL;
+	char*    field_name=NULL;
+	int      collapse=0;
+
+	/*Boot module: */
+	MODULEBOOT();
+
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&FieldExtrudeUsage);
+
+	/*Input datasets: */
+	FetchData((void**)&elements,NULL,NULL,ELEMENTS,"DataSet",NULL);
+	FetchData((void**)&nodes,NULL,NULL,NODES,"DataSet",NULL);
+	FetchData((void**)&loads,NULL,NULL,LOADS,"DataSet",NULL);
+	FetchData((void**)&materials,NULL,NULL,MATERIALS,"DataSet",NULL);
+	FetchData((void**)&field,NULL,NULL,FIELD,"Vector",NULL);
+	FetchData((void**)&field_name,NULL,NULL,FIELDNAME,"String",NULL);
+	FetchData((void**)&collapse,NULL,NULL,COLLAPSE,"Integer",NULL);
+
+	/*!Call core code: */
+	FieldExtrudex(field,elements,nodes,loads,materials,field_name,collapse);
+
+	/*write output : */
+	WriteData(FIELDOUT,field,0,0,"Vector",NULL);
+	/*Free ressources: */
+	delete elements;
+	delete nodes;
+	delete loads;
+	delete materials;
+	VecFree(&field);
+	xfree((void**)&field_name);
+	
+	/*end module: */
+	MODULEEND();
+
+}
+
+void FieldExtrudeUsage(void)
+{
+	_printf_("\n");
+	_printf_("   usage: [field] = %s(elements, nodes,loads, materials, field, field_name, collapse);\n",__FUNCT__);
+	_printf_("\n");
+}
Index: /issm/trunk/src/mex/FieldExtrude/FieldExtrude.h
===================================================================
--- /issm/trunk/src/mex/FieldExtrude/FieldExtrude.h	(revision 847)
+++ /issm/trunk/src/mex/FieldExtrude/FieldExtrude.h	(revision 847)
@@ -0,0 +1,37 @@
+
+/*
+	FieldExtrude.h
+*/
+
+
+#ifndef _FIELDEXTRUDE_H
+#define _FIELDEXTRUDE_H
+
+/* local prototypes: */
+void FieldExtrudeUsage(void);
+
+#include "../../c/issm.h"
+
+#undef __FUNCT__ 
+#define __FUNCT__  "FieldExtrude"
+
+/* serial input macros: */
+#define ELEMENTS (mxArray*)prhs[0]
+#define NODES (mxArray*)prhs[1]
+#define LOADS (mxArray*)prhs[2]
+#define MATERIALS (mxArray*)prhs[3]
+#define FIELD (mxArray*)prhs[4]
+#define FIELDNAME (mxArray*)prhs[5]
+#define COLLAPSE (mxArray*)prhs[6]
+
+/* serial output macros: */
+#define FIELDOUT (mxArray**)&plhs[0]
+
+/* serial arg counts: */
+#undef NLHS
+#define NLHS  1
+#undef NRHS
+#define NRHS  7
+
+
+#endif  /* _FIELDEXTRUDE_H */
Index: /issm/trunk/src/mex/Makefile.am
===================================================================
--- /issm/trunk/src/mex/Makefile.am	(revision 846)
+++ /issm/trunk/src/mex/Makefile.am	(revision 847)
@@ -33,17 +33,16 @@
 				Reducevectorgtos\
 				SetStructureField\
-				SlopeExtrude\
 				Solver\
 				SpcNodes\
 				SystemMatrices\
 				Test\
-				ThicknessExtrude\
+				FieldExtrude\
 				TriMesh\
 				TriMeshProcessRifts\
 				TriMeshRefine\
 				UpdateFromInputs\
+				UpdateNodePositions\
 				UpdateGeometry\
-				VelocityExtrude\
-				VelocityDepthAverage
+				FieldDepthAverage
 
 endif
@@ -158,7 +157,4 @@
 			  SetStructureField/SetStructureField.h
 
-SlopeExtrude_SOURCES = SlopeExtrude/SlopeExtrude.cpp\
-			  SlopeExtrude/SlopeExtrude.h
-
 Solver_SOURCES = Solver/Solver.cpp\
 			  Solver/Solver.h
@@ -170,6 +166,6 @@
 			  SystemMatrices/SystemMatrices.h
 
-ThicknessExtrude_SOURCES = ThicknessExtrude/ThicknessExtrude.cpp\
-			  ThicknessExtrude/ThicknessExtrude.h
+FieldExtrude_SOURCES = FieldExtrude/FieldExtrude.cpp\
+			  FieldExtrude/FieldExtrude.h
 
 TriMesh_SOURCES = TriMesh/TriMesh.cpp\
@@ -188,7 +184,7 @@
 			  UpdateGeometry/UpdateGeometry.h
 
-VelocityExtrude_SOURCES = VelocityExtrude/VelocityExtrude.cpp\
-			  VelocityExtrude/VelocityExtrude.h
+UpdateNodePositions_SOURCES = UpdateNodePositions/UpdateNodePositions.cpp\
+			  UpdateNodePositions/UpdateNodePositions.h
 
-VelocityDepthAverage_SOURCES = VelocityDepthAverage/VelocityDepthAverage.cpp\
-			  VelocityDepthAverage/VelocityDepthAverage.h
+FieldDepthAverage_SOURCES = FieldDepthAverage/FieldDepthAverage.cpp\
+			  FieldDepthAverage/FieldDepthAverage.h
Index: /issm/trunk/src/mex/UpdateNodePositions/UpdateNodePositions.cpp
===================================================================
--- /issm/trunk/src/mex/UpdateNodePositions/UpdateNodePositions.cpp	(revision 847)
+++ /issm/trunk/src/mex/UpdateNodePositions/UpdateNodePositions.cpp	(revision 847)
@@ -0,0 +1,57 @@
+/*\file UpdateNodePositions.c
+ *\brief: update node positions using new geometry defined by new bed and new thickness
+ */
+
+#include "./UpdateNodePositions.h"
+
+void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+
+	/*diverse: */
+	int   noerr=1;
+
+	/*input datasets: */
+	DataSet* elements=NULL;
+	DataSet* nodes=NULL;
+	DataSet* loads=NULL;
+	DataSet* materials=NULL;
+	Vec      thickness=NULL;
+	Vec      bed=NULL;
+
+	/*Boot module: */
+	MODULEBOOT();
+
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&UpdateNodePositionsUsage);
+
+	/*Input datasets: */
+	FetchData((void**)&elements,NULL,NULL,ELEMENTS,"DataSet",NULL);
+	FetchData((void**)&nodes,NULL,NULL,NODES,"DataSet",NULL);
+	FetchData((void**)&loads,NULL,NULL,LOADS,"DataSet",NULL);
+	FetchData((void**)&materials,NULL,NULL,MATERIALS,"DataSet",NULL);
+	FetchData((void**)&thickness,NULL,NULL,THICKNESS,"Vector",NULL);
+	FetchData((void**)&bed,NULL,NULL,BED,"DataSet",NULL);
+	
+	/*!Generate internal degree of freedom numbers: */
+	UpdateNodePositionsx(elements,nodes,loads, materials,thickness,bed);
+
+	/*write output datasets: */
+	WriteData(NODESOUT,nodes,0,0,"DataSet",NULL);
+
+	/*Free ressources: */
+	delete elements;
+	delete nodes;
+	delete loads;
+	delete materials;
+	VecFree(&thickness);
+	VecFree(&bed);
+
+	/*end module: */
+	MODULEEND();
+}
+
+void UpdateNodePositionsUsage(void)
+{
+	_printf_("\n");
+	_printf_("   usage: [elements,nodes,loads, materials] = %s(elements,nodes,loads, materials,inputs);\n",__FUNCT__);
+	_printf_("\n");
+}
Index: /issm/trunk/src/mex/UpdateNodePositions/UpdateNodePositions.h
===================================================================
--- /issm/trunk/src/mex/UpdateNodePositions/UpdateNodePositions.h	(revision 847)
+++ /issm/trunk/src/mex/UpdateNodePositions/UpdateNodePositions.h	(revision 847)
@@ -0,0 +1,37 @@
+
+/*
+	UpdateNodePositions.h
+*/
+
+
+#ifndef _UPDATENODEPOSITIONS_H
+#define _UPDATENODEPOSITIONS_H
+
+/* local prototypes: */
+void UpdateNodePositionsUsage(void);
+
+#include "../../c/issm.h"
+
+#undef __FUNCT__ 
+#define __FUNCT__  "UpdateNodePositions"
+
+/* serial input macros: */
+#define ELEMENTS (mxArray*)prhs[0]
+#define NODES (mxArray*)prhs[1]
+#define LOADS (mxArray*)prhs[2]
+#define MATERIALS (mxArray*)prhs[3]
+#define BED (mxArray*)prhs[4]
+#define THICKNESS (mxArray*)prhs[5]
+	
+/* serial output macros: */
+#define NODESOUT (mxArray**)&plhs[0]
+
+/* serial arg counts: */
+#undef NLHS
+#define NLHS  1
+#undef NRHS
+#define NRHS  6
+
+
+#endif  /* _UPDATENODEPOSITIONS_H */
+
