PISM, A Parallel Ice Sheet Model
stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
|
#include <SSATestCase.hh>
Public Member Functions | |
SSATestCase (std::shared_ptr< Context > ctx, int Mx, int My, double Lx, double Ly, grid::Registration registration, grid::Periodicity periodicity) | |
virtual | ~SSATestCase () |
virtual void | init () |
Initialize the test case at the start of a run. More... | |
virtual void | run () |
Solve the SSA. More... | |
virtual void | report (const std::string &testname) |
Report on the generated solution. More... | |
virtual void | write (const std::string &filename) |
Save the computation and data to a file. More... | |
Protected Member Functions | |
virtual void | initializeSSACoefficients ()=0 |
Set up the coefficient variables as appropriate for the test case. More... | |
virtual void | exactSolution (int i, int j, double x, double y, double *u, double *v) |
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) |
Protected Attributes | |
MPI_Comm | m_com |
const std::shared_ptr< Context > | m_ctx |
const Config::Ptr | m_config |
std::shared_ptr< Grid > | m_grid |
const units::System::Ptr | m_sys |
int | m_stencil_width |
"wide" stencil width More... | |
EnthalpyConverter::Ptr | m_enthalpyconverter |
array::Scalar1 | m_tauc |
array::Array3D | m_ice_enthalpy |
array::Vector2 | m_bc_values |
array::Scalar2 | m_bc_mask |
Geometry | m_geometry |
SSA * | m_ssa |
An SSATestCase manages running an SSA instance against a particular test. Subclasses must implement the following abstract methods to define the input to an SSA for a test case:
1) initializeSSACoefficients (to initialize the ssa coefficients, e.g. ice thickness)
Additionally, a subclass can implement report
to handle printing statistics after a run. The default report method relies on subclasses implementing the exactSolution method for comparison.
A driver uses an SSATestCase by calling 1-3 below and 4,5 as desired:
1) its constructor 2) init (to set coefficients) 3) run (to actually solve the ssa) 4) report 5) write (to save the results of the computation to a file)
Definition at line 54 of file SSATestCase.hh.