Changeset 1829


Ignore:
Timestamp:
08/24/09 17:48:21 (15 years ago)
Author:
Eric.Larour
Message:

Brachning back from issm.controlstatic, by hand

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/parallel/ControlInitialization.cpp

    r1805 r1829  
    1313#include "../issm.h"
    1414
    15 void ControlInitialization(FemModel** pmodel, FemModel* fems, ParameterInputs* inputs){
     15void ControlInitialization(Model* model, ParameterInputs* inputs){
    1616
    1717        extern int my_rank;
     
    5353
    5454        /*recover fem models: */
    55         fem_dh=fems+0;
    56         fem_dv=fems+1;
    57         fem_ds=fems+2;
    58         fem_dhu=fems+3;
    59         fem_sl=fems+4;
     55        fem_dh=model->DiagnosticHorizontal();
     56        fem_dv=model->DiagnosticVertical();
     57        fem_ds=model->DiagnosticStokes();
     58        fem_dhu=model->DiagnosticHutter();
     59        fem_sl=model->Slope();
    6060
    6161        //first recover parameters common to all solutions
     
    7575        /*if no Stokes, assign output and return*/
    7676        if (!isstokes){
    77                 *pmodel=fem_dh;
     77                model->SetActive(fem_dh);
    7878                return;
    7979        }
     
    9797        //horizontal velocity
    9898        if(debug)_printf_("%s\n"," computing horizontal velocities...");
    99         diagnostic_core_nonlinear(&ug,NULL,NULL,NULL, fem_dh,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum());
     99        diagnostic_core_nonlinear(&ug,NULL,NULL,fem_dh,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum());
    100100        if(debug)_printf_("%s\n"," extruding horizontal velocities...");
    101101        VecDuplicatePatch(&ug_horiz,ug); FieldExtrudex( ug_horiz,fem_dh->elements,fem_dh->nodes, fem_dh->loads,fem_dh-> materials,"velocity",1);
     
    138138        if(debug)_printf_("%s\n"," computing stokes velocities and pressure ...");
    139139        VecFree(&ug);
    140         diagnostic_core_nonlinear(&ug,NULL,NULL,NULL, fem_ds,inputs,DiagnosticAnalysisEnum(),StokesAnalysisEnum());
     140        diagnostic_core_nonlinear(&ug,NULL,NULL,NULL,fem_ds,inputs,DiagnosticAnalysisEnum(),StokesAnalysisEnum());
    141141        VecFree(&pg);
    142142
     
    146146
    147147        /*Assign output*/
    148         *pmodel=fem_ds;
     148        model->SetActive(fem_ds);
    149149}
Note: See TracChangeset for help on using the changeset viewer.