PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
Loading...
Searching...
No Matches
ConstantYieldStress.cc
Go to the documentation of this file.
1// Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2021, 2023, 2025 Constantine Khroulev
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#include "pism/basalstrength/ConstantYieldStress.hh"
20
21#include "pism/util/Config.hh"
22#include "pism/util/Grid.hh"
23#include "pism/util/MaxTimestep.hh"
24#include "pism/util/io/IO_Flags.hh"
25
26namespace pism {
27
28ConstantYieldStress::ConstantYieldStress(std::shared_ptr<const Grid> grid)
29 : YieldStress(grid) {
30
31 m_name = "constant yield stress model";
32}
33
34void ConstantYieldStress::restart_impl(const File &input_file, int record) {
35 m_basal_yield_stress.read(input_file, record);
36
38}
39
41 const YieldStressInputs &inputs) {
42 (void) inputs;
43
44 double tauc = m_config->get_number("basal_yield_stress.constant.value");
45 m_basal_yield_stress.regrid(input_file, io::Default(tauc));
46
48}
49
51 (void) inputs;
52
53 double tauc = m_config->get_number("basal_yield_stress.constant.value");
54 // Set the constant value.
56
58}
59
61 (void) t;
62 return MaxTimestep(name());
63}
64
66 double t, double dt) {
67 (void) inputs;
68 (void) t;
69 (void) dt;
70 // empty
71}
72
73} // end of namespace pism
std::shared_ptr< const Config > m_config
configuration database used by this component
Definition Component.hh:160
void regrid(const std::string &module_name, array::Array &variable, RegriddingFlag flag=NO_REGRID_WITHOUT_REGRID_VARS)
Definition Component.cc:152
void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs)
void restart_impl(const File &input_file, int record)
MaxTimestep max_timestep_impl(double t) const
void init_impl(const YieldStressInputs &inputs)
ConstantYieldStress(std::shared_ptr< const Grid > g)
void update_impl(const YieldStressInputs &inputs, double t, double dt)
High-level PISM I/O class.
Definition File.hh:57
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
std::string m_name
std::string name() const
array::Scalar2 m_basal_yield_stress
The PISM basal yield stress model interface (virtual base class)
void read(const std::string &filename, unsigned int time)
Definition Array.cc:753
void set(double c)
Result: v[j] <- c for all j.
Definition Array.cc:659
void regrid(const std::string &filename, io::Default default_value)
Definition Array.cc:758