tDummyEnergyModel.cc - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
HTML git clone git://src.adamsgaard.dk/pism
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
tDummyEnergyModel.cc (2385B)
---
1 /* Copyright (C) 2016, 2017 PISM Authors
2 *
3 * This file is part of PISM.
4 *
5 * PISM is free software; you can redistribute it and/or modify it under the
6 * terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * PISM is distributed in the hope that it will be useful, but WITHOUT ANY
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with PISM; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #include "EnthalpyModel.hh"
21 #include "pism/util/MaxTimestep.hh"
22
23 namespace pism {
24 namespace energy {
25
26 DummyEnergyModel::DummyEnergyModel(IceGrid::ConstPtr grid,
27 stressbalance::StressBalance *stress_balance)
28 : EnthalpyModel(grid, stress_balance) {
29 // empty
30 }
31
32 void DummyEnergyModel::restart_impl(const File &input_file, int record) {
33 EnthalpyModel::restart_impl(input_file, record);
34
35 m_log->message(2,
36 "NOTE: this \"energy balance\" model holds enthalpy and basal melt rate constant in time.\n");
37 }
38
39 void DummyEnergyModel::bootstrap_impl(const File &input_file,
40 const IceModelVec2S &ice_thickness,
41 const IceModelVec2S &surface_temperature,
42 const IceModelVec2S &climatic_mass_balance,
43 const IceModelVec2S &basal_heat_flux) {
44 EnthalpyModel::bootstrap_impl(input_file,
45 ice_thickness, surface_temperature,
46 climatic_mass_balance, basal_heat_flux);
47 m_log->message(2,
48 "NOTE: this \"energy balance\" model holds enthalpy and basal melt rate constant in time.\n");
49 }
50
51 void DummyEnergyModel::update_impl(double t, double dt, const Inputs &inputs) {
52 (void) t;
53 (void) dt;
54 (void) inputs;
55 }
56
57 MaxTimestep DummyEnergyModel::max_timestep_impl(double t) const {
58 // silence a compiler warning
59 (void) t;
60
61 // no time step restriction
62 return MaxTimestep("dummy energy model");
63 }
64
65
66 } // end of namespace energy
67 } // end of namespace pism