Index: /issm/trunk/src/m/solutions/cielo/diagnostic_core_linear.m
===================================================================
--- /issm/trunk/src/m/solutions/cielo/diagnostic_core_linear.m	(revision 363)
+++ /issm/trunk/src/m/solutions/cielo/diagnostic_core_linear.m	(revision 364)
@@ -12,5 +12,5 @@
 	
 	%system matrices
-	[K_gg, p_g]=SystemMatrices(m.elements,m.nodes,m.loads,m.materials,m.parameters,inputs);
+	[K_gg, p_g]=SystemMatrices(m.elements,m.nodes,m.loads,m.materials,m.parameters,inputs,analysis_type);
 	
 	%Reduce tangent matrix from g size to f size
Index: /issm/trunk/src/m/solutions/cielo/diagnostic_core_nonlinear.m
===================================================================
--- /issm/trunk/src/m/solutions/cielo/diagnostic_core_nonlinear.m	(revision 363)
+++ /issm/trunk/src/m/solutions/cielo/diagnostic_core_nonlinear.m	(revision 364)
@@ -30,8 +30,8 @@
 		
 		%system matrices 
-		[K_gg_nopenalty , p_g_nopenalty]=SystemMatrices(m.elements,m.nodes,loads,m.materials,m.parameters,inputs);
+		[K_gg_nopenalty , p_g_nopenalty]=SystemMatrices(m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type);
 		
 		%penalties
-		[K_gg , p_g]=PenaltySystemMatrices(K_gg_nopenalty,p_g_nopenalty,m.elements,m.nodes,loads,m.materials,m.parameters,inputs);
+		[K_gg , p_g]=PenaltySystemMatrices(K_gg_nopenalty,p_g_nopenalty,m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type);
 
 
Index: /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp
===================================================================
--- /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp	(revision 363)
+++ /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp	(revision 364)
@@ -20,4 +20,5 @@
 	ParameterInputs* inputs=NULL;
 	int               analysis_type;
+	char*             analysis_type_string=NULL;
 	
 	/*Boot module: */
@@ -37,5 +38,8 @@
 	FetchData((void**)&kflag,NULL,NULL,mxGetField(PARAMETERS,0,"kflag"),"Integer",NULL);
 	FetchData((void**)&pflag,NULL,NULL,mxGetField(PARAMETERS,0,"pflag"),"Integer",NULL);
-	FetchData((void**)&analysis_type,NULL,NULL,mxGetField(PARAMETERS,0,"analysis_type"),"Integer",NULL);
+
+	FetchData((void**)&analysis_type_string,NULL,NULL,ANALYSIS,"String",NULL);
+	analysis_type=AnalysisTypeAsEnum(analysis_type_string);
+
 
 	/*Fetch inputs: */
@@ -58,4 +62,5 @@
 	MatFree(&Kgg);
 	VecFree(&pg);
+	xfree((void**)&analysis_type_string);
 
 	/*end module: */
Index: /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.h
===================================================================
--- /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.h	(revision 363)
+++ /issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.h	(revision 364)
@@ -25,4 +25,5 @@
 #define PARAMETERS (mxArray*)prhs[6]
 #define INPUTS (mxArray*)prhs[7]
+#define ANALYSIS (mxArray*)prhs[8]
 
 /* serial output macros: */
@@ -34,5 +35,5 @@
 #define NLHS  2
 #undef NRHS
-#define NRHS  8
+#define NRHS  9
 
 
Index: /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp
===================================================================
--- /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 363)
+++ /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 364)
@@ -19,4 +19,5 @@
 	int         numberofdofspernode;
 	ParameterInputs* inputs=NULL;
+	char*             analysis_type_string=NULL;
 	int               analysis_type;
 	
@@ -41,5 +42,7 @@
 	FetchData((void**)&connectivity,NULL,NULL,mxGetField(PARAMETERS,0,"connectivity"),"Integer",NULL);
 	FetchData((void**)&numberofdofspernode,NULL,NULL,mxGetField(PARAMETERS,0,"numberofdofspernode"),"Integer",NULL);
-	FetchData((void**)&analysis_type,NULL,NULL,mxGetField(PARAMETERS,0,"analysis_type"),"Integer",NULL);
+
+	FetchData((void**)&analysis_type_string,NULL,NULL,ANALYSIS,"String",NULL);
+	analysis_type=AnalysisTypeAsEnum(analysis_type_string);
 
 	/*Fetch inputs: */
@@ -56,4 +59,5 @@
 	
 	/*Free ressources: */
+	xfree((void**)&analysis_type_string);
 	delete elements;
 	delete nodes;
Index: /issm/trunk/src/mex/SystemMatrices/SystemMatrices.h
===================================================================
--- /issm/trunk/src/mex/SystemMatrices/SystemMatrices.h	(revision 363)
+++ /issm/trunk/src/mex/SystemMatrices/SystemMatrices.h	(revision 364)
@@ -23,4 +23,5 @@
 #define PARAMETERS (mxArray*)prhs[4]
 #define INPUTS (mxArray*)prhs[5]
+#define ANALYSIS (mxArray*)prhs[6]
 
 /* serial output macros: */
@@ -32,5 +33,5 @@
 #define NLHS  2
 #undef NRHS
-#define NRHS  6
+#define NRHS  7
 
 
