Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DummyEnergyModel.cc
Go to the documentation of this file.
1/* Copyright (C) 2016, 2017, 2023 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 "pism/energy/EnthalpyModel.hh"
21#include "pism/util/MaxTimestep.hh"
22
23namespace pism {
24namespace energy {
25
27 std::shared_ptr<const Grid> grid,
28 std::shared_ptr<const stressbalance::StressBalance> stress_balance)
29 : EnthalpyModel(grid, stress_balance) {
30 // empty
31}
32
33void DummyEnergyModel::restart_impl(const File &input_file, int record) {
34 EnthalpyModel::restart_impl(input_file, record);
35
36 m_log->message(2,
37 "NOTE: this \"energy balance\" model holds enthalpy and basal melt rate constant in time.\n");
38}
39
41 const array::Scalar &ice_thickness,
42 const array::Scalar &surface_temperature,
43 const array::Scalar &climatic_mass_balance,
44 const array::Scalar &basal_heat_flux) {
46 ice_thickness, surface_temperature,
47 climatic_mass_balance, basal_heat_flux);
48 m_log->message(2,
49 "NOTE: this \"energy balance\" model holds enthalpy and basal melt rate constant in time.\n");
50}
51
52void DummyEnergyModel::update_impl(double t, double dt, const Inputs &inputs) {
53 (void) t;
54 (void) dt;
55 (void) inputs;
56}
57
59 // silence a compiler warning
60 (void) t;
61
62 // no time step restriction
63 return MaxTimestep("dummy energy model");
64}
65
66
67} // end of namespace energy
68} // end of namespace pism
const Logger::ConstPtr m_log
logger (for easy access)
Definition Component.hh:162
High-level PISM I/O class.
Definition File.hh:55
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
DummyEnergyModel(std::shared_ptr< const Grid > grid, std::shared_ptr< const stressbalance::StressBalance > stress_balance)
void restart_impl(const File &input_file, int record)
void update_impl(double t, double dt, const Inputs &inputs)
Update ice enthalpy field based on conservation of energy.
void bootstrap_impl(const File &input_file, const array::Scalar &ice_thickness, const array::Scalar &surface_temperature, const array::Scalar &climatic_mass_balance, const array::Scalar &basal_heat_flux)
MaxTimestep max_timestep_impl(double t) const
virtual void restart_impl(const File &input_file, int record)
virtual void bootstrap_impl(const File &input_file, const array::Scalar &ice_thickness, const array::Scalar &surface_temperature, const array::Scalar &climatic_mass_balance, const array::Scalar &basal_heat_flux)
The enthalpy-based energy balance model.