Ignore:
Timestamp:
08/19/11 18:04:03 (14 years ago)
Author:
Eric.Larour
Message:

Major rewrite of the code so that IoModel now has a parameters dataset, which gets
loaded with all the int,char and double objects in the input file.
This is a lot more flexible, as anyone can add a field to the model, and it will
automatically appear in the IoModel parameters dataset.

Not debugged with respect to nightly runs yet. Trying to get the whole change finished.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp

    r9340 r9356  
    2020        int i;
    2121        int analysis_type;
     22        int dim;
     23        int verbose;
    2224       
    2325        /*output: */
     
    3032        Parameters  *parameters  = NULL;
    3133
     34       
    3235        /*Initialize IoModel from input file*/
    3336        IoModel* iomodel = new IoModel(IOMODEL);
    34         SetVerbosityLevel(iomodel->verbose);
     37
     38        /*Fetch parameters: */
     39        iomodel->parameters->FindParam(&dim,DimEnum);
     40        iomodel->parameters->FindParam(&verbose,VerboseEnum);
     41       
     42        SetVerbosityLevel(verbose);
    3543
    3644        for(i=0;i<nummodels;i++){
     
    3947
    4048                /*Hack for trasient runs (to be improved)*/
    41                 if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && iomodel->dim==2) continue;
    42                 if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && iomodel->dim==2) continue;
     49                if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && dim==2) continue;
     50                if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && dim==2) continue;
    4351       
    4452                _printf_(VerboseMProcessor(),"   create datasets for analysis %s\n",EnumToStringx(analysis_type));
Note: See TracChangeset for help on using the changeset viewer.