Changeset 1841


Ignore:
Timestamp:
08/24/09 17:57:25 (16 years ago)
Author:
Eric.Larour
Message:

Brachning back from issm.controlstatic, by hand

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp

    r962 r1841  
    3636#include "../parallel/parallel.h"
    3737
    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){
     38void 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){
    3939
    4040        int i;
     
    5858       
    5959        /*some parameters needed: */
    60         femmodels[0].parameters->FindParam((void*)&debug,"debug");
     60        model->DiagnosticHorizontal()->parameters->FindParam((void*)&debug,"debug");
    6161               
    6262        /*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");
    6464        if(!param)throw ErrorException(__FUNCT__," could not find response descriptors!");
    6565
     
    6767
    6868        /*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");
    7171        #ifdef _DEBUG_
    7272        for(i=0;i<numresponses;i++){
     
    116116
    117117        /*Modify core inputs to reflect the dakota variables inputs: */
    118         inputs->UpdateFromDakota(variables,variables_descriptors,numvariables,femmodels[0].parameters,qmu_part,qmu_npart); //femmodel #0 is 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.
    119119
    120120        /*Run the analysis core solution sequence, with the updated inputs: */
     
    123123                if(debug)_printf_("Starting diagnostic core\n");
    124124
    125                 diagnostic_core(results,femmodels,inputs);
     125                diagnostic_core(results,model,inputs);
    126126
    127127        }
     
    129129               
    130130                if(debug)_printf_("Starting thermal core\n");
    131                 thermal_core(results,femmodels,inputs);
     131                thermal_core(results,model,inputs);
    132132
    133133        }
     
    135135
    136136                if(debug)_printf_("Starting prognostic core\n");
    137                 prognostic_core(results,femmodels,inputs);
     137                prognostic_core(results,model,inputs);
    138138
    139139        }
     
    141141
    142142                if(debug)_printf_("Starting transient core\n");
    143                 transient_core(results,femmodels,inputs);
     143                transient_core(results,model,inputs);
    144144
    145145        }
     
    150150        /*Now process the outputs, before computing the dakota responses: */
    151151        if(debug)_printf_("process results:\n");
    152         ProcessResults(&results,femmodels,analysis_type);
     152        ProcessResults(&results,model,analysis_type);
    153153       
    154154
    155155        /*compute responses on cpu 0: dummy for now! */
    156156        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);
    158158
    159159        /*Free ressources:*/
Note: See TracChangeset for help on using the changeset viewer.