20 #include "pism/regional/RegionalYieldStress.hh"
21 #include "pism/util/pism_utilities.hh"
22 #include "pism/util/MaxTimestep.hh"
23 #include "pism/util/array/Scalar.hh"
24 #include "pism/util/interpolation.hh"
42 auto grid = mask.
grid();
46 for (
auto p = grid->points(); p; p.next()) {
47 const int i = p.i(), j = p.j();
49 if (mask(i, j) > 0.5) {
50 basal_yield_stress(i, j) = tauc;
56 m_input->restart(input_file, record);
66 "mask: zeros (modeling domain) and ones (no-model buffer near grid edges)");
68 no_model_mask.
read(input_file, record);
77 m_input->bootstrap(input_file, inputs);
93 double t,
double dt) {
102 m_input->define_model_state(output);
110 m_input->write_model_state(output);
123 auto dt =
m_input->max_timestep(t);
133 return m_input->ts_diagnostics();
const Config::ConstPtr m_config
configuration database used by this component
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)
static Ptr wrap(const T &input)
High-level PISM I/O class.
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
std::shared_ptr< YieldStress > m_input
TSDiagnosticList ts_diagnostics_impl() const
DiagnosticList diagnostics_impl() const
void write_model_state_impl(const File &output) const
The default (empty implementation).
MaxTimestep max_timestep_impl(double t) const
void update_impl(const YieldStressInputs &inputs, double t, double dt)
void restart_impl(const File &input_file, int record)
RegionalYieldStress(std::shared_ptr< YieldStress > input)
void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs)
void init_impl(const YieldStressInputs &inputs)
void define_model_state_impl(const File &output) const
array::Scalar2 m_basal_yield_stress
The PISM basal yield stress model interface (virtual base class)
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
void copy_from(const Array2D< T > &source)
void read(const std::string &filename, unsigned int time)
void set_interpolation_type(InterpolationType type)
void define(const File &file, io::Type default_type) const
Define variables corresponding to an Array in a file opened using file.
void write(const std::string &filename) const
std::shared_ptr< const Grid > grid() const
SpatialVariableMetadata & metadata(unsigned int N=0)
Returns a reference to the SpatialVariableMetadata object containing metadata for the compoment N.
static void set_no_model_yield_stress(double tauc, const array::Scalar &mask, array::Scalar &basal_yield_stress)
std::map< std::string, TSDiagnostic::Ptr > TSDiagnosticList
std::map< std::string, Diagnostic::Ptr > DiagnosticList
T combine(const T &a, const T &b)