Index: /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp
===================================================================
--- /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp	(revision 3878)
+++ /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp	(revision 3879)
@@ -11,5 +11,5 @@
 
 void SystemMatricesx(Mat* pKgg, Vec* ppg,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, Parameters* parameters,
-		int kflag,int pflag,int connectivity,int numberofdofspernode,int analysis_type,int sub_analysis_type){
+		int kflag,int pflag,int analysis_type,int sub_analysis_type){
 	
 	extern int num_procs;
@@ -18,5 +18,7 @@
 	/*intermediary: */
 	int gsize;
-
+	int connectivity;
+	int numberofdofspernode;
+	
 	/*output: */
 	Mat Kgg=NULL;
@@ -28,4 +30,8 @@
 	loads->Configure(elements, loads, nodes,vertices, materials,parameters);
 	parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
+
+	/*Recover parameters: */
+	parameters->FindParam(&connectivity,ConnectivityEnum);
+	parameters->FindParam(&numberofdofspernode,NumberOfDofsPerNodeEnum);
 
 	/*Get size of matrix: */
Index: /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.h
===================================================================
--- /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.h	(revision 3878)
+++ /issm/trunk/src/c/SystemMatricesx/SystemMatricesx.h	(revision 3879)
@@ -11,5 +11,5 @@
 /* local prototypes: */
 void SystemMatricesx(Mat* pKgg, Vec* ppg,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads,DataSet* materials, Parameters* parameters,
-		int kflag,int pflag,int connectivity,int numberofdofspernode,int analysis_type,int sub_analysis_type); 
+		int kflag,int pflag,int analysis_type,int sub_analysis_type); 
 
 #endif  /* _SYSTEMMATRICESX_H */
Index: /issm/trunk/src/c/parallel/diagnostic_core_linear.cpp
===================================================================
--- /issm/trunk/src/c/parallel/diagnostic_core_linear.cpp	(revision 3878)
+++ /issm/trunk/src/c/parallel/diagnostic_core_linear.cpp	(revision 3879)
@@ -11,5 +11,5 @@
 
 	/*parameters:*/
-	int kflag,pflag,connectivity,numberofdofspernode;
+	int kflag,pflag;
 	int verbose=0;
 	char* solver_string=NULL;
@@ -28,6 +28,4 @@
 	/*Recover parameters: */
 	kflag=1; pflag=1;
-	fem->parameters->FindParam(&connectivity,ConnectivityEnum);
-	fem->parameters->FindParam(&numberofdofspernode,NumberOfDofsPerNodeEnum);
 	fem->parameters->FindParam(&verbose,VerboseEnum);
 	fem->parameters->FindParam(&solver_string,SolverStringEnum);
@@ -35,5 +33,5 @@
 	//*Generate system matrices
 	if (verbose) _printf_("   Generating matrices\n");
-	SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,kflag,pflag,connectivity,numberofdofspernode,analysis_type,sub_analysis_type); 
+	SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,kflag,pflag,analysis_type,sub_analysis_type); 
 
 	if (verbose) _printf_("   Generating penalty matrices\n");
Index: /issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp
===================================================================
--- /issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp	(revision 3878)
+++ /issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp	(revision 3879)
@@ -34,5 +34,5 @@
 
 	/*parameters:*/
-	int kflag,pflag,connectivity,numberofdofspernode;
+	int kflag,pflag;
 	char* solver_string=NULL;
 	int verbose=0;
@@ -40,6 +40,4 @@
 	/*Recover parameters: */
 	kflag=1; pflag=1;
-	fem->FindParam(&connectivity,ConnectivityEnum);
-	fem->FindParam(&numberofdofspernode,NumberOfDofsPerNodeEnum);
 	fem->FindParam(&numberofnodes,NumberOfNodesEnum);
 	fem->FindParam(&solver_string,SolverStringEnum);
@@ -71,5 +69,5 @@
 		if (verbose) _printf_("   Generating matrices\n");
 		//*Generate system matrices
-		SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->vertices,loads,fem->materials,fem->parameters,kflag,pflag,connectivity,numberofdofspernode,analysis_type,sub_analysis_type); 
+		SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->vertices,loads,fem->materials,fem->parameters,kflag,pflag,analysis_type,sub_analysis_type); 
 
 		if (verbose) _printf_("   Generating penalty matrices\n");
@@ -138,5 +136,5 @@
 		kflag=1; pflag=0; //stiffness generation only
 	
-		SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->vertices,loads,fem->materials,fem->parameters,kflag,pflag,connectivity,numberofdofspernode,analysis_type,sub_analysis_type); 
+		SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->vertices,loads,fem->materials,fem->parameters,kflag,pflag,analysis_type,sub_analysis_type); 
 		Reducematrixfromgtofx(&Kff,&Kfs,Kgg,fem->Gmn,fem->nodesets);
 		MatFree(&Kgg);VecFree(&pg);
Index: /issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp
===================================================================
--- /issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp	(revision 3878)
+++ /issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp	(revision 3879)
@@ -34,5 +34,5 @@
 
 	/*parameters:*/
-	int kflag,pflag,connectivity,numberofdofspernode;
+	int kflag,pflag;
 	char* solver_string=NULL;
 	int verbose=0;
@@ -42,6 +42,4 @@
 	kflag=1; pflag=1;
 
-	fem->parameters->FindParam(&connectivity,ConnectivityEnum);
-	fem->parameters->FindParam(&numberofdofspernode,NumberOfDofsPerNodeEnum);
 	fem->parameters->FindParam(&numberofnodes,NumberOfNodesEnum);
 	fem->parameters->FindParam(&solver_string,SolverStringEnum);
@@ -65,5 +63,5 @@
 			/*Compute Kgg_nopenalty and pg_nopenalty once for all: */
 			if (count==1){
-				SystemMatricesx(&Kgg_nopenalty, &pg_nopenalty,fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,kflag,pflag,connectivity,numberofdofspernode,analysis_type,sub_analysis_type); 
+				SystemMatricesx(&Kgg_nopenalty, &pg_nopenalty,fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,kflag,pflag,analysis_type,sub_analysis_type); 
 			}
 
@@ -76,5 +74,5 @@
 		}
 		else{
-			SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,kflag,pflag,connectivity,numberofdofspernode,analysis_type,sub_analysis_type); 
+			SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,kflag,pflag,analysis_type,sub_analysis_type); 
 			//apply penalties
 			PenaltySystemMatricesx(Kgg, pg,&melting_offset,fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,kflag,pflag,analysis_type,sub_analysis_type); 
Index: /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp
===================================================================
--- /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 3878)
+++ /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 3879)
@@ -18,6 +18,4 @@
 	Parameters* parameters=NULL;
 	int         kflag,pflag;
-	int         connectivity;
-	int         numberofdofspernode;
 	int         analysis_type;
 	int         sub_analysis_type;
@@ -42,6 +40,4 @@
 
 	/*parameters: */
-	parameters->FindParam(&connectivity,ConnectivityEnum);
-	parameters->FindParam(&numberofdofspernode,NumberOfDofsPerNodeEnum);
 	parameters->FindParam(&kflag,KflagEnum);
 	parameters->FindParam(&pflag,PflagEnum);
@@ -51,5 +47,5 @@
 
 	/*!Generate internal degree of freedom numbers: */
-	SystemMatricesx(&Kgg, &pg,elements,nodes,vertices,loads,materials,parameters,kflag,pflag,connectivity,numberofdofspernode,analysis_type,sub_analysis_type); 
+	SystemMatricesx(&Kgg, &pg,elements,nodes,vertices,loads,materials,parameters,kflag,pflag,analysis_type,sub_analysis_type); 
 
 	/*write output datasets: */
