Changeset 16037
- Timestamp:
- 08/30/13 10:36:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16036 r16037 5310 5310 IssmDouble normal_base[3], d1enthalpy[3]; 5311 5311 IssmDouble basalmeltingrate[NUMVERTICES], watercolumn[NUMVERTICES]; 5312 IssmDouble enthalpy[NUMVERTICES], enthalpyup; 5313 IssmDouble pressure[NUMVERTICES], pressureup; 5312 IssmDouble enthalpy[NUMVERTICES],pressure[NUMVERTICES]; 5314 5313 IssmDouble temperature, waterfraction; 5315 5314 IssmDouble latentheat, rho_ice; … … 5340 5339 Input* enthalpy_input=inputs->GetInput(EnthalpyEnum); _assert_(enthalpy_input); 5341 5340 5341 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 5342 5342 for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j]; 5343 5343 … … 5348 5348 /*Ok, get meltingrates now from basal conditions*/ 5349 5349 GaussPenta* gauss=new GaussPenta(); 5350 GaussPenta* gaussup=new GaussPenta();5351 5350 for(int iv=0;iv<3;iv++){ 5352 5351 5353 5352 gauss->GaussVertex(iv); 5354 gaussup->GaussVertex(iv+3);5355 5353 checkpositivethickness=true; 5356 5354 … … 5408 5406 /*Clean up and return*/ 5409 5407 delete gauss; 5410 delete gaussup;5411 5408 delete friction; 5412 5409 } … … 5420 5417 IssmDouble enthalpy[NUMVERTICES], pressure[NUMVERTICES]; 5421 5418 IssmDouble latentheat, dt; 5422 GaussPenta* gauss;5423 5424 Input* watercolumn_input=inputs->GetInput(WatercolumnEnum); _assert_(watercolumn_input);5425 Input* enthalpy_input=inputs->GetInput(EnthalpyEnum); _assert_(enthalpy_input);5426 Input* pressure_input=inputs->GetInput(PressureEnum); _assert_(pressure_input);5427 5419 5428 5420 /*Check wether enthalpy is activated*/ … … 5430 5422 if(!isenthalpy) return; 5431 5423 5424 GetInputListOnVertices(&enthalpy[0],EnthalpyEnum); 5425 GetInputListOnVertices(&pressure[0],PressureEnum); 5432 5426 this->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 5433 5427 latentheat=matpar->GetLatentHeat(); 5434 5428 5435 gauss=new GaussPenta();5436 5429 for(int iv=0;iv<NUMVERTICES;iv++){ 5437 gauss->GaussVertex(iv);5438 enthalpy_input->GetInputValue(&enthalpy[iv], gauss);5439 pressure_input->GetInputValue(&pressure[iv], gauss);5440 5430 matpar->EnthalpyToThermal(&temperature[iv],&waterfraction[iv], enthalpy[iv],pressure[iv]); 5441 5431
Note:
See TracChangeset
for help on using the changeset viewer.