Index: /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
===================================================================
--- /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 4452)
+++ /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 4453)
@@ -9,5 +9,5 @@
 #include "../../EnumDefinitions/EnumDefinitions.h"
 
-void InputUpdateFromDakotax(FemModel* femmodel, double* variables,char** variables_descriptors,int numvariables){
+void  InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials*  materials,Parameters* parameters,double* variables,char* *variables_descriptors,int numvariables){
 
 	int     verbose;
@@ -17,7 +17,7 @@
 
 	/*retrieve parameters: */
-	femmodel->parameters->FindParam(&verbose,VerboseEnum);
-	femmodel->parameters->FindParam(&qmu_npart,QmuNPartEnum);
-	femmodel->parameters->FindParam(&qmu_part,&dummy,QmuPartEnum);
+	parameters->FindParam(&verbose,VerboseEnum);
+	parameters->FindParam(&qmu_npart,QmuNPartEnum);
+	parameters->FindParam(&qmu_part,&dummy,QmuPartEnum);
 
 	ISSMERROR(" not supported yet!");
Index: /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h
===================================================================
--- /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h	(revision 4452)
+++ /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h	(revision 4453)
@@ -9,5 +9,5 @@
 #include "../../Container/Container.h"
 
-void InputUpdateFromDakotax(FemModel* femmodel,double* variables,char** variables_descriptors,int numvariables);
+void  InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials*  materials,Parameters* parameters,double* variables,char* *variables_descriptors,int numvariables);
 
 #endif  /* _INPUTUPDATEFROMDAKOTAXX_H */
Index: /issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp
===================================================================
--- /issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp	(revision 4452)
+++ /issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp	(revision 4453)
@@ -61,13 +61,13 @@
 
 	/*Modify core inputs in objects contained in femmodel, to reflect the dakota variables inputs: */
-	InputUpdateFromDakotax(femmodel->elements,femmodel->nodes,femmodel->vertices,loads,femmodel->materials,femmodel->parameters,variables,variables_descriptors,numvariables);
+	InputUpdateFromDakotax(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,variables,variables_descriptors,numvariables);
 
 	/*Run the core solution sequence: */
 	if(verbose)_printf_("%s%s%s\n","Starting ",EnumAsString(solution_type)," core:");
-	SolutionConfiguration(NULL,NULL,&solutioncore); solution_core(femmodel);
+	SolutionConfiguration(NULL,NULL,&solutioncore,solution_type); solutioncore(femmodel);
 
 	/*compute responses: */
 	if(verbose)_printf_("compute dakota responses:\n");
-	DakotaResponsesx(responses,femmodel->elements,femmodel->nodes,femmodel->vertices,loads,femmodel->materials,femmodel->parameters,responses_descriptors,numresponses,);
+	DakotaResponsesx(responses,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,responses_descriptors,numresponses);
 
 	/*Free ressources:*/
Index: /issm/trunk/src/c/modules/modules.h
===================================================================
--- /issm/trunk/src/c/modules/modules.h	(revision 4452)
+++ /issm/trunk/src/c/modules/modules.h	(revision 4453)
@@ -82,4 +82,5 @@
 #include "./GetVectorFromInputsx/GetVectorFromInputsx.h"
 #include "./InputConvergencex/InputConvergencex.h"
+#include "./DakotaResponsesx/DakotaResponsesx.h"
 
 #endif
Index: /issm/trunk/src/mex/AverageFilter/AverageFilter.cpp
===================================================================
--- /issm/trunk/src/mex/AverageFilter/AverageFilter.cpp	(revision 4452)
+++ /issm/trunk/src/mex/AverageFilter/AverageFilter.cpp	(revision 4453)
@@ -17,5 +17,5 @@
 {
 
-	int i,j,noerr;
+	int i,j;
 
 	/* required input: */
Index: /issm/trunk/src/mex/Bamg/Bamg.cpp
===================================================================
--- /issm/trunk/src/mex/Bamg/Bamg.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Bamg/Bamg.cpp	(revision 4453)
@@ -11,5 +11,4 @@
 
 	/*diverse: */
-	int   noerr=1;
 	int   i;
 	int   lines,cols;
Index: /issm/trunk/src/mex/BuildNodeSets/BuildNodeSets.cpp
===================================================================
--- /issm/trunk/src/mex/BuildNodeSets/BuildNodeSets.cpp	(revision 4452)
+++ /issm/trunk/src/mex/BuildNodeSets/BuildNodeSets.cpp	(revision 4453)
@@ -7,7 +7,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/ComputeBasalStress/ComputeBasalStress.cpp
===================================================================
--- /issm/trunk/src/mex/ComputeBasalStress/ComputeBasalStress.cpp	(revision 4452)
+++ /issm/trunk/src/mex/ComputeBasalStress/ComputeBasalStress.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/ComputePressure/ComputePressure.cpp
===================================================================
--- /issm/trunk/src/mex/ComputePressure/ComputePressure.cpp	(revision 4452)
+++ /issm/trunk/src/mex/ComputePressure/ComputePressure.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/ConfigureObjects/ConfigureObjects.cpp
===================================================================
--- /issm/trunk/src/mex/ConfigureObjects/ConfigureObjects.cpp	(revision 4452)
+++ /issm/trunk/src/mex/ConfigureObjects/ConfigureObjects.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/ControlOptimization/ControlOptimization.cpp
===================================================================
--- /issm/trunk/src/mex/ControlOptimization/ControlOptimization.cpp	(revision 4452)
+++ /issm/trunk/src/mex/ControlOptimization/ControlOptimization.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/CostFunction/CostFunction.cpp
===================================================================
--- /issm/trunk/src/mex/CostFunction/CostFunction.cpp	(revision 4452)
+++ /issm/trunk/src/mex/CostFunction/CostFunction.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp
===================================================================
--- /issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp	(revision 4452)
+++ /issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp	(revision 4453)
@@ -1,12 +1,11 @@
-/*\file InputUpdateFromDakota.c
-*\brief: update inputs using dakota input variables
+/*\file DakotaResponses.c
+*\brief: compute dakota responses after a run
 */
 
-#include "./InputUpdateFromDakota.h"
+#include "./DakotaResponses.h"
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
 
-	/*diverse: */
-	int   noerr=1;
+	int i;
 
 	/*input datasets: */
@@ -22,4 +21,5 @@
 	int         numresponses;
 	mxArray*    pfield=NULL;
+	int         stringlength;
 
 	/*Boot module: */
@@ -27,5 +27,5 @@
 
 	/*checks on arguments on the matlab side: */
-	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputUpdateFromDakotaUsage);
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&DakotaResponsesUsage);
 
 	/*Input datasets: */
@@ -75,8 +75,8 @@
 }
 
-void InputUpdateFromDakotaUsage(void)
+void DakotaResponsesUsage(void)
 {
 	_printf_("\n");
-	_printf_("   usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,variables,variables_descriptors);\n",__FUNCT__);
+	_printf_("   usage: [responses] = %s(elements,nodes,vertices,loads,materials,parameters,responses_descritpors,numresponses);\n",__FUNCT__);
 	_printf_("\n");
 }
Index: /issm/trunk/src/mex/Du/Du.cpp
===================================================================
--- /issm/trunk/src/mex/Du/Du.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Du/Du.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Echo/Echo.cpp
===================================================================
--- /issm/trunk/src/mex/Echo/Echo.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Echo/Echo.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/FieldAverageOntoVertices/FieldAverageOntoVertices.cpp
===================================================================
--- /issm/trunk/src/mex/FieldAverageOntoVertices/FieldAverageOntoVertices.cpp	(revision 4452)
+++ /issm/trunk/src/mex/FieldAverageOntoVertices/FieldAverageOntoVertices.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/FieldDepthAverage/FieldDepthAverage.cpp
===================================================================
--- /issm/trunk/src/mex/FieldDepthAverage/FieldDepthAverage.cpp	(revision 4452)
+++ /issm/trunk/src/mex/FieldDepthAverage/FieldDepthAverage.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp
===================================================================
--- /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp	(revision 4452)
+++ /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Gradj/Gradj.cpp
===================================================================
--- /issm/trunk/src/mex/Gradj/Gradj.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Gradj/Gradj.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int         noerr        = 1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/HoleFiller/HoleFiller.cpp
===================================================================
--- /issm/trunk/src/mex/HoleFiller/HoleFiller.cpp	(revision 4452)
+++ /issm/trunk/src/mex/HoleFiller/HoleFiller.cpp	(revision 4453)
@@ -17,5 +17,5 @@
 {
 
-	int i,j,noerr;
+	int i,j;
 
 	/* required input: */
Index: /issm/trunk/src/mex/InputControlConstrain/InputControlConstrain.cpp
===================================================================
--- /issm/trunk/src/mex/InputControlConstrain/InputControlConstrain.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputControlConstrain/InputControlConstrain.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-/*diverse: */
-int         noerr             = 1;
 
 /*input datasets: */
Index: /issm/trunk/src/mex/InputDepthAverage/InputDepthAverage.cpp
===================================================================
--- /issm/trunk/src/mex/InputDepthAverage/InputDepthAverage.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputDepthAverage/InputDepthAverage.cpp	(revision 4453)
@@ -7,54 +7,51 @@
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
 
-/*diverse: */
-int         noerr             = 1;
+	/*input datasets: */
+	Elements*   elements          = NULL;
+	Nodes       *nodes             = NULL;
+	Vertices    *vertices          = NULL;
+	Loads     *loads             = NULL;
+	Materials   *materials         = NULL;
+	Parameters *parameters        = NULL;
+	int         enum_type;
+	int         average_enum_type;
 
-/*input datasets: */
-Elements*   elements          = NULL;
-Nodes       *nodes             = NULL;
-Vertices    *vertices          = NULL;
-Loads     *loads             = NULL;
-Materials   *materials         = NULL;
-Parameters *parameters        = NULL;
-int         enum_type;
-int         average_enum_type;
+	/*Boot module: */
+	MODULEBOOT();
 
-/*Boot module: */
-MODULEBOOT();
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputDepthAverageUsage);
 
-/*checks on arguments on the matlab side: */
-CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputDepthAverageUsage);
+	/*Input datasets: */
+	FetchData((DataSet**)&elements,ELEMENTSIN);
+	FetchData((DataSet**)&nodes,NODESIN);
+	FetchData((DataSet**)&vertices,VERTICESIN);
+	FetchData((DataSet**)&loads,LOADSIN);
+	FetchData((DataSet**)&materials,MATERIALSIN);
+	FetchParams(&parameters,PARAMETERSIN);
+	FetchData(&enum_type,ENUMTYPE);
+	FetchData(&average_enum_type,AVERAGEENUMTYPE);
 
-/*Input datasets: */
-FetchData((DataSet**)&elements,ELEMENTSIN);
-FetchData((DataSet**)&nodes,NODESIN);
-FetchData((DataSet**)&vertices,VERTICESIN);
-FetchData((DataSet**)&loads,LOADSIN);
-FetchData((DataSet**)&materials,MATERIALSIN);
-FetchParams(&parameters,PARAMETERSIN);
-FetchData(&enum_type,ENUMTYPE);
-FetchData(&average_enum_type,AVERAGEENUMTYPE);
+	/*call "x" code layer*/
+	InputDepthAveragex(elements,nodes,vertices,loads, materials,parameters,enum_type,average_enum_type);
 
-/*call "x" code layer*/
-InputDepthAveragex(elements,nodes,vertices,loads, materials,parameters,enum_type,average_enum_type);
+	/*write output datasets: */
+	WriteData(ELEMENTS,elements);
+	WriteData(NODES,nodes);
+	WriteData(VERTICES,vertices);
+	WriteData(LOADS,loads);
+	WriteData(MATERIALS,materials);
+	WriteParams(PARAMETERS,parameters);
 
-/*write output datasets: */
-WriteData(ELEMENTS,elements);
-WriteData(NODES,nodes);
-WriteData(VERTICES,vertices);
-WriteData(LOADS,loads);
-WriteData(MATERIALS,materials);
-WriteParams(PARAMETERS,parameters);
+	/*Free ressources: */
+	delete elements;
+	delete nodes;
+	delete vertices;
+	delete loads;
+	delete materials;
+	delete parameters;
 
-/*Free ressources: */
-delete elements;
-delete nodes;
-delete vertices;
-delete loads;
-delete materials;
-delete parameters;
-
-/*end module: */
-MODULEEND();
+	/*end module: */
+	MODULEEND();
 }
 
Index: /issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp
===================================================================
--- /issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/InputExtrude/InputExtrude.cpp
===================================================================
--- /issm/trunk/src/mex/InputExtrude/InputExtrude.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputExtrude/InputExtrude.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/InputScale/InputScale.cpp
===================================================================
--- /issm/trunk/src/mex/InputScale/InputScale.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputScale/InputScale.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/InputToResult/InputToResult.cpp
===================================================================
--- /issm/trunk/src/mex/InputToResult/InputToResult.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputToResult/InputToResult.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/InputUpdateFromConstant/InputUpdateFromConstant.cpp
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromConstant/InputUpdateFromConstant.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputUpdateFromConstant/InputUpdateFromConstant.cpp	(revision 4453)
@@ -7,50 +7,47 @@
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
 
-/*diverse: */
-int   noerr=1;
+	/*input datasets: */
+	Elements* elements=NULL;
+	Nodes* nodes=NULL;
+	Vertices* vertices=NULL;
+	Loads* loads=NULL;
+	Materials* materials=NULL;
+	Parameters* parameters=NULL;
+	double   constant;
+	int      name;
 
-/*input datasets: */
-Elements* elements=NULL;
-Nodes* nodes=NULL;
-Vertices* vertices=NULL;
-Loads* loads=NULL;
-Materials* materials=NULL;
-Parameters* parameters=NULL;
-double   constant;
-int      name;
+	/*Boot module: */
+	MODULEBOOT();
 
-/*Boot module: */
-MODULEBOOT();
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputUpdateFromConstantUsage);
 
-/*checks on arguments on the matlab side: */
-CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputUpdateFromConstantUsage);
+	/*Input datasets: */
+	FetchData((DataSet**)&elements,ELEMENTSIN);
+	FetchData((DataSet**)&nodes,NODESIN);
+	FetchData((DataSet**)&vertices,VERTICESIN);
+	FetchData((DataSet**)&loads,LOADSIN);
+	FetchData((DataSet**)&materials,MATERIALSIN);
+	FetchParams(&parameters,PARAMETERSIN);
+	FetchData(&constant,CONSTANT);
+	FetchData(&name,NAME);
 
-/*Input datasets: */
-FetchData((DataSet**)&elements,ELEMENTSIN);
-FetchData((DataSet**)&nodes,NODESIN);
-FetchData((DataSet**)&vertices,VERTICESIN);
-FetchData((DataSet**)&loads,LOADSIN);
-FetchData((DataSet**)&materials,MATERIALSIN);
-FetchParams(&parameters,PARAMETERSIN);
-FetchData(&constant,CONSTANT);
-FetchData(&name,NAME);
+	/*!Generate internal degree of freedom numbers: */
+	InputUpdateFromConstantx(elements,nodes,vertices,loads, materials,parameters,constant,name);
 
-/*!Generate internal degree of freedom numbers: */
-InputUpdateFromConstantx(elements,nodes,vertices,loads, materials,parameters,constant,name);
+	/*write output datasets: */
+	WriteData(ELEMENTS,elements);
+	WriteData(LOADS,loads);
 
-/*write output datasets: */
-WriteData(ELEMENTS,elements);
-WriteData(LOADS,loads);
+	/*Free ressources: */
+	delete elements;
+	delete nodes;
+	delete vertices;
+	delete loads;
+	delete materials;
+	delete parameters;
 
-/*Free ressources: */
-delete elements;
-delete nodes;
-delete vertices;
-delete loads;
-delete materials;
-delete parameters;
-
-/*end module: */
-MODULEEND();
+	/*end module: */
+	MODULEEND();
 }
 
Index: /issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.cpp
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.cpp	(revision 4453)
@@ -7,6 +7,5 @@
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
 
-	/*diverse: */
-	int   noerr=1;
+	int i;
 
 	/*input datasets: */
@@ -20,4 +19,5 @@
 	char**      variables_descriptors=NULL;
 	char*       string=NULL;
+	int         stringlength;
 	int         numvariables;
 	mxArray*    pfield=NULL;
@@ -38,5 +38,5 @@
 	
 	/*dakota input: */
-	FetchData(&variables,&numvariables,VARIABLESIN);
+	FetchData(&variables,&numvariables,VARIABLES);
 
 	variables_descriptors=(char**)xmalloc(numvariables*sizeof(char*));
Index: /issm/trunk/src/mex/InputUpdateFromSolution/InputUpdateFromSolution.cpp
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromSolution/InputUpdateFromSolution.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputUpdateFromSolution/InputUpdateFromSolution.cpp	(revision 4453)
@@ -7,48 +7,45 @@
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
 
-/*diverse: */
-int   noerr=1;
+	/*input datasets: */
+	Elements* elements=NULL;
+	Nodes* nodes=NULL;
+	Vertices* vertices=NULL;
+	Loads* loads=NULL;
+	Materials* materials=NULL;
+	Parameters* parameters=NULL;
+	Vec      solution=NULL;
 
-/*input datasets: */
-Elements* elements=NULL;
-Nodes* nodes=NULL;
-Vertices* vertices=NULL;
-Loads* loads=NULL;
-Materials* materials=NULL;
-Parameters* parameters=NULL;
-Vec      solution=NULL;
+	/*Boot module: */
+	MODULEBOOT();
 
-/*Boot module: */
-MODULEBOOT();
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputUpdateFromSolutionUsage);
 
-/*checks on arguments on the matlab side: */
-CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputUpdateFromSolutionUsage);
+	/*Input datasets: */
+	FetchData((DataSet**)&elements,ELEMENTSIN);
+	FetchData((DataSet**)&nodes,NODESIN);
+	FetchData((DataSet**)&vertices,VERTICESIN);
+	FetchData((DataSet**)&loads,LOADSIN);
+	FetchData((DataSet**)&materials,MATERIALSIN);
+	FetchParams(&parameters,PARAMETERSIN);
+	FetchData(&solution,SOLUTION);
 
-/*Input datasets: */
-FetchData((DataSet**)&elements,ELEMENTSIN);
-FetchData((DataSet**)&nodes,NODESIN);
-FetchData((DataSet**)&vertices,VERTICESIN);
-FetchData((DataSet**)&loads,LOADSIN);
-FetchData((DataSet**)&materials,MATERIALSIN);
-FetchParams(&parameters,PARAMETERSIN);
-FetchData(&solution,SOLUTION);
+	/*!Generate internal degree of freedom numbers: */
+	InputUpdateFromSolutionx(elements,nodes,vertices,loads, materials,parameters,solution);
 
-/*!Generate internal degree of freedom numbers: */
-InputUpdateFromSolutionx(elements,nodes,vertices,loads, materials,parameters,solution);
+	/*write output datasets: */
+	WriteData(ELEMENTS,elements);
 
-/*write output datasets: */
-WriteData(ELEMENTS,elements);
+	/*Free ressources: */
+	delete elements;
+	delete nodes;
+	delete vertices;
+	delete loads;
+	delete materials;
+	delete parameters;
+	VecFree(&solution);
 
-/*Free ressources: */
-delete elements;
-delete nodes;
-delete vertices;
-delete loads;
-delete materials;
-delete parameters;
-VecFree(&solution);
-
-/*end module: */
-MODULEEND();
+	/*end module: */
+	MODULEEND();
 }
 
Index: /issm/trunk/src/mex/InputUpdateFromVector/InputUpdateFromVector.cpp
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromVector/InputUpdateFromVector.cpp	(revision 4452)
+++ /issm/trunk/src/mex/InputUpdateFromVector/InputUpdateFromVector.cpp	(revision 4453)
@@ -7,63 +7,60 @@
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
 
-/*diverse: */
-int   noerr=1;
+	/*input datasets: */
+	Elements* elements=NULL;
+	Nodes* nodes=NULL;
+	Vertices* vertices=NULL;
+	Loads* loads=NULL;
+	Materials* materials=NULL;
+	Parameters* parameters=NULL;
+	double*  vector=NULL;
+	int      dummy;
+	int      NameEnum;
+	int      TypeEnum;
 
-/*input datasets: */
-Elements* elements=NULL;
-Nodes* nodes=NULL;
-Vertices* vertices=NULL;
-Loads* loads=NULL;
-Materials* materials=NULL;
-Parameters* parameters=NULL;
-double*  vector=NULL;
-int      dummy;
-int      NameEnum;
-int      TypeEnum;
+	/*Boot module: */
+	MODULEBOOT();
 
-/*Boot module: */
-MODULEBOOT();
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputUpdateFromVectorUsage);
 
-/*checks on arguments on the matlab side: */
-CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputUpdateFromVectorUsage);
+	/*Input datasets: */
+	FetchData((DataSet**)&elements,ELEMENTSIN);
+	FetchData((DataSet**)&nodes,NODESIN);
+	FetchData((DataSet**)&vertices,VERTICESIN);
+	FetchData((DataSet**)&loads,LOADSIN);
+	FetchData((DataSet**)&materials,MATERIALSIN);
+	FetchParams(&parameters,PARAMETERSIN);
+	FetchData(&vector,&dummy,VECTOR);
+	FetchData(&NameEnum,NAME);
+	FetchData(&TypeEnum,TYPE);
 
-/*Input datasets: */
-FetchData((DataSet**)&elements,ELEMENTSIN);
-FetchData((DataSet**)&nodes,NODESIN);
-FetchData((DataSet**)&vertices,VERTICESIN);
-FetchData((DataSet**)&loads,LOADSIN);
-FetchData((DataSet**)&materials,MATERIALSIN);
-FetchParams(&parameters,PARAMETERSIN);
-FetchData(&vector,&dummy,VECTOR);
-FetchData(&NameEnum,NAME);
-FetchData(&TypeEnum,TYPE);
+	/*Check that type is one of Constant, Vertex or Element: */
+	if ((TypeEnum!=ConstantEnum) && (TypeEnum!=VertexEnum) && (TypeEnum!=ElementEnum)){
+		ISSMERROR("%s%s%s\n","Type of input can only be a constant, a vertex or an element vector.  Right now, you input a ",EnumAsString(TypeEnum)," type data for input update");
+	}
 
-/*Check that type is one of Constant, Vertex or Element: */
-if ((TypeEnum!=ConstantEnum) && (TypeEnum!=VertexEnum) && (TypeEnum!=ElementEnum)){
-	ISSMERROR("%s%s%s\n","Type of input can only be a constant, a vertex or an element vector.  Right now, you input a ",EnumAsString(TypeEnum)," type data for input update");
-}
+	/*!Generate internal degree of freedom numbers: */
+	InputUpdateFromVectorx(elements,nodes,vertices,loads, materials,parameters,vector,NameEnum,TypeEnum);
 
-/*!Generate internal degree of freedom numbers: */
-InputUpdateFromVectorx(elements,nodes,vertices,loads, materials,parameters,vector,NameEnum,TypeEnum);
+	/*write output datasets: */
+	WriteData(ELEMENTS,elements);
+	WriteData(NODES,nodes);
+	WriteData(VERTICES,vertices);
+	WriteData(LOADS,loads);
+	WriteData(MATERIALS,materials);
+	WriteParams(PARAMETERS,parameters);
 
-/*write output datasets: */
-WriteData(ELEMENTS,elements);
-WriteData(NODES,nodes);
-WriteData(VERTICES,vertices);
-WriteData(LOADS,loads);
-WriteData(MATERIALS,materials);
-WriteParams(PARAMETERS,parameters);
+	/*Free ressources: */
+	delete elements;
+	delete nodes;
+	delete vertices;
+	delete loads;
+	delete materials;
+	delete parameters;
+	xfree((void**)&vector);
 
-/*Free ressources: */
-delete elements;
-delete nodes;
-delete vertices;
-delete loads;
-delete materials;
-delete parameters;
-xfree((void**)&vector);
-
-/*end module: */
-MODULEEND();
+	/*end module: */
+	MODULEEND();
 }
 
Index: /issm/trunk/src/mex/MassFlux/MassFlux.cpp
===================================================================
--- /issm/trunk/src/mex/MassFlux/MassFlux.cpp	(revision 4452)
+++ /issm/trunk/src/mex/MassFlux/MassFlux.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Mergesolutionfromftog/Mergesolutionfromftog.cpp
===================================================================
--- /issm/trunk/src/mex/Mergesolutionfromftog/Mergesolutionfromftog.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Mergesolutionfromftog/Mergesolutionfromftog.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Misfit/Misfit.cpp
===================================================================
--- /issm/trunk/src/mex/Misfit/Misfit.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Misfit/Misfit.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/MpcNodes/MpcNodes.cpp
===================================================================
--- /issm/trunk/src/mex/MpcNodes/MpcNodes.cpp	(revision 4452)
+++ /issm/trunk/src/mex/MpcNodes/MpcNodes.cpp	(revision 4453)
@@ -7,7 +7,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/NormalizeConstraints/NormalizeConstraints.cpp
===================================================================
--- /issm/trunk/src/mex/NormalizeConstraints/NormalizeConstraints.cpp	(revision 4452)
+++ /issm/trunk/src/mex/NormalizeConstraints/NormalizeConstraints.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Orth/Orth.cpp
===================================================================
--- /issm/trunk/src/mex/Orth/Orth.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Orth/Orth.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/OutputResults/OutputResults.cpp
===================================================================
--- /issm/trunk/src/mex/OutputResults/OutputResults.cpp	(revision 4452)
+++ /issm/trunk/src/mex/OutputResults/OutputResults.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/OutputRifts/OutputRifts.cpp
===================================================================
--- /issm/trunk/src/mex/OutputRifts/OutputRifts.cpp	(revision 4452)
+++ /issm/trunk/src/mex/OutputRifts/OutputRifts.cpp	(revision 4453)
@@ -8,5 +8,4 @@
 
 	/*diverse: */
-	int   noerr=1;
 	int   numrifts;
 
Index: /issm/trunk/src/mex/ParameterOutput/ParameterOutput.cpp
===================================================================
--- /issm/trunk/src/mex/ParameterOutput/ParameterOutput.cpp	(revision 4452)
+++ /issm/trunk/src/mex/ParameterOutput/ParameterOutput.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp
===================================================================
--- /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp	(revision 4452)
+++ /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp
===================================================================
--- /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp	(revision 4452)
+++ /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*output: */
Index: /issm/trunk/src/mex/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp
===================================================================
--- /issm/trunk/src/mex/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp	(revision 4452)
+++ /issm/trunk/src/mex/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp	(revision 4453)
@@ -6,8 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
-
 
 	/*input/output datasets: */
Index: /issm/trunk/src/mex/Qmu/Qmu.cpp
===================================================================
--- /issm/trunk/src/mex/Qmu/Qmu.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Qmu/Qmu.cpp	(revision 4453)
@@ -12,7 +12,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int         noerr      = 1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Reduceloadfromgtof/Reduceloadfromgtof.cpp
===================================================================
--- /issm/trunk/src/mex/Reduceloadfromgtof/Reduceloadfromgtof.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Reduceloadfromgtof/Reduceloadfromgtof.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Reducematrixfromgtof/Reducematrixfromgtof.cpp
===================================================================
--- /issm/trunk/src/mex/Reducematrixfromgtof/Reducematrixfromgtof.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Reducematrixfromgtof/Reducematrixfromgtof.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Reducevectorgtof/Reducevectorgtof.cpp
===================================================================
--- /issm/trunk/src/mex/Reducevectorgtof/Reducevectorgtof.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Reducevectorgtof/Reducevectorgtof.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Reducevectorgtos/Reducevectorgtos.cpp
===================================================================
--- /issm/trunk/src/mex/Reducevectorgtos/Reducevectorgtos.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Reducevectorgtos/Reducevectorgtos.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Solver/Solver.cpp
===================================================================
--- /issm/trunk/src/mex/Solver/Solver.cpp	(revision 4452)
+++ /issm/trunk/src/mex/Solver/Solver.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/SpcNodes/SpcNodes.cpp
===================================================================
--- /issm/trunk/src/mex/SpcNodes/SpcNodes.cpp	(revision 4452)
+++ /issm/trunk/src/mex/SpcNodes/SpcNodes.cpp	(revision 4453)
@@ -7,7 +7,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp
===================================================================
--- /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 4452)
+++ /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
Index: /issm/trunk/src/mex/Test/Test.cpp.grid
===================================================================
--- /issm/trunk/src/mex/Test/Test.cpp.grid	(revision 4452)
+++ /issm/trunk/src/mex/Test/Test.cpp.grid	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*Boot module: */
Index: /issm/trunk/src/mex/TriMesh/TriMesh.cpp
===================================================================
--- /issm/trunk/src/mex/TriMesh/TriMesh.cpp	(revision 4452)
+++ /issm/trunk/src/mex/TriMesh/TriMesh.cpp	(revision 4453)
@@ -48,7 +48,4 @@
 	double** riftsgridsy=NULL;
 
-	/* error handling: */
-	int		noerr=1;	
-  
 	/* Triangle structures: */
 	struct triangulateio in,out;
@@ -99,6 +96,5 @@
 	
 	/*Start reading the domain outline file: */
-	noerr=DomainOutlineRead(&nprof,&profngrids,&pprofx,&pprofy,domainname);
-	if(!noerr){
+	if(!DomainOutlineRead(&nprof,&profngrids,&pprofx,&pprofy,domainname)){
 		printf("%s%s%s\n",__FUNCT__," error message reading domain outline ",domainname);
 		mexErrMsgTxt(" ");
@@ -107,6 +103,5 @@
 	/*Read rifts file if present: */
 	if(riftname){
-		noerr=DomainOutlineRead(&numrifts,&riftsnumgrids,&riftsgridsx,&riftsgridsy,riftname);
-		if(!noerr){
+		if(!DomainOutlineRead(&numrifts,&riftsnumgrids,&riftsgridsx,&riftsgridsy,riftname)){
 			printf("%s%s%s\n",__FUNCT__," error message reading rifts outline ",riftname);
 			mexErrMsgTxt(" ");
@@ -268,5 +263,5 @@
 
 	/*Associate elements with segments: */
-	noerr=AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
+	AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
 
 	/*Order segments so that their normals point outside the domain: */
Index: /issm/trunk/src/mex/TriMeshNoDensity/TriMeshNoDensity.cpp
===================================================================
--- /issm/trunk/src/mex/TriMeshNoDensity/TriMeshNoDensity.cpp	(revision 4452)
+++ /issm/trunk/src/mex/TriMeshNoDensity/TriMeshNoDensity.cpp	(revision 4453)
@@ -46,7 +46,4 @@
 	double** riftsgridsy=NULL;
 
-	/* error handling: */
-	int		noerr=1;	
-  
 	/* Triangle structures: */
 	struct triangulateio in,out;
@@ -89,6 +86,5 @@
 	
 	/*Start reading the domain outline file: */
-	noerr=DomainOutlineRead(&nprof,&profngrids,&pprofx,&pprofy,domainname);
-	if(!noerr){
+	if(!DomainOutlineRead(&nprof,&profngrids,&pprofx,&pprofy,domainname)){
 		printf("%s%s%s\n",__FUNCT__," error message reading domain outline ",domainname);
 		mexErrMsgTxt(" ");
@@ -97,6 +93,5 @@
 	/*Read rifts file if present: */
 	if(riftname){
-		noerr=DomainOutlineRead(&numrifts,&riftsnumgrids,&riftsgridsx,&riftsgridsy,riftname);
-		if(!noerr){
+		if(!DomainOutlineRead(&numrifts,&riftsnumgrids,&riftsgridsx,&riftsgridsy,riftname)){
 			printf("%s%s%s\n",__FUNCT__," error message reading rifts outline ",riftname);
 			mexErrMsgTxt(" ");
@@ -259,5 +254,5 @@
 
 	/*Associate elements with segments: */
-	noerr=AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
+	AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
 
 	/*Order segments so that their normals point outside the domain: */
Index: /issm/trunk/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.cpp
===================================================================
--- /issm/trunk/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 4452)
+++ /issm/trunk/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 4453)
@@ -53,7 +53,4 @@
 	int     numrifts;
 
-	/* error handling: */
-	int		noerr=1;	
-  
 	/* verify correct usage: */
 	if (nlhs==0 && nrhs==0) {
@@ -176,5 +173,5 @@
 
 	/*Order segments so that their normals point outside the domain: */
-	noerr=OrderSegments(&segments_in,num_seg, index_in,nel);
+	OrderSegments(&segments_in,num_seg, index_in,nel);
 
 	
Index: /issm/trunk/src/mex/TriMeshRefine/TriMeshRefine.cpp
===================================================================
--- /issm/trunk/src/mex/TriMeshRefine/TriMeshRefine.cpp	(revision 4452)
+++ /issm/trunk/src/mex/TriMeshRefine/TriMeshRefine.cpp	(revision 4453)
@@ -43,7 +43,4 @@
 	char*   order=NULL;
 
-	/* error handling: */
-	int		noerr=1;	
-  
 	/* Triangle structures: */
 	struct triangulateio in,out;
@@ -276,9 +273,9 @@
 
 	/*Associate elements with segments: */
-	noerr=AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
+	AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
 
 	/*Order segments so that their normals point outside the domain: */
 	if(!strcmp(order,"yes")){
-		noerr=OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
+		OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
 	}
 	
Index: /issm/trunk/src/mex/UpdateGeometry/UpdateGeometry.cpp
===================================================================
--- /issm/trunk/src/mex/UpdateGeometry/UpdateGeometry.cpp	(revision 4452)
+++ /issm/trunk/src/mex/UpdateGeometry/UpdateGeometry.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-/*diverse: */
-int         noerr             = 1;
 
 /*input datasets: */
Index: /issm/trunk/src/mex/UpdateVertexPositions/UpdateVertexPositions.cpp
===================================================================
--- /issm/trunk/src/mex/UpdateVertexPositions/UpdateVertexPositions.cpp	(revision 4452)
+++ /issm/trunk/src/mex/UpdateVertexPositions/UpdateVertexPositions.cpp	(revision 4453)
@@ -7,50 +7,47 @@
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
 
-/*diverse: */
-int         noerr             = 1;
+	/*input datasets: */
+	Elements*   elements          = NULL;
+	Nodes      *nodes             = NULL;
+	Vertices    *vertices          = NULL;
+	Loads     *loads             = NULL;
+	Materials   *materials         = NULL;
+	Parameters *parameters        = NULL;
 
-/*input datasets: */
-Elements*   elements          = NULL;
-Nodes      *nodes             = NULL;
-Vertices    *vertices          = NULL;
-Loads     *loads             = NULL;
-Materials   *materials         = NULL;
-Parameters *parameters        = NULL;
+	/*Boot module: */
+	MODULEBOOT();
 
-/*Boot module: */
-MODULEBOOT();
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&UpdateVertexPositionsUsage);
 
-/*checks on arguments on the matlab side: */
-CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&UpdateVertexPositionsUsage);
+	/*Input datasets: */
+	FetchData((DataSet**)&elements,ELEMENTSIN);
+	FetchData((DataSet**)&nodes,NODESIN);
+	FetchData((DataSet**)&vertices,VERTICESIN);
+	FetchData((DataSet**)&loads,LOADSIN);
+	FetchData((DataSet**)&materials,MATERIALSIN);
+	FetchParams(&parameters,PARAMETERSIN);
 
-/*Input datasets: */
-FetchData((DataSet**)&elements,ELEMENTSIN);
-FetchData((DataSet**)&nodes,NODESIN);
-FetchData((DataSet**)&vertices,VERTICESIN);
-FetchData((DataSet**)&loads,LOADSIN);
-FetchData((DataSet**)&materials,MATERIALSIN);
-FetchParams(&parameters,PARAMETERSIN);
+	/*call "x" code layer*/
+	UpdateVertexPositionsx(elements,nodes,vertices,loads, materials,parameters);
 
-/*call "x" code layer*/
-UpdateVertexPositionsx(elements,nodes,vertices,loads, materials,parameters);
+	/*write output datasets: */
+	WriteData(ELEMENTS,elements);
+	WriteData(NODES,nodes);
+	WriteData(VERTICES,vertices);
+	WriteData(LOADS,loads);
+	WriteData(MATERIALS,materials);
+	WriteParams(PARAMETERS,parameters);
 
-/*write output datasets: */
-WriteData(ELEMENTS,elements);
-WriteData(NODES,nodes);
-WriteData(VERTICES,vertices);
-WriteData(LOADS,loads);
-WriteData(MATERIALS,materials);
-WriteParams(PARAMETERS,parameters);
+	/*Free ressources: */
+	delete elements;
+	delete nodes;
+	delete vertices;
+	delete loads;
+	delete materials;
+	delete parameters;
 
-/*Free ressources: */
-delete elements;
-delete nodes;
-delete vertices;
-delete loads;
-delete materials;
-delete parameters;
-
-/*end module: */
-MODULEEND();
+	/*end module: */
+	MODULEEND();
 }
 
Index: /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp
===================================================================
--- /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp	(revision 4452)
+++ /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp	(revision 4453)
@@ -6,7 +6,4 @@
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
-
-	/*diverse: */
-	int   noerr=1;
 
 	/*input datasets: */
