Changeset 2339
- Timestamp:
- 09/28/09 09:58:10 (15 years ago)
- Location:
- issm/trunk/src/c/ModelProcessorx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/Control/CreateParametersControl.cpp
r2333 r2339 37 37 double* vy=NULL; 38 38 double* vz=NULL; 39 double* u_g=NULL;40 39 41 40 /*Get parameters: */ … … 157 156 IoModelFetchData(&control_parameter,NULL,NULL,iomodel_handle,iomodel->control_type); 158 157 159 u_g=(double*)xcalloc(iomodel->numberofnodes*3,sizeof(double));160 if(vx)for(i=0;i<iomodel->numberofnodes;i++)u_g[3*i+0]=vx[i]/iomodel->yts;161 if(vy)for(i=0;i<iomodel->numberofnodes;i++)u_g[3*i+1]=vy[i]/iomodel->yts;162 if(vz)for(i=0;i<iomodel->numberofnodes;i++)u_g[3*i+2]=vz[i]/iomodel->yts;163 164 count++;165 param= new Param(count,"u_g",DOUBLEVEC);166 param->SetDoubleVec(u_g,3*iomodel->numberofnodes,3);167 parameters->AddObject(param);168 169 158 u_g_obs=(double*)xcalloc(iomodel->numberofnodes*2,sizeof(double)); 170 159 if(vx_obs)for(i=0;i<iomodel->numberofnodes;i++)u_g_obs[2*i+0]=vx_obs[i]/iomodel->yts; … … 187 176 xfree((void**)&vy); 188 177 xfree((void**)&vz); 189 xfree((void**)&u_g);190 178 xfree((void**)&vx_obs); 191 179 xfree((void**)&vy_obs); -
issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp
r2333 r2339 170 170 parameters->AddObject(param); 171 171 172 /*meanvel: */173 count++;174 param= new Param(count,"meanvel",DOUBLE);175 param->SetDouble(iomodel->meanvel);176 parameters->AddObject(param);177 178 172 /*artdiff: */ 179 173 count++; … … 182 176 parameters->AddObject(param); 183 177 184 /*epsvel: */185 count++;186 param= new Param(count,"epsvel",DOUBLE);187 param->SetDouble(iomodel->epsvel);188 parameters->AddObject(param);189 190 178 /*penalty_melting: */ 191 179 count++; … … 216 204 param= new Param(count,"viscosity_overshoot",DOUBLE); 217 205 param->SetDouble(iomodel->viscosity_overshoot); 218 parameters->AddObject(param);219 220 /*cm_noisedampening: */221 count++;222 param= new Param(count,"cm_noisedampening",DOUBLE);223 param->SetDouble(iomodel->cm_noisedampening);224 206 parameters->AddObject(param); 225 207
Note:
See TracChangeset
for help on using the changeset viewer.