Ignore:
Timestamp:
08/24/09 17:53:59 (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/ModelProcessorx/Thermal/CreateParametersThermal.cpp

    r1648 r1834  
    1111#include "../../objects/objects.h"
    1212#include "../../shared/shared.h"
    13 #include "../Model.h"
     13#include "../IoModel.h"
    1414
    15 void CreateParametersThermal(DataSet** pparameters,Model* model,ConstDataHandle model_handle){
     15void CreateParametersThermal(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
    1616       
    1717        Param*   param = NULL;
     
    3333
    3434        /*Get vx vy and vz: */
    35         ModelFetchData((void**)&vx,NULL,NULL,model_handle,"vx","Matrix","Mat");
    36         ModelFetchData((void**)&vy,NULL,NULL,model_handle,"vy","Matrix","Mat");
    37         ModelFetchData((void**)&vz,NULL,NULL,model_handle,"vz","Matrix","Mat");
     35        IoModelFetchData((void**)&vx,NULL,NULL,iomodel_handle,"vx","Matrix","Mat");
     36        IoModelFetchData((void**)&vy,NULL,NULL,iomodel_handle,"vy","Matrix","Mat");
     37        IoModelFetchData((void**)&vz,NULL,NULL,iomodel_handle,"vz","Matrix","Mat");
    3838
    39         u_g=(double*)xcalloc(model->numberofnodes*3,sizeof(double));
     39        u_g=(double*)xcalloc(iomodel->numberofnodes*3,sizeof(double));
    4040
    41         if(vx) for(i=0;i<model->numberofnodes;i++)u_g[3*i+0]=vx[i]/model->yts;
    42         if(vy) for(i=0;i<model->numberofnodes;i++)u_g[3*i+1]=vy[i]/model->yts;
    43         if(vz) for(i=0;i<model->numberofnodes;i++)u_g[3*i+2]=vz[i]/model->yts;
     41        if(vx) for(i=0;i<iomodel->numberofnodes;i++)u_g[3*i+0]=vx[i]/iomodel->yts;
     42        if(vy) for(i=0;i<iomodel->numberofnodes;i++)u_g[3*i+1]=vy[i]/iomodel->yts;
     43        if(vz) for(i=0;i<iomodel->numberofnodes;i++)u_g[3*i+2]=vz[i]/iomodel->yts;
    4444
    4545        count++;
    4646        param= new Param(count,"u_g",DOUBLEVEC);
    47         param->SetDoubleVec(u_g,3*model->numberofnodes,3);
     47        param->SetDoubleVec(u_g,3*iomodel->numberofnodes,3);
    4848        parameters->AddObject(param);
    4949
     
    5454       
    5555        /*Get pressure: */
    56         ModelFetchData((void**)&pressure,NULL,NULL,model_handle,"pressure","Matrix","Mat");
     56        IoModelFetchData((void**)&pressure,NULL,NULL,iomodel_handle,"pressure","Matrix","Mat");
    5757       
    5858        count++;
    5959        param= new Param(count,"p_g",DOUBLEVEC);
    60         if(pressure) param->SetDoubleVec(pressure,model->numberofnodes,1);
     60        if(pressure) param->SetDoubleVec(pressure,iomodel->numberofnodes,1);
    6161        else param->SetDoubleVec(pressure,0,0);
    6262        parameters->AddObject(param);
     
    6666
    6767        /* get initial temperature and melting if transient*/
    68         if(model->sub_analysis_type==TransientAnalysisEnum()){
     68        if(iomodel->sub_analysis_type==TransientAnalysisEnum()){
    6969
    7070                /*Get melting and temperature: */
    71                 ModelFetchData((void**)&temperature,NULL,NULL,model_handle,"temperature","Matrix","Mat");
     71                IoModelFetchData((void**)&temperature,NULL,NULL,iomodel_handle,"temperature","Matrix","Mat");
    7272
    7373                count++;
    7474                param= new Param(count,"t_g",DOUBLEVEC);
    75                 if(temperature) param->SetDoubleVec(temperature,model->numberofnodes,1);
     75                if(temperature) param->SetDoubleVec(temperature,iomodel->numberofnodes,1);
    7676                else throw ErrorException(__FUNCT__,exprintf("Missing initial temperature"));
    7777                parameters->AddObject(param);
Note: See TracChangeset for help on using the changeset viewer.