Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BedrockColumn.hh
Go to the documentation of this file.
1// Copyright (C) 2019, 2021 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#ifndef BEDROCK_COLUMN_HH
20#define BEDROCK_COLUMN_HH
21
22#include "pism/util/ColumnSystem.hh"
23
24namespace pism {
25
26class Config;
27
28namespace energy {
29
30/*! Tridiagonal linear system for conservation of energy in vertical columns of the
31 * bedrock thermal layer.
32 *
33 * The top surface uses the Dirichlet boundary condition, the bottom surface a heat flux
34 * (Neumann) BC.
35 *
36 * The implementation uses a second-order discretization in space and the backward-Euler
37 * (first-order, fully implicit) time-discretization.
38 */
40public:
41 BedrockColumn(const std::string &prefix, const Config &config,
42 double dz, unsigned int M);
43 ~BedrockColumn() = default;
44
45 void solve(double dt, double Q_bottom, double T_top,
46 const double *T_old, double *result);
47
48 void solve(double dt, double Q_bottom, double T_top,
49 const std::vector<double> &T_old,
50 std::vector<double> &result);
51
52private:
53 // temperature diffusivity coefficient
54 double m_D;
55 // thermal conductivity
56 double m_k;
57 // vertical spacing
58 double m_dz;
59 // system size
60 unsigned int m_M;
61
63};
64
65} // end of namespace energy
66} // end of namespace pism
67
68#endif // ifndef BEDROCK_COLUMN_HH
A class for storing and accessing PISM configuration flags and parameters.
Virtual base class. Abstracts a tridiagonal system to solve in a column of ice and/or bedrock.
void solve(double dt, double Q_bottom, double T_top, const double *T_old, double *result)