|
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
|
#include <SSATestCase.hh>
Inheritance diagram for pism::stressbalance::SSATestCase:Public Member Functions | |
| SSATestCase (std::shared_ptr< SSA > ssa) | |
| virtual | ~SSATestCase ()=default |
| virtual void | init () |
| Initialize the test case at the start of a run. | |
| virtual void | run () |
| Solve the SSA. | |
| virtual void | report (const std::string &testname) |
| Report on the generated solution. | |
| virtual void | write (const std::string &filename) |
| Save the computation and data to a file. | |
Static Public Member Functions | |
| static std::shared_ptr< Grid > | grid (std::shared_ptr< Context > ctx, int Mx, int My, double Lx, double Ly, grid::Registration registration, grid::Periodicity periodicity) |
| static std::shared_ptr< SSA > | solver (std::shared_ptr< Grid > grid, const std::string &method) |
Protected Member Functions | |
| virtual void | initializeSSACoefficients ()=0 |
| Set up the coefficient variables as appropriate for the test case. | |
| 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 | |
| std::shared_ptr< const pism::Grid > | m_grid |
| const std::shared_ptr< const Context > | m_ctx |
| const Config::ConstPtr | m_config |
| const units::System::Ptr | m_sys |
| array::Scalar1 | m_tauc |
| array::Array3D | m_ice_enthalpy |
| array::Vector2 | m_bc_values |
| array::Scalar2 | m_bc_mask |
| Geometry | m_geometry |
| std::shared_ptr< 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.