Index: /issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp
===================================================================
--- /issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp	(revision 1840)
+++ /issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp	(revision 1841)
@@ -36,5 +36,5 @@
 #include "../parallel/parallel.h"
 
-void SpawnCoreParallel(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, FemModel* femmodels,ParameterInputs* inputs,int analysis_type,int sub_analysis_type,int counter){
+void SpawnCoreParallel(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, Model* model,ParameterInputs* inputs,int analysis_type,int sub_analysis_type,int counter){
 
 	int i;
@@ -58,8 +58,8 @@
 	
 	/*some parameters needed: */
-	femmodels[0].parameters->FindParam((void*)&debug,"debug");
+	model->DiagnosticHorizontal()->parameters->FindParam((void*)&debug,"debug");
 		
 	/*First off, recover the response descriptors for the response functions: */
-	param=(Param*)femmodels[0].parameters->FindParamObject("responsedescriptors");
+	param=(Param*)model->DiagnosticHorizontal()->parameters->FindParamObject("responsedescriptors");
 	if(!param)throw ErrorException(__FUNCT__," could not find response descriptors!");
 
@@ -67,6 +67,6 @@
 
 	/*Recover partitioning for dakota: */
-	femmodels[0].parameters->FindParam((void*)&qmu_npart,"qmu_npart");
-	femmodels[0].parameters->FindParam((void*)&qmu_part,"qmu_part");
+	model->DiagnosticHorizontal()->parameters->FindParam((void*)&qmu_npart,"qmu_npart");
+	model->DiagnosticHorizontal()->parameters->FindParam((void*)&qmu_part,"qmu_part");
 	#ifdef _DEBUG_
 	for(i=0;i<numresponses;i++){
@@ -116,5 +116,5 @@
 
 	/*Modify core inputs to reflect the dakota variables inputs: */
-	inputs->UpdateFromDakota(variables,variables_descriptors,numvariables,femmodels[0].parameters,qmu_part,qmu_npart); //femmodel #0 is the one holding the parameters for Dakota.
+	inputs->UpdateFromDakota(variables,variables_descriptors,numvariables,model->DiagnosticHorizontal()->parameters,qmu_part,qmu_npart); //diagnostic horiz model is the one holding the parameters for Dakota.
 
 	/*Run the analysis core solution sequence, with the updated inputs: */
@@ -123,5 +123,5 @@
 		if(debug)_printf_("Starting diagnostic core\n");
 
-		diagnostic_core(results,femmodels,inputs);
+		diagnostic_core(results,model,inputs);
 
 	}
@@ -129,5 +129,5 @@
 		
 		if(debug)_printf_("Starting thermal core\n");
-		thermal_core(results,femmodels,inputs);
+		thermal_core(results,model,inputs);
 
 	}
@@ -135,5 +135,5 @@
 
 		if(debug)_printf_("Starting prognostic core\n");
-		prognostic_core(results,femmodels,inputs);
+		prognostic_core(results,model,inputs);
 
 	}
@@ -141,5 +141,5 @@
 
 		if(debug)_printf_("Starting transient core\n");
-		transient_core(results,femmodels,inputs);
+		transient_core(results,model,inputs);
 
 	}
@@ -150,10 +150,10 @@
 	/*Now process the outputs, before computing the dakota responses: */
 	if(debug)_printf_("process results:\n");
-	ProcessResults(&results,femmodels,analysis_type); 
+	ProcessResults(&results,model,analysis_type); 
 	
 
 	/*compute responses on cpu 0: dummy for now! */
 	if(debug)_printf_("compute dakota responses:\n");
-	DakotaResponses(responses,responses_descriptors,numresponses,femmodels,results,analysis_type,sub_analysis_type);
+	DakotaResponses(responses,responses_descriptors,numresponses,model,results,analysis_type,sub_analysis_type);
 
 	/*Free ressources:*/
