20 #include "pism/stressbalance/blatter/verification/BlatterTestvanderVeen.hh"
21 #include "pism/util/node_types.hh"
23 #include "pism/rheology/IsothermalGlen.hh"
25 #include "pism/stressbalance/blatter/verification/manufactured_solutions.hh"
28 namespace stressbalance {
31 int Mz,
int coarsening_factor)
32 :
Blatter(grid, Mz, coarsening_factor) {
55 double rho_w =
m_config->get_number(
"constants.sea_water.density");
58 m_g =
m_config->get_number(
"constants.standard_gravity");
70 const double *ice_bottom,
71 const double *sea_level) {
82 for (
int n = 0;
n < N; ++
n) {
119 const double *surface_nodal,
120 const double *z_nodal,
121 const double *sl_nodal,
123 (void) surface_nodal;
132 double *x_nodal =
m_work[1];
134 for (
int n = 0;
n < element.
n_chi(); ++
n) {
135 x_nodal[
n] = element.
x(
n);
142 for (
int q = 0; q < face.
n_pts(); ++q) {
150 for (
int t = 0; t < element.
n_chi(); ++t) {
151 auto psi = face.
chi(q, t);
153 residual[t] += - W * psi *
F;
170 double *x_nodal =
m_work[1];
173 x_nodal[
n] = element.
x(
n);
179 for (
int q = 0; q < face.
n_pts(); ++q) {
186 for (
int t = 0; t < element.
n_chi(); ++t) {
187 auto psi = face.
chi(q, t);
189 residual[t] += - W * psi *
F;
const units::System::Ptr m_sys
unit system used by this component
const Config::ConstPtr m_config
configuration database used by this component
const std::shared_ptr< const Grid > m_grid
grid used by this component
This class represents a 2D vector field (such as ice velocity) at a certain grid point.
double weight(unsigned int q) const
const double & chi(unsigned int q, unsigned int k) const
void evaluate(const T *x, T *result) const
int n_pts() const
Number of quadrature points.
Isothermal Glen ice allowing extra customization.
Vector2d u_bc(double x, double y, double z) const
bool dirichlet_node(const DMDALocalInfo &info, const fem::Element3::GlobalIndex &I)
double beta_exact(double x) const
bool marine_boundary(int face, const int *node_type, const double *ice_bottom, const double *sea_level)
Vector2d u_exact(double x) const
double b_exact(double x) const
BlatterTestvanderVeen(std::shared_ptr< const Grid > grid, int Mz, int coarsening_factor)
void residual_surface(const fem::Q1Element3 &element, const fem::Q1Element3Face &face, Vector2d *residual)
void residual_lateral(const fem::Q1Element3 &element, const fem::Q1Element3Face &face, const double *surface_nodal, const double *z_nodal, const double *sl_nodal, Vector2d *residual)
double H_exact(double x) const
double m_work[m_n_work][m_Nq]
std::shared_ptr< rheology::FlowLaw > m_flow_law
EnthalpyConverter::Ptr m_EC
const int n_chi
Number of shape functions on a Q1 element.
const unsigned int incident_nodes[n_faces][4]
double convert(System::Ptr system, double input, const std::string &spec1, const std::string &spec2)
Convert a quantity from unit1 to unit2.
double blatter_xz_vanderveen_beta(double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
double blatter_xz_vanderveen_thickness(double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
static double F(double SL, double B, double H, double alpha)
Vector2d blatter_xz_vanderveen_source_lateral(double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
Vector2d blatter_xz_vanderveen_source_surface(double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
Vector2d blatter_xz_vanderveen_exact(double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)