Changeset 7352
- Timestamp:
- 02/04/11 21:21:00 (14 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r7311 r7352 65 65 parameters->AddObject(new DoubleParam(HeatCapacityEnum,iomodel->heatcapacity)); 66 66 parameters->AddObject(new IntParam(ArtDiffEnum,iomodel->artdiff)); 67 parameters->AddObject(new IntParam(MeltingRateCorrectionApplyEnum,iomodel->melting_rate_correction_apply)); 67 68 parameters->AddObject(new DoubleParam(PenaltyMeltingEnum,iomodel->penalty_melting)); 68 69 parameters->AddObject(new IntParam(MinThermalConstraintsEnum,iomodel->min_thermal_constraints)); -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
r4441 r7352 29 29 IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate"); 30 30 IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate"); 31 if(iomodel->melting_rate_correction_apply)IoModelFetchData(&iomodel->melting_rate_correction,NULL,NULL,iomodel_handle,"melting_rate_correction"); 31 32 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx"); 32 33 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy"); … … 60 61 xfree((void**)&iomodel->accumulation_rate); 61 62 xfree((void**)&iomodel->melting_rate); 63 xfree((void**)&iomodel->melting_rate_correction); 62 64 xfree((void**)&iomodel->vx); 63 65 xfree((void**)&iomodel->vy); -
issm/trunk/src/c/objects/Elements/Tria.cpp
r7333 r7352 2321 2321 int i,j,ig; 2322 2322 double Jdettria,dt; 2323 double accumulation_g,melting_g, thickness_g;2323 double accumulation_g,melting_g,melting_correction_g,thickness_g; 2324 2324 double xyz_list[NUMVERTICES][3]; 2325 2325 double L[NUMVERTICES]; … … 2335 2335 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input); 2336 2336 Input* melting_input=inputs->GetInput(MeltingRateEnum); _assert_(melting_input); 2337 Input* melting_correction_input=inputs->GetInput(MeltingRateCorrectionEnum); 2337 2338 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 2338 2339 2340 /*Initialize melting_correction_g to 0, do not forget!:*/ 2339 2341 /* Start looping on the number of gaussian points: */ 2340 2342 gauss=new GaussTria(2); … … 2349 2351 melting_input->GetParameterValue(&melting_g,gauss); 2350 2352 thickness_input->GetParameterValue(&thickness_g,gauss); 2351 2352 for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*(thickness_g+dt*(accumulation_g-melting_g))*L[i]; 2353 if(melting_correction_input) melting_correction_input->GetParameterValue(&melting_correction_g,gauss); 2354 2355 for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*(thickness_g+dt*(accumulation_g-melting_g-melting_correction_g))*L[i]; 2353 2356 } 2354 2357 … … 3678 3681 for(i=0;i<3;i++)nodeinputs[i]=iomodel->melting_rate[tria_vertex_ids[i]-1]/iomodel->yts; 3679 3682 this->inputs->AddInput(new TriaVertexInput(MeltingRateEnum,nodeinputs)); 3683 } 3684 if (iomodel->melting_rate_correction) { 3685 for(i=0;i<3;i++)nodeinputs[i]=iomodel->melting_rate_correction[tria_vertex_ids[i]-1]/iomodel->yts; 3686 this->inputs->AddInput(new TriaVertexInput(MeltingRateCorrectionEnum,nodeinputs)); 3680 3687 } 3681 3688 if (iomodel->accumulation_rate) { -
issm/trunk/src/c/objects/IoModel.cpp
r7327 r7352 83 83 xfree((void**)&this->geothermalflux); 84 84 xfree((void**)&this->melting_rate); 85 xfree((void**)&this->melting_rate_correction); 85 86 xfree((void**)&this->accumulation_rate); 86 87 xfree((void**)&this->dhdt); … … 205 206 IoModelFetchData(&this->mixed_layer_capacity,iomodel_handle,"mixed_layer_capacity"); 206 207 IoModelFetchData(&this->thermal_exchange_velocity,iomodel_handle,"thermal_exchange_velocity"); 208 IoModelFetchData(&this->melting_rate_correction_apply,iomodel_handle,"melting_rate_correction_apply"); 207 209 208 210 /*qmu: */ … … 268 270 this->temperature=NULL; 269 271 this->melting_rate=NULL; 272 this->melting_rate_correction=NULL; 273 this->melting_rate_correction_apply=0; 270 274 this->geothermalflux=NULL; 271 275 this->elementonbed=NULL; -
issm/trunk/src/c/objects/IoModel.h
r7105 r7352 180 180 /*basal: */ 181 181 double* melting_rate; 182 double* melting_rate_correction; 183 int melting_rate_correction_apply; 182 184 double* accumulation_rate; 183 185 double* dhdt; -
issm/trunk/src/m/classes/model.m
r7325 r7352 251 251 temperature=NaN; %temperature solution vector 252 252 melting_rate=NaN; 253 melting_rate_correction=NaN; 254 melting_rate_correction_apply=NaN; 253 255 pressure=NaN; 254 256 … … 480 482 md.latentheat=3.34*10^5; 481 483 484 %melting rate correction: 485 md.melting_rate_correction_apply=0; %do not apply 486 482 487 %ice thermal conductivity lamda (W/m/K) 483 488 md.thermalconductivity=2.4; -
issm/trunk/src/m/model/marshall.m
r7318 r7352 90 90 WriteData(fid,md.accumulation_rate,'Mat','accumulation_rate'); 91 91 WriteData(fid,md.melting_rate,'Mat','melting_rate'); 92 WriteData(fid,md.melting_rate_correction_apply,'Integer','melting_rate_correction_apply'); 93 if md.melting_rate_correction_apply, 94 WriteData(fid,md.melting_rate_correction,'Mat','melting_rate_correction'); 95 end 92 96 WriteData(fid,md.dhdt,'Mat','dhdt'); 93 97
Note:
See TracChangeset
for help on using the changeset viewer.