19 #ifndef PISM_COMPONENT_H
20 #define PISM_COMPONENT_H
24 #include "pism/util/ConfigInterface.hh"
25 #include "pism/util/Units.hh"
26 #include "pism/util/Logger.hh"
27 #include "pism/util/Diagnostic.hh"
39 template<
typename T>
class Array2D;
127 std::shared_ptr<const Grid>
grid()
const;
156 const std::shared_ptr<const Grid>
m_grid;
const units::System::Ptr m_sys
unit system used by this component
const Time & time() const
std::shared_ptr< const Grid > grid() const
const Config::ConstPtr m_config
configuration database used by this component
const Logger::ConstPtr m_log
logger (for easy access)
virtual TSDiagnosticList ts_diagnostics_impl() const
RegriddingFlag
This flag determines whether a variable is read from the -regrid_file file even if it is not listed a...
@ REGRID_WITHOUT_REGRID_VARS
@ NO_REGRID_WITHOUT_REGRID_VARS
TSDiagnosticList ts_diagnostics() const
virtual void write_model_state_impl(const File &output) const
The default (empty implementation).
virtual ~Component()=default
const std::shared_ptr< const Grid > m_grid
grid used by this component
void regrid(const std::string &module_name, array::Array &variable, RegriddingFlag flag=NO_REGRID_WITHOUT_REGRID_VARS)
virtual void define_model_state_impl(const File &output) const
The default (empty implementation).
Component(std::shared_ptr< const Grid > grid)
virtual DiagnosticList diagnostics_impl() const
void define_model_state(const File &output) const
Define model state variables in an output file.
void write_model_state(const File &output) const
Write model state variables to an output file.
DiagnosticList diagnostics() const
const Profiling & profiling() const
virtual MaxTimestep max_timestep_impl(double t) const
MaxTimestep max_timestep(double t) const
Reports the maximum time-step the model can take at time t.
A class defining a common interface for most PISM sub-models.
std::shared_ptr< const Config > ConstPtr
High-level PISM I/O class.
std::shared_ptr< const Logger > ConstPtr
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
Abstract class for reading, writing, allocating, and accessing a DA-based PETSc Vec (2D and 3D fields...
std::shared_ptr< System > Ptr
InputOptions process_input_options(MPI_Comm com, Config::ConstPtr config)
std::map< std::string, TSDiagnostic::Ptr > TSDiagnosticList
std::map< std::string, Diagnostic::Ptr > DiagnosticList