tConstantYieldStress.cc - pism - [fork] customized build of PISM, the parallel … | |
git clone git://src.adamsgaard.dk/pism | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
tConstantYieldStress.cc (2358B) | |
--- | |
1 // Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Co… | |
2 // | |
3 // This file is part of PISM. | |
4 // | |
5 // PISM is free software; you can redistribute it and/or modify it under… | |
6 // terms of the GNU General Public License as published by the Free Soft… | |
7 // Foundation; either version 3 of the License, or (at your option) any … | |
8 // version. | |
9 // | |
10 // PISM is distributed in the hope that it will be useful, but WITHOUT A… | |
11 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FIT… | |
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… | |
18 | |
19 #include "ConstantYieldStress.hh" | |
20 | |
21 #include "pism/util/pism_options.hh" | |
22 #include "pism/util/ConfigInterface.hh" | |
23 #include "pism/util/IceGrid.hh" | |
24 #include "pism/util/MaxTimestep.hh" | |
25 #include "pism/util/pism_utilities.hh" | |
26 | |
27 namespace pism { | |
28 | |
29 ConstantYieldStress::ConstantYieldStress(IceGrid::ConstPtr grid) | |
30 : YieldStress(grid) { | |
31 | |
32 m_name = "constant yield stress model"; | |
33 } | |
34 | |
35 ConstantYieldStress::~ConstantYieldStress() { | |
36 // empty | |
37 } | |
38 | |
39 void ConstantYieldStress::restart_impl(const File &input_file, int recor… | |
40 m_basal_yield_stress.read(input_file, record); | |
41 | |
42 regrid(name(), m_basal_yield_stress); | |
43 } | |
44 | |
45 void ConstantYieldStress::bootstrap_impl(const File &input_file, | |
46 const YieldStressInputs &inputs… | |
47 (void) inputs; | |
48 | |
49 double tauc = m_config->get_number("basal_yield_stress.constant.value"… | |
50 m_basal_yield_stress.regrid(input_file, OPTIONAL, tauc); | |
51 | |
52 regrid(name(), m_basal_yield_stress); | |
53 } | |
54 | |
55 void ConstantYieldStress::init_impl(const YieldStressInputs &inputs) { | |
56 (void) inputs; | |
57 | |
58 double tauc = m_config->get_number("basal_yield_stress.constant.value"… | |
59 // Set the constant value. | |
60 m_basal_yield_stress.set(tauc); | |
61 | |
62 regrid(name(), m_basal_yield_stress); | |
63 } | |
64 | |
65 MaxTimestep ConstantYieldStress::max_timestep_impl(double t) const { | |
66 (void) t; | |
67 return MaxTimestep(name()); | |
68 } | |
69 | |
70 void ConstantYieldStress::update_impl(const YieldStressInputs &inputs, | |
71 double t, double dt) { | |
72 (void) inputs; | |
73 (void) t; | |
74 (void) dt; | |
75 // empty | |
76 } | |
77 | |
78 } // end of namespace pism |