PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
pism::stressbalance::SSAFEM Class Reference

PISM's SSA solver: the finite element method implementation written by Jed and David. More...

#include <SSAFEM.hh>

+ Inheritance diagram for pism::stressbalance::SSAFEM:

Classes

struct  CallbackData
 Adaptor for gluing SNESDAFormFunction callbacks to an SSAFEM. More...
 
struct  Coefficients
 

Public Member Functions

 SSAFEM (std::shared_ptr< const Grid > g)
 
virtual ~SSAFEM ()=default
 
- Public Member Functions inherited from pism::stressbalance::SSA
 SSA (std::shared_ptr< const Grid > g)
 
virtual ~SSA ()
 
virtual void update (const Inputs &inputs, bool full_update)
 Update the SSA solution. More...
 
void set_initial_guess (const array::Vector &guess)
 Set the initial guess of the SSA velocity. More...
 
virtual std::string stdout_report () const
 Produce a report string for the standard output. More...
 
const array::Vectordriving_stress () const
 
- Public Member Functions inherited from pism::stressbalance::ShallowStressBalance
 ShallowStressBalance (std::shared_ptr< const Grid > g)
 
virtual ~ShallowStressBalance ()
 
void init ()
 
const array::Vector1velocity () const
 Get the thickness-advective 2D velocity. More...
 
const array::Scalarbasal_frictional_heating ()
 Get the basal frictional heating (for the adaptive energy time-stepping). More...
 
void compute_basal_frictional_heating (const array::Vector &velocity, const array::Scalar &tauc, const array::CellType &mask, array::Scalar &result) const
 Compute the basal frictional heating. More...
 
std::shared_ptr< const rheology::FlowLawflow_law () const
 
EnthalpyConverter::Ptr enthalpy_converter () const
 
const IceBasalResistancePlasticLawsliding_law () const
 
double flow_enhancement_factor () const
 
- Public Member Functions inherited from pism::Component
 Component (std::shared_ptr< const Grid > grid)
 
virtual ~Component ()=default
 
DiagnosticList diagnostics () const
 
TSDiagnosticList ts_diagnostics () const
 
std::shared_ptr< const Gridgrid () const
 
const Timetime () const
 
const Profilingprofiling () const
 
void define_model_state (const File &output) const
 Define model state variables in an output file. More...
 
void write_model_state (const File &output) const
 Write model state variables to an output file. More...
 
MaxTimestep max_timestep (double t) const
 Reports the maximum time-step the model can take at time t. More...
 

Protected Member Functions

virtual void init_impl ()
 Initialize a generic regular-grid SSA solver. More...
 
void cache_inputs (const Inputs &inputs)
 Initialize stored data from the coefficients in the SSA. Called by SSAFEM::solve. More...
 
void quad_point_values (const fem::Element &Q, const Coefficients *x, int *mask, double *thickness, double *tauc, double *hardness) const
 Compute quadrature point values of various coefficients given a quadrature Q and nodal values. More...
 
void explicit_driving_stress (const fem::Element &E, const Coefficients *x, Vector2d *driving_stress) const
 
void driving_stress (const fem::Element &E, const Coefficients *x, Vector2d *driving_stress) const
 
void PointwiseNuHAndBeta (double thickness, double hardness, int mask, double tauc, const Vector2d &U, const Vector2d &U_x, const Vector2d &U_y, double *nuH, double *dnuH, double *beta, double *dbeta)
 Compute the "(regularized effective viscosity) x (ice thickness)" and effective viscous bed strength from the current solution, at a single quadrature point. More...
 
void compute_local_function (Vector2d const *const *const velocity, Vector2d **residual)
 Implements the callback for computing the residual. More...
 
void compute_local_jacobian (Vector2d const *const *const velocity, Mat J)
 Implements the callback for computing the Jacobian. More...
 
virtual void solve (const Inputs &inputs)
 
std::shared_ptr< TerminationReasonsolve_with_reason (const Inputs &inputs)
 
std::shared_ptr< TerminationReasonsolve_nocache ()
 
- Protected Member Functions inherited from pism::stressbalance::SSA
virtual void define_model_state_impl (const File &output) const
 The default (empty implementation). More...
 
virtual void write_model_state_impl (const File &output) const
 The default (empty implementation). More...
 
virtual DiagnosticList diagnostics_impl () const
 
virtual void compute_driving_stress (const array::Scalar &ice_thickness, const array::Scalar1 &surface_elevation, const array::CellType1 &cell_type, const array::Scalar1 *no_model_mask, array::Vector &result) const
 Compute the gravitational driving stress. More...
 
void extrapolate_velocity (const array::CellType1 &cell_type, array::Vector1 &velocity) const
 
- Protected Member Functions inherited from pism::Component
virtual MaxTimestep max_timestep_impl (double t) const
 
virtual TSDiagnosticList ts_diagnostics_impl () const
 
void regrid (const std::string &module_name, array::Array &variable, RegriddingFlag flag=NO_REGRID_WITHOUT_REGRID_VARS)
 

Protected Attributes

array::Scalar1 m_bc_mask
 
array::Vector1 m_bc_values
 
GeometryCalculator m_gc
 
double m_alpha
 
double m_rho_g
 
array::Array2D< Coefficientsm_coefficients
 
CallbackData m_callback_data
 
petsc::SNES m_snes
 
array::Scalar1 m_node_type
 Storage for node types (interior, boundary, exterior). More...
 
array::Vector1 m_boundary_integral
 Boundary integral (CFBC contribution to the residual). More...
 
double m_dirichletScale
 
double m_beta_ice_free_bedrock
 
double m_epsilon_ssa
 
fem::ElementIterator m_element_index
 
fem::Q1Element2 m_q1_element
 
const array::Scalarm_driving_stress_x
 
const array::Scalarm_driving_stress_y
 
- Protected Attributes inherited from pism::stressbalance::SSA
array::CellType2 m_mask
 
array::Vector m_taud
 
std::string m_stdout_ssa
 
std::shared_ptr< petsc::DMm_da
 
array::Vector m_velocity_global
 
int m_event_ssa
 
- Protected Attributes inherited from pism::stressbalance::ShallowStressBalance
IceBasalResistancePlasticLawm_basal_sliding_law
 
std::shared_ptr< rheology::FlowLawm_flow_law
 
EnthalpyConverter::Ptr m_EC
 
array::Vector2 m_velocity
 
array::Scalar m_basal_frictional_heating
 
double m_e_factor
 flow enhancement factor More...
 
- Protected Attributes inherited from pism::Component
const std::shared_ptr< const Gridm_grid
 grid used by this component More...
 
const Config::ConstPtr m_config
 configuration database used by this component More...
 
const units::System::Ptr m_sys
 unit system used by this component More...
 
const Logger::ConstPtr m_log
 logger (for easy access) More...
 

Private Member Functions

void cache_residual_cfbc (const Inputs &inputs)
 Compute and cache residual contributions from the integral over the lateral boundary. More...
 
void monitor_jacobian (Mat Jac)
 
void monitor_function (Vector2d const *const *const velocity_global, Vector2d const *const *const residual_global)
 

Static Private Member Functions

static PetscErrorCode function_callback (DMDALocalInfo *info, Vector2d const *const *const velocity, Vector2d **residual, CallbackData *fe)
 SNES callbacks. More...
 
static PetscErrorCode jacobian_callback (DMDALocalInfo *info, Vector2d const *const *const xg, Mat A, Mat J, CallbackData *fe)
 

Additional Inherited Members

- Public Attributes inherited from pism::stressbalance::SSA
SSAStrengthExtensionstrength_extension
 
- Protected Types inherited from pism::Component
enum  RegriddingFlag { REGRID_WITHOUT_REGRID_VARS , NO_REGRID_WITHOUT_REGRID_VARS }
 This flag determines whether a variable is read from the -regrid_file file even if it is not listed among variables in -regrid_vars. More...
 

Detailed Description

PISM's SSA solver: the finite element method implementation written by Jed and David.

Jed's original code is in rev 831: src/base/ssaJed/... The SSAFEM duplicates most of the functionality of SSAFD, using the finite element method.

Definition at line 40 of file SSAFEM.hh.


The documentation for this class was generated from the following files: