Changeset 20272
- Timestamp:
- 02/29/16 10:47:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
r20213 r20272 821 821 if(!element->IsOnBase() || element->IsFloating()) return NULL; 822 822 823 bool isdynamicbasalspc;823 bool converged, isdynamicbasalspc; 824 824 int i, state; 825 int enthalpy_enum; 825 826 IssmDouble dt,Jdet,scalar; 826 827 IssmDouble enthalpy, enthalpyup, pressure, pressureup, watercolumn, meltingrate; … … 840 841 element->FindParam(&dt,TimesteppingTimeStepEnum); 841 842 element->FindParam(&isdynamicbasalspc,ThermalIsdynamicbasalspcEnum); 843 element->GetInputValue(&converged,ConvergedEnum); 844 if(dt==0. && !converged) enthalpy_enum=EnthalpyPicardEnum; // use enthalpy from last iteration 845 else enthalpy_enum=EnthalpyEnum; // use enthalpy from last time step 842 846 Input* vx_input = element->GetInput(VxEnum); _assert_(vx_input); 843 847 Input* vy_input = element->GetInput(VyEnum); _assert_(vy_input); 844 848 Input* vz_input = element->GetInput(VzEnum); _assert_(vz_input); 845 Input* enthalpy_input = element->GetInput( EnthalpyPicardEnum); _assert_(enthalpy_input);849 Input* enthalpy_input = element->GetInput(enthalpy_enum); _assert_(enthalpy_input); 846 850 Input* pressure_input = element->GetInput(PressureEnum); _assert_(pressure_input); 847 851 Input* watercolumn_input = element->GetInput(WatercolumnEnum); _assert_(watercolumn_input); … … 876 880 877 881 switch (state) { 878 case 0: 879 // cold, dry base: apply basal surface forcing 882 case 0: case 1: case 2: case 3: 883 // cold, dry base; cold, wet base; refreezing temperate base; thin temperate base: 884 // Apply basal surface forcing. 885 // Interpolated values of enthalpy on gauss nodes may indicate cold base, 886 // although one node might have become temperate. So keep heat flux switched on. 880 887 geothermalflux_input->GetInputValue(&geothermalflux,gauss); 881 888 friction->GetAlpha2(&alpha2,gauss); … … 890 897 pe->values[i]+=scalar*basis[i]; 891 898 break; 892 case 1:893 // cold, wet base: keep at pressure melting point894 break;895 case 2:896 // temperate, thin refreezing base: release spc897 break;898 case 3:899 // temperate, thin melting base: set spc900 break;901 899 case 4: 902 900 // temperate, thick melting base: set grad H*n=0
Note:
See TracChangeset
for help on using the changeset viewer.