19 #ifndef _SSATESTCASE_H_
20 #define _SSATESTCASE_H_
22 #include "pism/stressbalance/ssa/SSA.hh"
23 #include "pism/geometry/Geometry.hh"
24 #include "pism/util/EnthalpyConverter.hh"
25 #include "pism/util/array/Array3D.hh"
26 #include "pism/util/array/Scalar.hh"
27 #include "pism/util/array/Vector.hh"
34 namespace stressbalance {
57 SSATestCase(std::shared_ptr<Context> ctx,
int Mx,
int My,
68 virtual void report(
const std::string &testname);
70 virtual void write(
const std::string &filename);
80 double x,
double y,
double *u,
double *v);
91 const std::shared_ptr<Context>
m_ctx;
std::shared_ptr< Config > Ptr
std::shared_ptr< EnthalpyConverter > Ptr
A virtual class collecting methods common to ice and bedrock 3D fields.
virtual void init()
Initialize the test case at the start of a run.
EnthalpyConverter::Ptr m_enthalpyconverter
const units::System::Ptr m_sys
array::Array3D m_ice_enthalpy
std::shared_ptr< Grid > m_grid
virtual void initializeSSACoefficients()=0
Set up the coefficient variables as appropriate for the test case.
void report_netcdf(const std::string &testname, double max_vector, double rel_vector, double max_u, double max_v, double avg_u, double avg_v)
array::Vector2 m_bc_values
virtual void exactSolution(int i, int j, double x, double y, double *u, double *v)
int m_stencil_width
"wide" stencil width
const std::shared_ptr< Context > m_ctx
SSATestCase(std::shared_ptr< Context > ctx, int Mx, int My, double Lx, double Ly, grid::Registration registration, grid::Periodicity periodicity)
virtual void report(const std::string &testname)
Report on the generated solution.
virtual void run()
Solve the SSA.
const Config::Ptr m_config
virtual void write(const std::string &filename)
Save the computation and data to a file.
std::shared_ptr< System > Ptr