Changeset 1886


Ignore:
Timestamp:
08/25/09 14:07:38 (16 years ago)
Author:
Eric.Larour
Message:

NoneAnalysisEnum not necessary to add a formulation

Location:
issm/trunk/src/c
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Model.cpp

    r1881 r1886  
    123123}
    124124
     125#undef __FUNCT__
     126#define __FUNCT__ "Model::AddFormulation"
     127void  Model::AddFormulation(ConstDataHandle MODEL, int analysis_type){
     128
     129        /*FemModel: */
     130        FemModel*           femmodel=NULL;
     131        DataSet*            elements=NULL;
     132        DataSet*            nodes=NULL;
     133        DataSet*            constraints=NULL;
     134        DataSet*            loads=NULL;
     135        DataSet*            materials=NULL;
     136        DataSet*            parameters=NULL;
     137        Vec                 partition=NULL;
     138        Vec                 tpartition=NULL;
     139        Vec                 yg=NULL;
     140        Mat                 Rmg=NULL;
     141        Mat                 Gmn=NULL;
     142        NodeSets*           nodesets=NULL;
     143        Vec                 ys=NULL;
     144        Vec                 ys0=NULL;
     145
     146        /*intermediary: */
     147        IoModel* iomodel=NULL;
     148        int sub_analysis_type;
     149       
     150        _printf_("   fill model with matlab workspace data\n");
     151        IoModelInit(&iomodel,MODEL);
     152
     153        _printf_("   specifying analysis\n");
     154        if (analysis_type!=0){
     155                iomodel->analysis_type=analysis_type;
     156        }
     157        /*sub_analysis_type should default to none, as it was not specified: */
     158        sub_analysis_type=NoneAnalysisEnum();
     159       
     160        if (sub_analysis_type!=0){
     161                iomodel->sub_analysis_type=sub_analysis_type;
     162        }
     163
     164        _printf_("   create datasets:\n");
     165        CreateDataSets(&elements,&nodes,&materials,&constraints,&loads,&parameters,iomodel,MODEL);
     166
     167        _printf_("   create degrees of freedom: \n");
     168        Dofx( &partition,&tpartition,elements,nodes, parameters);
     169       
     170        _printf_("   create single point constraints: \n");
     171        SpcNodesx( &yg, nodes,constraints);
     172       
     173        _printf_("   create rigid body constraints:\n");
     174        MpcNodesx( &Rmg, nodes,constraints);
     175       
     176        _printf_("   create node sets:\n");
     177        BuildNodeSetsx(&nodesets, nodes);
     178
     179        _printf_("   reducing single point constraints vector:\n");
     180        Reducevectorgtosx(&ys,&ys0, yg,nodesets);
     181       
     182        _printf_("   normalizing rigid body constraints matrix:\n");
     183        NormalizeConstraintsx(&Gmn, Rmg,nodesets);
     184
     185        _printf_("   configuring element and loads:\n");
     186        ConfigureObjectsx(elements, loads, nodes, materials);
     187
     188        _printf_("   process parameters:\n");
     189        ProcessParamsx( parameters, partition);
     190
     191        _printf_("   free ressources:\n");
     192        DeleteIoModel(&iomodel);
     193
     194        /*Use all the data created to create an femmodel: */
     195        femmodel=new FemModel(elements,nodes,constraints,loads,materials,parameters,
     196                                      partition,tpartition,yg,Rmg,Gmn,nodesets,ys,ys0);
     197
     198        /*Add to femmodels in model: */
     199        femmodels->AddObject((Object*)femmodel);
     200
     201}
    125202
    126203#undef __FUNCT__
  • issm/trunk/src/c/objects/Model.h

    r1881 r1886  
    3030
    3131                void  AddFormulation(ConstDataHandle MODEL, int analysis_type,int sub_analysis_type);
     32                void  AddFormulation(ConstDataHandle MODEL, int analysis_type);
    3233
    3334                /*all overloaded forms of the FindParam routine: */
  • issm/trunk/src/c/parallel/control.cpp

    r1881 r1886  
    8383       
    8484        _printf_("\n   reading surface and bed slope computation model data:\n");
    85         model->AddFormulation(fid,SlopeComputeAnalysisEnum(),NoneAnalysisEnum());
     85        model->AddFormulation(fid,SlopeComputeAnalysisEnum());
    8686
    8787        _printf_("initialize inputs:\n");
  • issm/trunk/src/c/parallel/diagnostic.cpp

    r1881 r1886  
    7676       
    7777        _printf_("\n   reading surface and bed slope computation model data:\n");
    78         model->AddFormulation(fid,SlopeComputeAnalysisEnum(),NoneAnalysisEnum());
     78        model->AddFormulation(fid,SlopeComputeAnalysisEnum());
    7979
    8080        _printf_("initialize inputs:\n");
    8181        model->FindParam(&u_g_initial,"u_g",DiagnosticAnalysisEnum(),HorizAnalysisEnum());
    8282        model->FindParam(&numberofnodes,"numberofnodes");
     83        model->FindParam(&qmu_analysis,"qmu_analysis");
    8384
    8485        inputs=new ParameterInputs;
     
    8990
    9091        /*are we running the solution sequence, or a qmu wrapper around it? : */
    91         model->FindParam(&qmu_analysis,"qmu_analysis");
    92        
    9392        if(!qmu_analysis){
    9493
  • issm/trunk/src/c/parallel/diagnostic_core.cpp

    r1881 r1886  
    7373        fem_ds=model->GetFormulation(DiagnosticAnalysisEnum(),StokesAnalysisEnum());
    7474        fem_dhu=model->GetFormulation(DiagnosticAnalysisEnum(),HutterAnalysisEnum());
    75         fem_sl=model->GetFormulation(SlopeComputeAnalysisEnum(),NoneAnalysisEnum());
     75        fem_sl=model->GetFormulation(SlopeComputeAnalysisEnum());
    7676
    7777        //specific parameters for specific models
  • issm/trunk/src/c/parallel/prognostic.cpp

    r1881 r1886  
    7272
    7373        _printf_("read and create finite element model:\n");
    74         model->AddFormulation(fid,PrognosticAnalysisEnum(),NoneAnalysisEnum());
     74        model->AddFormulation(fid,PrognosticAnalysisEnum());
    7575
    7676        //retrieve parameters used to fill inputs
  • issm/trunk/src/c/parallel/steadystate.cpp

    r1881 r1886  
    8282       
    8383        _printf_("\n   reading surface and bed slope computation model data:\n");
    84         model->AddFormulation(fid,SlopeComputeAnalysisEnum(),NoneAnalysisEnum());
     84        model->AddFormulation(fid,SlopeComputeAnalysisEnum());
    8585
    8686        _printf_("\n   read and create thermal finite element model:\n");
  • issm/trunk/src/c/parallel/transient.cpp

    r1881 r1886  
    8585       
    8686        _printf_("\n   reading surface and bed slope computation model data:\n");
    87         model->AddFormulation(fid,SlopeComputeAnalysisEnum(),NoneAnalysisEnum());
     87        model->AddFormulation(fid,SlopeComputeAnalysisEnum());
    8888
    8989        _printf_("\n   reading prognositc model data:\n");
    90         model->AddFormulation(fid,PrognosticAnalysisEnum(),NoneAnalysisEnum());
     90        model->AddFormulation(fid,PrognosticAnalysisEnum());
    9191       
    9292        /*Do we run in 3d?, in which case we need thermal and melting also:*/
Note: See TracChangeset for help on using the changeset viewer.