Index: /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp
===================================================================
--- /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp	(revision 3836)
+++ /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp	(revision 3836)
@@ -0,0 +1,64 @@
+/*\file GetSolutionFromInputs.c
+ *\brief: recover velocity ug from inputs
+ */
+
+#include "./GetSolutionFromInputs.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* vertices=NULL;
+	DataSet* loads=NULL;
+	DataSet* materials=NULL;
+	Parameters* parameters=NULL;
+	int      analysis_type;
+	int      sub_analysis_type;
+	Vec      ug=NULL;
+
+	/* output datasets: elements and loads*/
+
+	/*Boot module: */
+	MODULEBOOT();
+
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&GetSolutionFromInputsUsage);
+	
+	/*Input datasets: */
+	FetchData(&elements,ELEMENTSIN);
+	FetchData(&nodes,NODES);
+	FetchData(&vertices,VERTICES);
+	FetchData(&loads,LOADSIN);
+	FetchData(&materials,MATERIALS);
+	FetchParams(&parameters,PARAMETERS);
+	FetchData(&analysis_type,ANALYSISTYPE);
+	FetchData(&sub_analysis_type,SUBANALYSISTYPE);
+
+	/*!Configure objects:*/
+	GetSolutionFromInputsx(&ug,elements, nodes,vertices,loads, materials,parameters,analysis_type,sub_analysis_type);
+
+	/*write output datasets: */
+	WriteData(UG,ug);
+
+	/*Free ressources: */
+	delete elements;
+	delete nodes;
+	delete vertices;
+	delete loads;
+	delete materials;
+	delete parameters;
+
+	/*end module: */
+	MODULEEND();
+}
+
+void GetSolutionFromInputsUsage(void)
+{
+	_printf_("\n");
+	_printf_("   usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters,analysis_type,sub_analysis_type);\n",__FUNCT__);
+	_printf_("\n");
+}
Index: /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.h
===================================================================
--- /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.h	(revision 3836)
+++ /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.h	(revision 3836)
@@ -0,0 +1,39 @@
+/*
+	GetSolutionFromInputs.h
+*/
+
+#ifndef _GETSOLUTIONFROMINPUTS_H
+#define _GETSOLUTIONFROMINPUTS_H
+
+/* local prototypes: */
+void GetSolutionFromInputsUsage(void);
+
+#include "../../c/modules.h"
+#include "../../c/DataSet/DataSet.h"
+#include "../../c/shared/shared.h"
+
+#undef __FUNCT__ 
+#define __FUNCT__  "GetSolutionFromInputs"
+
+/* serial input macros: */
+#define ELEMENTSIN (mxArray*)prhs[0]
+#define NODES (mxArray*)prhs[1]
+#define VERTICES (mxArray*)prhs[2]
+#define LOADSIN (mxArray*)prhs[3]
+#define MATERIALS (mxArray*)prhs[4]
+#define PARAMETERS (mxArray*)prhs[5]
+#define ANALYSISTYPE (mxArray*)prhs[6]
+#define SUBANALYSISTYPE (mxArray*)prhs[7]
+
+/* serial output macros: */
+#define UG (mxArray**)&plhs[0]
+
+/* serial arg counts: */
+#undef NLHS
+#define NLHS  1
+#undef NRHS
+#define NRHS  8
+
+
+#endif  /* _GETSOLUTIONFROMINPUTS_H */
+
Index: /issm/trunk/src/mex/Makefile.am
===================================================================
--- /issm/trunk/src/mex/Makefile.am	(revision 3835)
+++ /issm/trunk/src/mex/Makefile.am	(revision 3836)
@@ -24,4 +24,5 @@
 				FieldDepthAverage\
 				FieldExtrude\
+				GetSolutionFromInputs\
 				Gradj\
 				HoleFiller \
@@ -138,4 +139,7 @@
 			  FieldDepthAverage/FieldDepthAverage.h
 
+GetSolutionFromInputs_SOURCES = GetSolutionFromInputs/GetSolutionFromInputs.cpp\
+			  GetSolutionFromInputs/GetSolutionFromInputs.h
+
 Gradj_SOURCES = Gradj/Gradj.cpp\
 			  Gradj/Gradj.h
Index: /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp
===================================================================
--- /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 3835)
+++ /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 3836)
@@ -57,5 +57,4 @@
 	WriteData(PG,pg);
 	
-	
 	/*Free ressources: */
 	delete elements;
