20 #include "pism/stressbalance/blatter/ismip-hom/BlatterISMIPHOM.hh"
22 #include "pism/util/node_types.hh"
25 namespace stressbalance {
30 double alpha = 0.5 * (M_PI / 180.0);
31 return -x * tan(alpha);
34 static double A_bed(
double x,
double y,
double L) {
35 double omega = 2 * M_PI /
L;
36 return A_surface(x, y,
L) - 1000.0 + 500.0 * sin(omega * x) * sin(omega * y);
39 static double B_bed(
double x,
double y,
double L) {
41 double omega = 2 * M_PI /
L;
42 return A_surface(x, y,
L) - 1000.0 + 500.0 * sin(omega * x);
48 double alpha = 0.1 * (M_PI / 180.0);
49 return -x * tan(alpha);
52 static double C_bed(
double x,
double y,
double L) {
58 int coarsening_factor,
60 :
Blatter(grid, Mz, coarsening_factor),
62 m_L(2.0 * grid->Lx()) {
64 char testname[] =
"ABCD";
65 m_log->message(2,
"Running ISMIP-HOM Experiment %c (L = %d km)...\n",
100 double *bottom_elevation,
101 double *ice_thickness,
102 double *surface_elevation,
103 double *sea_level)
const {
119 x = x_min +
I.i * dx,
120 y = y_min +
I.j * dy;
123 bottom_elevation[
n] =
m_b(x, y,
m_L);
126 if (surface_elevation) {
127 surface_elevation[
n] =
m_s(x, y,
m_L);
132 sea_level[
n] = bottom_elevation[
n] - 1.0;
const Logger::ConstPtr m_log
logger (for easy access)
const std::shared_ptr< const Grid > m_grid
grid used by this component
GlobalIndex local_to_global(int i, int j, int k, unsigned int n) const
void nodal_parameter_values(const fem::Q1Element3 &element, Parameters **P, int i, int j, int *node_type, double *bottom, double *thickness, double *surface, double *sea_level) const
BlatterISMIPHOM(std::shared_ptr< const Grid > grid, int Mz, int coarsening_factor, ISMIPHOMTest test)
const int n_chi
Number of shape functions on a Q1 element.
static double A_surface(double x, double y, double L)
static double C_surface(double x, double y, double L)
static double A_bed(double x, double y, double L)
static double C_bed(double x, double y, double L)
static double B_bed(double x, double y, double L)