- Timestamp:
- 08/24/09 17:53:59 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/Thermal/CreateParametersThermal.cpp
r1648 r1834 11 11 #include "../../objects/objects.h" 12 12 #include "../../shared/shared.h" 13 #include "../ Model.h"13 #include "../IoModel.h" 14 14 15 void CreateParametersThermal(DataSet** pparameters, Model* model,ConstDataHandlemodel_handle){15 void CreateParametersThermal(DataSet** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){ 16 16 17 17 Param* param = NULL; … … 33 33 34 34 /*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"); 38 38 39 u_g=(double*)xcalloc( model->numberofnodes*3,sizeof(double));39 u_g=(double*)xcalloc(iomodel->numberofnodes*3,sizeof(double)); 40 40 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; 44 44 45 45 count++; 46 46 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); 48 48 parameters->AddObject(param); 49 49 … … 54 54 55 55 /*Get pressure: */ 56 ModelFetchData((void**)&pressure,NULL,NULL,model_handle,"pressure","Matrix","Mat");56 IoModelFetchData((void**)&pressure,NULL,NULL,iomodel_handle,"pressure","Matrix","Mat"); 57 57 58 58 count++; 59 59 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); 61 61 else param->SetDoubleVec(pressure,0,0); 62 62 parameters->AddObject(param); … … 66 66 67 67 /* get initial temperature and melting if transient*/ 68 if( model->sub_analysis_type==TransientAnalysisEnum()){68 if(iomodel->sub_analysis_type==TransientAnalysisEnum()){ 69 69 70 70 /*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"); 72 72 73 73 count++; 74 74 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); 76 76 else throw ErrorException(__FUNCT__,exprintf("Missing initial temperature")); 77 77 parameters->AddObject(param);
Note:
See TracChangeset
for help on using the changeset viewer.