Changeset 1841
- Timestamp:
- 08/24/09 17:57:25 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp
r962 r1841 36 36 #include "../parallel/parallel.h" 37 37 38 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){38 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){ 39 39 40 40 int i; … … 58 58 59 59 /*some parameters needed: */ 60 femmodels[0].parameters->FindParam((void*)&debug,"debug");60 model->DiagnosticHorizontal()->parameters->FindParam((void*)&debug,"debug"); 61 61 62 62 /*First off, recover the response descriptors for the response functions: */ 63 param=(Param*) femmodels[0].parameters->FindParamObject("responsedescriptors");63 param=(Param*)model->DiagnosticHorizontal()->parameters->FindParamObject("responsedescriptors"); 64 64 if(!param)throw ErrorException(__FUNCT__," could not find response descriptors!"); 65 65 … … 67 67 68 68 /*Recover partitioning for dakota: */ 69 femmodels[0].parameters->FindParam((void*)&qmu_npart,"qmu_npart");70 femmodels[0].parameters->FindParam((void*)&qmu_part,"qmu_part");69 model->DiagnosticHorizontal()->parameters->FindParam((void*)&qmu_npart,"qmu_npart"); 70 model->DiagnosticHorizontal()->parameters->FindParam((void*)&qmu_part,"qmu_part"); 71 71 #ifdef _DEBUG_ 72 72 for(i=0;i<numresponses;i++){ … … 116 116 117 117 /*Modify core inputs to reflect the dakota variables inputs: */ 118 inputs->UpdateFromDakota(variables,variables_descriptors,numvariables, femmodels[0].parameters,qmu_part,qmu_npart); //femmodel #0is the one holding the parameters for Dakota.118 inputs->UpdateFromDakota(variables,variables_descriptors,numvariables,model->DiagnosticHorizontal()->parameters,qmu_part,qmu_npart); //diagnostic horiz model is the one holding the parameters for Dakota. 119 119 120 120 /*Run the analysis core solution sequence, with the updated inputs: */ … … 123 123 if(debug)_printf_("Starting diagnostic core\n"); 124 124 125 diagnostic_core(results, femmodels,inputs);125 diagnostic_core(results,model,inputs); 126 126 127 127 } … … 129 129 130 130 if(debug)_printf_("Starting thermal core\n"); 131 thermal_core(results, femmodels,inputs);131 thermal_core(results,model,inputs); 132 132 133 133 } … … 135 135 136 136 if(debug)_printf_("Starting prognostic core\n"); 137 prognostic_core(results, femmodels,inputs);137 prognostic_core(results,model,inputs); 138 138 139 139 } … … 141 141 142 142 if(debug)_printf_("Starting transient core\n"); 143 transient_core(results, femmodels,inputs);143 transient_core(results,model,inputs); 144 144 145 145 } … … 150 150 /*Now process the outputs, before computing the dakota responses: */ 151 151 if(debug)_printf_("process results:\n"); 152 ProcessResults(&results, femmodels,analysis_type);152 ProcessResults(&results,model,analysis_type); 153 153 154 154 155 155 /*compute responses on cpu 0: dummy for now! */ 156 156 if(debug)_printf_("compute dakota responses:\n"); 157 DakotaResponses(responses,responses_descriptors,numresponses, femmodels,results,analysis_type,sub_analysis_type);157 DakotaResponses(responses,responses_descriptors,numresponses,model,results,analysis_type,sub_analysis_type); 158 158 159 159 /*Free ressources:*/
Note:
See TracChangeset
for help on using the changeset viewer.