BISICLES AMR ice sheet model  0.9
Public Member Functions | Protected Attributes | List of all members
IceVelocitySolver Class Referenceabstract

Abstract class to manage the nonlinear solve for the ice-sheet momentum. More...

#include <IceVelocitySolver.H>

Inheritance diagram for IceVelocitySolver:
Inheritance graph
[legend]

Public Member Functions

 IceVelocitySolver ()
 
virtual ~IceVelocitySolver ()
 
virtual void define (const ProblemDomain &a_coarseDomain, ConstitutiveRelation *a_constRel, BasalFrictionRelation *a_FrictionRel, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< int > &a_vectRefRatio, const RealVect &a_dxCrse, IceThicknessIBC *a_bc, int a_numLevels)=0
 (Re-)define IceVelocitySolver object for a given mesh and set of physics rules More...
 
virtual int solve (Vector< LevelData< FArrayBox > * > &a_horizontalVel, Vector< LevelData< FArrayBox > * > &a_calvedIce, Vector< LevelData< FArrayBox > * > &a_addedIce, Vector< LevelData< FArrayBox > * > &a_removedIce, Real &a_initialResidualNorm, Real &a_finalResidualNorm, const Real a_convergenceMetric, const Vector< LevelData< FArrayBox > * > &a_rhs, const Vector< LevelData< FArrayBox > * > &a_C, const Vector< LevelData< FArrayBox > * > &a_C0, const Vector< LevelData< FArrayBox > * > &a_A, const Vector< LevelData< FArrayBox > * > &a_muCoef, Vector< RefCountedPtr< LevelSigmaCS > > &a_coordSys, Real a_time, int a_lbase, int a_maxLevel)=0
 Compute the horizontal, cell centered ice velocity ( u(x,y), v(x,y) ) [VERTICALLY INTEGRATED MODELS!]. More...
 
virtual void setVerbosity (int a_verbosity)
 
virtual void setMaxIterations (int a_max_iter)
 if relevant, set max number of solver iterations More...
 
virtual void setTolerance (Real a_tolerance)
 if relevant, set solver tolerance More...
 
virtual bool isDefined ()
 

Protected Attributes

bool m_isDefined
 
int m_verbosity
 

Detailed Description

Abstract class to manage the nonlinear solve for the ice-sheet momentum.

This is a virtual base class to facilitate the implementation of different solution algorithms.

Constructor & Destructor Documentation

◆ IceVelocitySolver()

IceVelocitySolver::IceVelocitySolver ( )
inline

References m_isDefined.

◆ ~IceVelocitySolver()

virtual IceVelocitySolver::~IceVelocitySolver ( )
inlinevirtual

References define(), and solve().

Member Function Documentation

◆ define()

virtual void IceVelocitySolver::define ( const ProblemDomain &  a_coarseDomain,
ConstitutiveRelation a_constRel,
BasalFrictionRelation a_FrictionRel,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< int > &  a_vectRefRatio,
const RealVect &  a_dxCrse,
IceThicknessIBC a_bc,
int  a_numLevels 
)
pure virtual

(Re-)define IceVelocitySolver object for a given mesh and set of physics rules

Parameters
a_coarseDomaindomain boundaries on the coarsest level
a_constRelphysics rule (e.g Glen's flow law) relating englacial stress and strian-rate
a_FrictionRelphysics rule (e.g Weertman law) relating basal stress and strain-rate
a_vectGridsmesh layout for each level
a_vectGridsrefinement ratio for each level
a_dxCrsemesh spacing on coarsest level
a_bcice thickness and velocity boundary conditions
a_numLevelsnumber of mesh levels.

Implemented in InverseVerticallyIntegratedVelocitySolver, PythonInterface::PythonVelocitySolver, FASIceSolver, PetscIceSolver, and KnownVelocitySolver.

Referenced by InverseVerticallyIntegratedVelocitySolver::define(), AmrIce::defineSolver(), InverseVerticallyIntegratedVelocitySolver::nDoF(), JFNKSolver::Configuration::parse(), PetscIceSolver::solve(), AmrIce::solveVelocityField(), and ~IceVelocitySolver().

◆ isDefined()

virtual bool IceVelocitySolver::isDefined ( )
inlinevirtual

References m_isDefined.

◆ setMaxIterations()

virtual void IceVelocitySolver::setMaxIterations ( int  a_max_iter)
inlinevirtual

if relevant, set max number of solver iterations

default implementation does nothing – it's assumed that derived classes will implement this in a meaningful way

Reimplemented in FASIceSolver, and PetscIceSolver.

Referenced by AmrIce::defineSolver(), and AmrIce::solveVelocityField().

◆ setTolerance()

virtual void IceVelocitySolver::setTolerance ( Real  a_tolerance)
inlinevirtual

if relevant, set solver tolerance

default implementation does nothing – it's assumed that derived classes will implement this in a meaningful way

Reimplemented in FASIceSolver, and PetscIceSolver.

Referenced by AmrIce::defineSolver(), and AmrIce::solveVelocityField().

◆ setVerbosity()

virtual void IceVelocitySolver::setVerbosity ( int  a_verbosity)
inlinevirtual

Reimplemented in FASIceSolver, and PetscIceSolver.

References m_verbosity.

Referenced by AmrIce::defineSolver().

◆ solve()

virtual int IceVelocitySolver::solve ( Vector< LevelData< FArrayBox > * > &  a_horizontalVel,
Vector< LevelData< FArrayBox > * > &  a_calvedIce,
Vector< LevelData< FArrayBox > * > &  a_addedIce,
Vector< LevelData< FArrayBox > * > &  a_removedIce,
Real &  a_initialResidualNorm,
Real &  a_finalResidualNorm,
const Real  a_convergenceMetric,
const Vector< LevelData< FArrayBox > * > &  a_rhs,
const Vector< LevelData< FArrayBox > * > &  a_C,
const Vector< LevelData< FArrayBox > * > &  a_C0,
const Vector< LevelData< FArrayBox > * > &  a_A,
const Vector< LevelData< FArrayBox > * > &  a_muCoef,
Vector< RefCountedPtr< LevelSigmaCS > > &  a_coordSys,
Real  a_time,
int  a_lbase,
int  a_maxLevel 
)
pure virtual

Compute the horizontal, cell centered ice velocity ( u(x,y), v(x,y) ) [VERTICALLY INTEGRATED MODELS!].

Parameters
a_horizontalVelon input an initial guess ( u_0(x,y), v_0(x,y) ), on output ( u(x,y), v(x,y) )
a_initialResidualNormresidual norm given the initial guess
a_finalResidualNormresidual norm at the end of the calculation
a_convergenceMetricdesired a_finalResidualNorm/a_initialResidualNorm
a_rhsright hand side of the stress balance equation: the driving stress (x,y) components
a_Cmain basal friction coefficient : $ \tau _b = f_b(C,u) + C_0 u $
a_C0auxilliary basal friction coefficient : $ \tau _b =f_b(C,u) + C_0 u $
a_Aflow rate factor: one component per layer
a_muCoefstiffness factor: one component
a_coordSysice sheet geoemtry
a_timecurrent time
a_lbaselowest mesh level (probably doesn't work!)
a_maxLevelhighest mesh level
Returns
0 if solver converges successfully

Implemented in InverseVerticallyIntegratedVelocitySolver, PythonInterface::PythonVelocitySolver, JFNKSolver, PetscIceSolver, and KnownVelocitySolver.

Referenced by InverseVerticallyIntegratedVelocitySolver::define(), AmrIce::solveVelocityField(), and ~IceVelocitySolver().

Member Data Documentation

◆ m_isDefined

bool IceVelocitySolver::m_isDefined
protected

Referenced by IceVelocitySolver(), and isDefined().

◆ m_verbosity

int IceVelocitySolver::m_verbosity
protected

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