tAgeModel.hh - 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
---
tAgeModel.hh (1920B)
---
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 #ifndef AGEMODEL_H
21 #define AGEMODEL_H
22
23 #include "pism/util/iceModelVec.hh"
24 #include "pism/util/Component.hh"
25 #include "pism/stressbalance/StressBalance.hh"
26
27 namespace pism {
28
29 class AgeModelInputs {
30 public:
31 AgeModelInputs();
32 AgeModelInputs(const IceModelVec2S *ice_thickness,
33 const IceModelVec3 *u3,
34 const IceModelVec3 *v3,
35 const IceModelVec3 *w3);
36 void check() const;
37
38 const IceModelVec2S *ice_thickness;
39 const IceModelVec3 *u3;
40 const IceModelVec3 *v3;
41 const IceModelVec3 *w3;
42 };
43
44 class AgeModel : public Component {
45 public:
46 AgeModel(IceGrid::ConstPtr grid, stressbalance::StressBalance *stress_balance);
47
48 void update(double t, double dt, const AgeModelInputs &inputs);
49
50 void init(const InputOptions &opts);
51
52 const IceModelVec3 & age() const;
53 protected:
54 MaxTimestep max_timestep_impl(double t) const;
55 void define_model_state_impl(const File &output) const;
56 void write_model_state_impl(const File &output) const;
57
58 IceModelVec3 m_ice_age;
59 IceModelVec3 m_work;
60 stressbalance::StressBalance *m_stress_balance;
61 };
62
63 } // end of namespace pism
64
65
66 #endif /* AGEMODEL_H */