Index: /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp
===================================================================
--- /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp	(revision 4102)
+++ /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp	(revision 4103)
@@ -17,6 +17,4 @@
 	DataSet* materials=NULL;
 	Parameters* parameters=NULL;
-	int      analysis_type;
-	int      sub_analysis_type;
 	Vec      ug=NULL;
 
@@ -36,9 +34,7 @@
 	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);
+	GetSolutionFromInputsx(&ug,elements, nodes,vertices,loads, materials,parameters);
 
 	/*write output datasets: */
@@ -60,5 +56,5 @@
 {
 	_printf_("\n");
-	_printf_("   usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters,analysis_type,sub_analysis_type);\n",__FUNCT__);
+	_printf_("   usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters);\n",__FUNCT__);
 	_printf_("\n");
 }
Index: /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.h
===================================================================
--- /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.h	(revision 4102)
+++ /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.h	(revision 4103)
@@ -23,6 +23,4 @@
 #define MATERIALS (mxArray*)prhs[4]
 #define PARAMETERS (mxArray*)prhs[5]
-#define ANALYSISTYPE (mxArray*)prhs[6]
-#define SUBANALYSISTYPE (mxArray*)prhs[7]
 
 /* serial output macros: */
@@ -33,5 +31,5 @@
 #define NLHS  1
 #undef NRHS
-#define NRHS  8
+#define NRHS  6
 
 
Index: /issm/trunk/src/mex/Gradj/Gradj.cpp
===================================================================
--- /issm/trunk/src/mex/Gradj/Gradj.cpp	(revision 4102)
+++ /issm/trunk/src/mex/Gradj/Gradj.cpp	(revision 4103)
@@ -8,20 +8,17 @@
 
 	/*diverse: */
-	int   noerr=1;
+	int         noerr        = 1;
 
 	/*input datasets: */
-	DataSet* elements=NULL;
-	DataSet* nodes=NULL;
-	DataSet* vertices=NULL;
-	DataSet* loads=NULL;
-	DataSet* materials=NULL;
-	Parameters* parameters=NULL;
-	int      control_type;
-	int      analysis_type;
-	int      sub_analysis_type;
-	int      numberofnodes;
+	DataSet    *elements     = NULL;
+	DataSet    *nodes        = NULL;
+	DataSet    *vertices     = NULL;
+	DataSet    *loads        = NULL;
+	DataSet    *materials    = NULL;
+	Parameters *parameters   = NULL;
+	int         control_type;
 
 	/* output datasets: */
-	Vec grad_g=NULL;
+	Vec         grad_g       = NULL;
 
 
@@ -39,11 +36,8 @@
 	FetchData(&materials,MATERIALS);
 	FetchParams(&parameters,PARAMETERS);
-	parameters->FindParam(&numberofnodes,NumberOfNodesEnum);
 	parameters->FindParam(&control_type,ControlTypeEnum);
-	FetchData(&analysis_type,ANALYSIS);
-	FetchData(&sub_analysis_type,SUBANALYSIS);
 
 	/*!Call core code: */
-	Gradjx(&grad_g,numberofnodes,elements,nodes,vertices,loads,materials,parameters,analysis_type,sub_analysis_type,control_type);
+	Gradjx(&grad_g,elements,nodes,vertices,loads,materials,parameters,control_type);
 
 	/*write output : */
Index: /issm/trunk/src/mex/Gradj/Gradj.h
===================================================================
--- /issm/trunk/src/mex/Gradj/Gradj.h	(revision 4102)
+++ /issm/trunk/src/mex/Gradj/Gradj.h	(revision 4103)
@@ -24,6 +24,4 @@
 #define MATERIALS (mxArray*)prhs[4]
 #define PARAMETERS (mxArray*)prhs[5]
-#define ANALYSIS (mxArray*)prhs[6]
-#define SUBANALYSIS (mxArray*)prhs[7]
 
 /* serial output macros: */
@@ -34,5 +32,5 @@
 #define NLHS  1
 #undef NRHS
-#define NRHS  8
+#define NRHS  6
 
 #endif  /* _GRADJ_H */
Index: /issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp
===================================================================
--- /issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp	(revision 4102)
+++ /issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp	(revision 4103)
@@ -1,7 +1,7 @@
-/*\file InputExtrude.c
- *\brief: extrude input vertically
+/*\file InputDuplicate.c
+ *\brief: duplicate input
  */
 
-#include "./InputExtrude.h"
+#include "./InputDuplicate.h"
 
 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
@@ -17,5 +17,5 @@
 	DataSet* materials=NULL;
 	Parameters* parameters=NULL;
-	int      NameEnum;
+	int      original_enum,new_enum; 
 
 	/*Boot module: */
@@ -23,5 +23,5 @@
 
 	/*checks on arguments on the matlab side: */
-	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputExtrudeUsage);
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputDuplicateUsage);
 
 	/*Input datasets: */
@@ -33,9 +33,9 @@
 	FetchParams(&parameters,PARAMETERS);
 	
-	FetchData(&reinitialized_enum,REINITIALIZEENUM);
 	FetchData(&original_enum,ORIGINALENUM);
+	FetchData(&new_enum,NEWENUM);
 
 	/*!Call core code: */
-	InputDuplicatex( elements, nodes, vertices, loads, materials,parameters,reinitialized_enum, original_enum);
+	InputDuplicatex( elements, nodes, vertices, loads, materials,parameters,original_enum, new_enum);
 
 	/*write output : */
@@ -55,8 +55,8 @@
 }
 
-void InputExtrudeUsage(void)
+void InputDuplicateUsage(void)
 {
 	_printf_("\n");
-	_printf_("   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, reinitialized_enum,original_enum);\n",__FUNCT__);
+	_printf_("   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, original_enum,new_enum);\n",__FUNCT__);
 	_printf_("\n");
 }
Index: /issm/trunk/src/mex/InputDuplicate/InputDuplicate.h
===================================================================
--- /issm/trunk/src/mex/InputDuplicate/InputDuplicate.h	(revision 4102)
+++ /issm/trunk/src/mex/InputDuplicate/InputDuplicate.h	(revision 4103)
@@ -1,11 +1,11 @@
 /*
-	InputExtrude.h
+	InputDuplicate.h
 */
 
-#ifndef _INPUTEXTRUDE_H
-#define _INPUTEXTRUDE_H
+#ifndef _INPUTDUPLICATE_H
+#define _INPUTDUPLICATE_H
 
 /* local prototypes: */
-void InputExtrudeUsage(void);
+void InputDuplicateUsage(void);
 
 #include "../../c/modules/modules.h"
@@ -14,5 +14,5 @@
 
 #undef __FUNCT__ 
-#define __FUNCT__  "InputExtrude"
+#define __FUNCT__  "InputDuplicate"
 
 /* serial input macros: */
@@ -23,6 +23,6 @@
 #define MATERIALS (mxArray*)prhs[4]
 #define PARAMETERS (mxArray*)prhs[5]
-#define REINITIALIZEENUM (mxArray*)prhs[6]
-#define ORIGINALENUM (mxArray*)prhs[7]
+#define ORIGINALENUM (mxArray*)prhs[6]
+#define NEWENUM (mxArray*)prhs[7]
 
 /* serial output macros: */
@@ -35,3 +35,3 @@
 #define NRHS  8
 
-#endif  /* _INPUTEXTRUDE_H */
+#endif  /* _INPUTDUPLICATE_H */
Index: /issm/trunk/src/mex/InputUpdateFromConstant/UpdateInputsFromConstant.cpp
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromConstant/UpdateInputsFromConstant.cpp	(revision 4103)
+++ /issm/trunk/src/mex/InputUpdateFromConstant/UpdateInputsFromConstant.cpp	(revision 4103)
@@ -0,0 +1,62 @@
+/*\file UpdateInputsFromConstant.c
+*\brief: update elements properties using a constant value
+*/
+
+#include "./UpdateInputsFromConstant.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;
+double   constant;
+int      name;
+
+/*Boot module: */
+MODULEBOOT();
+
+/*checks on arguments on the matlab side: */
+CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&UpdateInputsFromConstantUsage);
+
+/*Input datasets: */
+FetchData(&elements,ELEMENTSIN);
+FetchData(&nodes,NODESIN);
+FetchData(&vertices,VERTICESIN);
+FetchData(&loads,LOADSIN);
+FetchData(&materials,MATERIALSIN);
+FetchParams(&parameters,PARAMETERSIN);
+FetchData(&constant,CONSTANT);
+FetchData(&name,NAME);
+
+/*!Generate internal degree of freedom numbers: */
+UpdateInputsFromConstantx(elements,nodes,vertices,loads, materials,parameters,constant,name);
+
+/*write output datasets: */
+WriteData(ELEMENTS,elements);
+WriteData(LOADS,loads);
+
+/*Free ressources: */
+delete elements;
+delete nodes;
+delete vertices;
+delete loads;
+delete materials;
+delete parameters;
+
+/*end module: */
+MODULEEND();
+}
+
+void UpdateInputsFromConstantUsage(void)
+{
+	_printf_("\n");
+	_printf_("   usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,constant,name);\n",__FUNCT__);
+	_printf_("\n");
+}
Index: /issm/trunk/src/mex/InputUpdateFromConstant/UpdateInputsFromConstant.h
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromConstant/UpdateInputsFromConstant.h	(revision 4103)
+++ /issm/trunk/src/mex/InputUpdateFromConstant/UpdateInputsFromConstant.h	(revision 4103)
@@ -0,0 +1,40 @@
+/*
+	UpdateInputsFromConstant.h
+*/
+
+#ifndef _UPDATEINPUTSFROMCONSTANT_H
+#define _UPDATEINPUTSFROMCONSTANT_H
+
+/* local prototypes: */
+void UpdateInputsFromConstantUsage(void);
+
+#include "../../c/modules/modules.h"
+#include "../../c/DataSet/DataSet.h"
+#include "../../c/shared/shared.h"
+#include "../../c/EnumDefinitions/EnumDefinitions.h"
+
+#undef __FUNCT__ 
+#define __FUNCT__  "UpdateInputsFromConstant"
+
+/* serial input macros: */
+#define ELEMENTSIN (mxArray*)prhs[0]
+#define NODESIN (mxArray*)prhs[1]
+#define VERTICESIN (mxArray*)prhs[2]
+#define LOADSIN (mxArray*)prhs[3]
+#define MATERIALSIN (mxArray*)prhs[4]
+#define PARAMETERSIN (mxArray*)prhs[5]
+#define CONSTANT (mxArray*)prhs[6]
+#define NAME (mxArray*)prhs[7]
+
+/* serial output macros: */
+#define ELEMENTS (mxArray**)&plhs[0]
+#define LOADS (mxArray**)&plhs[1]
+
+/* serial arg counts: */
+#undef NLHS
+#define NLHS  2
+#undef NRHS
+#define NRHS  8
+
+#endif  /* _UPDATEINPUTSFROMCONSTANT_H */
+
Index: /issm/trunk/src/mex/Makefile.am
===================================================================
--- /issm/trunk/src/mex/Makefile.am	(revision 4102)
+++ /issm/trunk/src/mex/Makefile.am	(revision 4103)
@@ -26,5 +26,4 @@
 				FieldAverageOntoVertices\
 				FieldDepthAverage\
-				FieldExtrude\
 				GetSolutionFromInputs\
 				Gradj\
@@ -255,7 +254,4 @@
 			  SystemMatrices/SystemMatrices.h
 
-FieldExtrude_SOURCES = FieldExtrude/FieldExtrude.cpp\
-			  FieldExtrude/FieldExtrude.h
-
 TriMesh_SOURCES = TriMesh/TriMesh.cpp\
 			  TriMesh/TriMesh.h
Index: /issm/trunk/src/mex/MassFlux/MassFlux.cpp
===================================================================
--- /issm/trunk/src/mex/MassFlux/MassFlux.cpp	(revision 4102)
+++ /issm/trunk/src/mex/MassFlux/MassFlux.cpp	(revision 4103)
@@ -17,8 +17,7 @@
 	DataSet* materials=NULL;
 	Parameters* parameters=NULL;
+
 	double*  segments=NULL;
 	int      num_segments;
-	double*  ug=NULL;
-	mxArray* pfield=NULL;
 
 	/* output datasets: */
@@ -40,9 +39,7 @@
 	parameters->FindParam(&segments,&num_segments,NULL,QmuMassFluxSegmentsEnum);
 
-	/*results: */
-	FetchData(&ug,NULL,NULL,UG);
+	/*!Compute mass flux along the profile: */
+	MassFluxx(&mass_flux, elements,nodes,vertices,loads,materials,parameters,segments,num_segments);
 
-	/*!Compute mass flux along the profile: */
-	MassFluxx(&mass_flux, elements,nodes,vertices,loads,materials,parameters,segments,num_segments,ug);
 
 	/*write output datasets: */
@@ -56,5 +53,4 @@
 	delete materials;
 	delete parameters;
-	xfree((void**)&ug);
 
 	/*end module: */
@@ -65,5 +61,5 @@
 {
 	_printf_("\n");
-	_printf_("   usage: [Kgg,pg] = %s(eleemnts,nodes,loads,materials,params,analysis_type);\n",__FUNCT__);
+	_printf_("   usage: [mass_flux] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
 	_printf_("\n");
 }
Index: /issm/trunk/src/mex/MeshPartition/MeshPartition.cpp
===================================================================
--- /issm/trunk/src/mex/MeshPartition/MeshPartition.cpp	(revision 4102)
+++ /issm/trunk/src/mex/MeshPartition/MeshPartition.cpp	(revision 4103)
@@ -13,5 +13,5 @@
 	nel2d_ext,nods2d_ext,elements2d_ext,
 	%Diverse
-	numlayers,meshtype)
+	numlayers,dim)
 
 	output:
@@ -30,5 +30,5 @@
 
 	/* required input: */
-	char* meshtype=NULL;
+	int dim;
 	int numberofelements;
 	int numberofgrids;
@@ -57,12 +57,10 @@
 
 	/*Fetch data: */
-	FetchData(&meshtype,mxGetField(MODEL,0,"type"));
+	FetchData(&dim,mxGetField(MODEL,0,"type"));
 	FetchData(&numberofelements,mxGetField(MODEL,0,"numberofelements"));
 	FetchData(&numberofgrids,mxGetField(MODEL,0,"numberofgrids"));
 	FetchData(&elements,NULL,&elements_width,mxGetField(MODEL,0,"elements"));
 
-	
-	
-	if (strcmp(meshtype,"3d")==0){
+	if (dim==3){
 	
 		FetchData(&numberofelements2d,mxGetField(MODEL,0,"numberofelements2d"));
@@ -76,5 +74,6 @@
 	/*Run partitioning algorithm based on a "clever" use of the Metis partitioner: */
 	MeshPartitionx(&int_element_partitioning,&int_node_partitioning,numberofelements,numberofgrids,elements,
-		numberofelements2d,numberofgrids2d,elements2d,numlayers,elements_width,meshtype,numareas);
+		numberofelements2d,numberofgrids2d,elements2d,numlayers,elements_width,dim,numareas);
+
 
 	/*Post process node_partitioning and element_partitioning to be in double format. Metis needed them in int* format: */
Index: /issm/trunk/src/mex/Misfit/Misfit.cpp
===================================================================
--- /issm/trunk/src/mex/Misfit/Misfit.cpp	(revision 4102)
+++ /issm/trunk/src/mex/Misfit/Misfit.cpp	(revision 4103)
@@ -17,6 +17,4 @@
 	DataSet* materials=NULL;
 	Parameters* parameters=NULL;
-	int      analysis_type;
-	int      sub_analysis_type;
 
 	/* output datasets: */
@@ -36,9 +34,7 @@
 	FetchData(&materials,MATERIALS);
 	FetchParams(&parameters,PARAMETERS);
-	FetchData(&analysis_type,ANALYSIS);
-	FetchData(&sub_analysis_type,SUBANALYSIS);
 
 	/*!Call core code: */
-	Misfitx(&J, elements,nodes,vertices,loads,materials,parameters,analysis_type,sub_analysis_type);
+	Misfitx(&J, elements,nodes,vertices,loads,materials,parameters);
 
 	/*write output : */
Index: /issm/trunk/src/mex/Misfit/Misfit.h
===================================================================
--- /issm/trunk/src/mex/Misfit/Misfit.h	(revision 4102)
+++ /issm/trunk/src/mex/Misfit/Misfit.h	(revision 4103)
@@ -23,6 +23,4 @@
 #define MATERIALS (mxArray*)prhs[4]
 #define PARAMETERS (mxArray*)prhs[5]
-#define ANALYSIS (mxArray*)prhs[6]
-#define SUBANALYSIS (mxArray*)prhs[7]
 
 /* serial output macros: */
@@ -33,5 +31,5 @@
 #define NLHS  1
 #undef NRHS
-#define NRHS  8
+#define NRHS  6
 
 #endif  /* _MISFIT_H */
Index: /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp
===================================================================
--- /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp	(revision 4102)
+++ /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp	(revision 4103)
@@ -17,6 +17,4 @@
 	DataSet* materials=NULL;
 	Parameters* parameters=NULL;
-	int      analysis_type;
-	int      sub_analysis_type;
 
 	/*output: */
@@ -38,10 +36,6 @@
 	FetchParams(&parameters,PARAMETERS);
 
-	/*parameters: */
-	FetchData(&analysis_type,ANALYSIS);
-	FetchData(&sub_analysis_type,SUBANALYSIS);
-
 	/*!Generate internal degree of freedom numbers: */
-	PenaltyConstraintsx(&converged, &num_unstable_constraints, elements,nodes,vertices, loads,materials,parameters,analysis_type,sub_analysis_type); 
+	PenaltyConstraintsx(&converged, &num_unstable_constraints, elements,nodes,vertices, loads,materials,parameters);
 
 	/*write output datasets: */
@@ -65,5 +59,5 @@
 {
 	_printf_("\n");
-	_printf_("   usage: [loads, constraints_converged, num_unstable_constraints] = %s(elements,nodes,vertices,loads,materials,params,analysis_type,sub_analysis_type);\n",__FUNCT__);
+	_printf_("   usage: [loads, constraints_converged, num_unstable_constraints] = %s(elements,nodes,vertices,loads,materials,params);\n",__FUNCT__);
 	_printf_("\n");
 }
Index: /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.h
===================================================================
--- /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.h	(revision 4102)
+++ /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.h	(revision 4103)
@@ -23,6 +23,4 @@
 #define MATERIALS (mxArray*)prhs[4]
 #define PARAMETERS (mxArray*)prhs[5]
-#define ANALYSIS (mxArray*)prhs[6]
-#define SUBANALYSIS (mxArray*)prhs[7]
 
 /* serial output macros: */
@@ -35,5 +33,5 @@
 #define NLHS  3
 #undef NRHS
-#define NRHS  8
+#define NRHS  6
 
 #endif  /* _PENALTYCONSTRAINTS_H */
Index: /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp
===================================================================
--- /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp	(revision 4102)
+++ /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp	(revision 4103)
@@ -23,6 +23,4 @@
 	Parameters* parameters=NULL;
 	int      kflag,pflag;
-	int      analysis_type;
-	int      sub_analysis_type;
 	
 	/*Boot module: */
@@ -45,9 +43,7 @@
 	parameters->FindParam(&kflag,KflagEnum);
 	parameters->FindParam(&pflag,PflagEnum);
-	FetchData(&analysis_type,ANALYSIS);
-	FetchData(&sub_analysis_type,SUBANALYSIS);
 
 	/*!Generate stiffnesses from penalties: */
-	PenaltySystemMatricesx(Kgg, pg,&kmax,elements,nodes,vertices,loads,materials,parameters,kflag,pflag,analysis_type,sub_analysis_type); 
+	PenaltySystemMatricesx(Kgg, pg,&kmax,elements,nodes,vertices,loads,materials,parameters,kflag,pflag);
 
 	/*write output datasets: */
@@ -73,5 +69,5 @@
 {
 	_printf_("\n");
-	_printf_("   usage: [Kgg,pg] = %s(Kggin,pgin,elements,nodes,vertices,loads,materials,params,analysis_type,sub_analysis_type);\n",__FUNCT__);
+	_printf_("   usage: [Kgg,pg] = %s(Kggin,pgin,elements,nodes,vertices,loads,materials,params);\n",__FUNCT__);
 	_printf_("\n");
 }
Index: /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.h
===================================================================
--- /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.h	(revision 4102)
+++ /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.h	(revision 4103)
@@ -26,6 +26,4 @@
 #define MATERIALS (mxArray*)prhs[6]
 #define PARAMETERS (mxArray*)prhs[7]
-#define ANALYSIS (mxArray*)prhs[8]
-#define SUBANALYSIS (mxArray*)prhs[9]
 
 /* serial output macros: */
@@ -38,5 +36,5 @@
 #define NLHS  3
 #undef NRHS
-#define NRHS  10
+#define NRHS  8
 
 #endif  /* _PENALTYSYSTEMMATRICES_H */
Index: /issm/trunk/src/mex/Qmu/Qmu.cpp
===================================================================
--- /issm/trunk/src/mex/Qmu/Qmu.cpp	(revision 4102)
+++ /issm/trunk/src/mex/Qmu/Qmu.cpp	(revision 4103)
@@ -17,7 +17,6 @@
 
 	/*input datasets: */
-	mxArray* models=NULL;
-	int      analysis_type;
-	int      sub_analysis_type;
+	mxArray* femmodel=NULL;
+	mxArray* parameters=NULL;
 	char*    dakota_input_file=NULL;
 	char*    dakota_output_file=NULL;
@@ -37,15 +36,15 @@
 
 	/*Input datasets: */
-	models=MODELS;
-	
-	FetchData(&analysis_type,mxGetField(PARAMETERS,0,"analysis_type"));
-	FetchData(&sub_analysis_type,mxGetField(PARAMETERS,0,"sub_analysis_type"));
-	FetchData(&dakota_input_file,mxGetField(PARAMETERS,0,"qmuinname"));
-	FetchData(&dakota_output_file,mxGetField(PARAMETERS,0,"qmuoutname"));
-	FetchData(&dakota_error_file,mxGetField(PARAMETERS,0,"qmuerrname"));
+	femmodel=FEMMODEL;
+
+	/*get parameters from femmodel structure: */
+	parameters=mxGetField(FEMMODEL,0,"parameters");
+
+	FetchData(&dakota_input_file,mxGetField(parameters,0,"qmuinname"));
+	FetchData(&dakota_output_file,mxGetField(parameters,0,"qmuoutname"));
+	FetchData(&dakota_error_file,mxGetField(parameters,0,"qmuerrname"));
 
 	/*!Generate internal degree of freedom numbers: */
-	Qmux(models,analysis_type,sub_analysis_type,dakota_input_file,dakota_output_file,dakota_error_file);
-
+	Qmux(femmodel,dakota_input_file,dakota_output_file,dakota_error_file);
 
 	/*Free ressources:*/
@@ -61,5 +60,5 @@
 void QmuUsage(void){
 	_printf_("\n");
-	_printf_("   usage: %s(models,parameters);\n",__FUNCT__);
+	_printf_("   usage: %s(femmodel,parameters);\n",__FUNCT__);
 	_printf_("\n");
 }
Index: /issm/trunk/src/mex/Qmu/Qmu.h
===================================================================
--- /issm/trunk/src/mex/Qmu/Qmu.h	(revision 4102)
+++ /issm/trunk/src/mex/Qmu/Qmu.h	(revision 4103)
@@ -19,6 +19,5 @@
 
 /* serial input macros: */
-#define MODELS (mxArray*)prhs[0]
-#define PARAMETERS (mxArray*)prhs[1]
+#define FEMMODEL (mxArray*)prhs[0]
 
 /* serial output macros: */
@@ -28,5 +27,5 @@
 #define NLHS  0
 #undef NRHS
-#define NRHS  2
+#define NRHS  1
 
 
Index: /issm/trunk/src/mex/SpcNodes/SpcNodes.cpp
===================================================================
--- /issm/trunk/src/mex/SpcNodes/SpcNodes.cpp	(revision 4102)
+++ /issm/trunk/src/mex/SpcNodes/SpcNodes.cpp	(revision 4103)
@@ -17,5 +17,5 @@
 
 	/* output datasets: */
-	DofVec*         yg=NULL;
+	Vec         yg=NULL;
 
 	/*Boot module: */
Index: /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp
===================================================================
--- /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 4102)
+++ /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 4103)
@@ -18,6 +18,4 @@
 	Parameters* parameters=NULL;
 	int         kflag,pflag;
-	int         analysis_type;
-	int         sub_analysis_type;
 	
 	/* output datasets: */
@@ -43,9 +41,6 @@
 	parameters->FindParam(&pflag,PflagEnum);
 
-	FetchData(&analysis_type,ANALYSIS);
-	FetchData(&sub_analysis_type,SUBANALYSIS);
-
 	/*!Generate internal degree of freedom numbers: */
-	SystemMatricesx(&Kgg, &pg,elements,nodes,vertices,loads,materials,parameters,kflag,pflag,analysis_type,sub_analysis_type); 
+	SystemMatricesx(&Kgg, &pg,elements,nodes,vertices,loads,materials,parameters,kflag,pflag);
 
 	/*write output datasets: */
@@ -70,5 +65,5 @@
 {
 	_printf_("\n");
-	_printf_("   usage: [Kgg,pg] = %s(elements,nodes,vertices,loads,materials,parameters,analysis_type,sub_analysis_type);\n",__FUNCT__);
+	_printf_("   usage: [Kgg,pg] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
 	_printf_("\n");
 }
Index: /issm/trunk/src/mex/SystemMatrices/SystemMatrices.h
===================================================================
--- /issm/trunk/src/mex/SystemMatrices/SystemMatrices.h	(revision 4102)
+++ /issm/trunk/src/mex/SystemMatrices/SystemMatrices.h	(revision 4103)
@@ -24,6 +24,4 @@
 #define MATERIALS (mxArray*)prhs[4]
 #define PARAMETERS (mxArray*)prhs[5]
-#define ANALYSIS (mxArray*)prhs[6]
-#define SUBANALYSIS (mxArray*)prhs[7]
 
 /* serial output macros: */
@@ -35,5 +33,5 @@
 #define NLHS  2
 #undef NRHS
-#define NRHS  8
+#define NRHS  6
 
 #endif  /* _SYSTEMMATRICES_H */
