24#include "pism/stressbalance/ssa/SSAFDBase.hh"
26#include "pism/util/petscwrappers/Viewer.hh"
27#include "pism/util/petscwrappers/KSP.hh"
28#include "pism/util/petscwrappers/Mat.hh"
29#include "pism/util/array/Staggered.hh"
32namespace stressbalance {
38 SSAFD(std::shared_ptr<const Grid>
g,
bool regional_mode);
52 double nuH_iter_failure_underrelax);
55 double nuH_iter_failure_underrelax);
A class for storing and accessing internal staggered-grid 2D fields. Uses dof=2 storage....
void assemble_matrix(const Inputs &inputs, const array::Vector1 &velocity, const array::Staggered1 &nuH, const array::CellType1 &cell_type, Mat A)
void init_impl()
Initialize a generic regular-grid SSA solver.
void picard_strategy_regularization(const Inputs &inputs)
Old SSAFD recovery strategy: increase the SSA regularization parameter.
std::shared_ptr< petsc::Viewer > m_nuh_viewer
array::Vector1 m_velocity_old
void solve(const Inputs &inputs)
Compute the vertically-averaged horizontal velocity from the shallow shelf approximation.
void write_system_petsc(const std::string &namepart)
unsigned int m_default_pc_failure_max_count
void update_nuH_viewers(const array::Staggered &nuH)
Update the nuH viewer, which shows log10(nu H).
std::array< double, 2 > compute_nuH_norm(const array::Staggered &nuH, array::Staggered &nuH_old)
Compute the norm of nu H and the norm of the change in nu H.
void picard_iteration(const Inputs &inputs, double nuH_regularization, double nuH_iter_failure_underrelax)
void picard_manager(const Inputs &inputs, double nuH_regularization, double nuH_iter_failure_underrelax)
Manages the Picard iteration loop.
unsigned int m_default_pc_failure_count
array::Staggered1 m_nuH_old
PISM's SSA solver: the finite difference implementation.
const array::Vector1 & velocity() const
Get the thickness-advective 2D velocity.