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
BlatterTestXZ.hh
Go to the documentation of this file.
1/* Copyright (C) 2020, 2021, 2022 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 BLATTERTESTXZ_H
21#define BLATTERTESTXZ_H
22
23#include "pism/stressbalance/blatter/Blatter.hh"
24
25namespace pism {
26namespace stressbalance {
27
28/*!
29 * Implements Dirichlet BC and the source term for a verification test from Tezaur et al,
30 * 2015 (), section 4.2.
31 *
32 * Domain: [-50km, 50km] * [-1, 1] * [b, s].
33 *
34 * Here b is the bed elevation, s is the surface elevation.
35 *
36 * s = b + H0, H0 = 1000m.
37 *
38 * Dirichlet BC are imposed at all the nodes along the lateral boundary.
39 *
40 * Natural boundary conditions are used on the top boundary.
41 *
42 * The basal boundary condition includes the sliding condition and a correction for the
43 * chosen manufactured solution.
44 *
45 */
46class BlatterTestXZ : public Blatter {
47public:
48 BlatterTestXZ(std::shared_ptr<const Grid> grid, int Mz, int coarsening_factor);
49
50private:
51 bool marine_boundary(int face,
52 const int *node_type,
53 const double *ice_bottom,
54 const double *sea_level);
55
56 bool dirichlet_node(const DMDALocalInfo &info, const fem::Element3::GlobalIndex& I);
57
58 Vector2d u_bc(double x, double y, double z) const;
59
60 void residual_source_term(const fem::Q1Element3 &element,
61 const double *surface,
62 const double *bed,
63 Vector2d *residual);
64
65 void residual_basal(const fem::Q1Element3 &element,
66 const fem::Q1Element3Face &face,
67 const double *tauc_nodal,
68 const double *f_nodal,
69 const Vector2d *u_nodal,
70 Vector2d *residual);
71
72 void residual_surface(const fem::Q1Element3 &element,
73 const fem::Q1Element3Face &face,
74 Vector2d *residual);
75
76 //! constant ice hardness
77 double m_A;
78
79 double m_alpha;
80
81 double m_s0;
82
83 double m_H0;
84
85 double m_rho;
86
87 double m_g;
88
89 double m_beta;
90};
91
92} // end of namespace stressbalance
93} // end of namespace pism
94
95#endif /* BLATTERTESTXZ_H */
std::shared_ptr< const Grid > grid() const
Definition Component.cc:105
This class represents a 2D vector field (such as ice velocity) at a certain grid point.
Definition Vector2d.hh:29
3D Q1 element
Definition Element.hh:358
void residual_basal(const fem::Q1Element3 &element, const fem::Q1Element3Face &face, const double *tauc_nodal, const double *f_nodal, const Vector2d *u_nodal, Vector2d *residual)
Vector2d u_bc(double x, double y, double z) const
bool marine_boundary(int face, const int *node_type, const double *ice_bottom, const double *sea_level)
void residual_source_term(const fem::Q1Element3 &element, const double *surface, const double *bed, Vector2d *residual)
void residual_surface(const fem::Q1Element3 &element, const fem::Q1Element3Face &face, Vector2d *residual)
double m_A
constant ice hardness
bool dirichlet_node(const DMDALocalInfo &info, const fem::Element3::GlobalIndex &I)