ttimestepping.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
---
ttimestepping.hh (2276B)
---
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 TIMESTEPPING_H
21 #define TIMESTEPPING_H
22
23 #include "pism/util/MaxTimestep.hh"
24
25 namespace pism {
26
27 class IceModelVec2S;
28 class IceModelVec2CellType;
29 class IceModelVec2V;
30 class IceModelVec3;
31
32 struct CFLData {
33 CFLData();
34 MaxTimestep dt_max;
35 double u_max, v_max, w_max;
36 };
37
38 /*! @brief Compute the max. time step according to the CFL condition (within the volume of the
39 ice). */
40 /*!
41 * Returns the maximum time step along with maximum speeds along x, y, and z directions within the
42 * ice. Note that PISM uses semi-implicit methods in energy balance and age models, so this code
43 * does *not* use the w component of the velocity field in the computation of the max. time step.
44 * The maximum of the speed along the z axis is computed for reporting.
45 */
46 CFLData max_timestep_cfl_3d(const IceModelVec2S &ice_thickness,
47 const IceModelVec2CellType &cell_type,
48 const IceModelVec3 &u3,
49 const IceModelVec3 &v3,
50 const IceModelVec3 &w3);
51
52 /*! @brief Compute the max. time step according to the CFL condition (within the ice, 2D). */
53 /*!
54 * Returns the maximum time step along with maximum speeds along x and y directions within the
55 * ice.
56 */
57 CFLData max_timestep_cfl_2d(const IceModelVec2S &ice_thickness,
58 const IceModelVec2CellType &cell_type,
59 const IceModelVec2V &velocity);
60
61 } // end of namespace pism
62
63
64 #endif /* TIMESTEPPING_H */