PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
Null.cc
Go to the documentation of this file.
1 /* Copyright (C) 2015, 2016, 2017, 2018, 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/earth/BedDef.hh"
21 #include "pism/util/Grid.hh"
22 #include "pism/util/MaxTimestep.hh"
23 
24 namespace pism {
25 namespace bed {
26 
27 Null::Null(std::shared_ptr<const Grid> g)
28  : BedDef(g) {
29  // empty
30 }
31 
32 void Null::init_impl(const InputOptions &opts, const array::Scalar &ice_thickness,
33  const array::Scalar &sea_level_elevation) {
34  m_log->message(2,
35  "* Initializing the dummy (no-op) bed deformation model...\n");
36 
37  BedDef::init_impl(opts, ice_thickness, sea_level_elevation);
38 
39  m_uplift.set(0.0);
40 }
41 
43  (void) t;
44  return MaxTimestep("bed_def none");
45 }
46 
47 void Null::update_impl(const array::Scalar &ice_thickness,
48  const array::Scalar &sea_level_elevation,
49  double t, double dt) {
50  (void) ice_thickness;
51  (void) sea_level_elevation;
52  (void) t;
53  (void) dt;
54  // This model does not update bed topography or bed uplift.
55 }
56 
57 } // end of namespace bed
58 } // end of namespace pism
const Logger::ConstPtr m_log
logger (for easy access)
Definition: Component.hh:162
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
Definition: MaxTimestep.hh:31
void set(double c)
Result: v[j] <- c for all j.
Definition: Array.cc:707
virtual void init_impl(const InputOptions &opts, const array::Scalar &ice_thickness, const array::Scalar &sea_level_elevation)
Initialize from the context (input file and the "variables" database).
Definition: BedDef.cc:105
array::Scalar m_uplift
bed uplift rate
Definition: BedDef.hh:86
PISM bed deformation model (base class).
Definition: BedDef.hh:39
void update_impl(const array::Scalar &ice_thickness, const array::Scalar &sea_level_elevation, double t, double dt)
Definition: Null.cc:47
Null(std::shared_ptr< const Grid > g)
Definition: Null.cc:27
MaxTimestep max_timestep_impl(double t) const
Definition: Null.cc:42
void init_impl(const InputOptions &opts, const array::Scalar &ice_thickness, const array::Scalar &sea_level_elevation)
Initialize from the context (input file and the "variables" database).
Definition: Null.cc:32
static const double g
Definition: exactTestP.cc:36