BISICLES AMR ice sheet model  0.9
Public Member Functions | List of all members
PythonInterface::PythonVelocitySolver Class Reference

#include <PythonInterface.H>

Inheritance diagram for PythonInterface::PythonVelocitySolver:
Inheritance graph
[legend]
Collaboration diagram for PythonInterface::PythonVelocitySolver:
Collaboration graph
[legend]

Public Member Functions

virtual ~PythonVelocitySolver ()
 
virtual void define (const ProblemDomain &a_coarseDomain, ConstitutiveRelation *a_constRel, BasalFrictionRelation *a_basalFrictionRel, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< int > &a_vectRefRatio, const RealVect &a_dxCrse, IceThicknessIBC *a_bc, int a_numLevels)
 (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_beta, const Vector< LevelData< FArrayBox > * > &a_beta0, 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)
 Compute the horizontal, cell centered ice velocity ( u(x,y), v(x,y) ) [VERTICALLY INTEGRATED MODELS!]. More...
 
 PythonVelocitySolver (PyObject *a_pModule, PyObject *a_pFunc)
 
 PythonVelocitySolver ()
 
- Public Member Functions inherited from IceVelocitySolver
 IceVelocitySolver ()
 
virtual ~IceVelocitySolver ()
 
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 ()
 

Additional Inherited Members

- Protected Attributes inherited from IceVelocitySolver
bool m_isDefined
 
int m_verbosity
 

Constructor & Destructor Documentation

◆ ~PythonVelocitySolver()

PythonInterface::PythonVelocitySolver::~PythonVelocitySolver ( )
virtual

◆ PythonVelocitySolver() [1/2]

PythonInterface::PythonVelocitySolver::PythonVelocitySolver ( PyObject *  a_pModule,
PyObject *  a_pFunc 
)
inline

◆ PythonVelocitySolver() [2/2]

PythonInterface::PythonVelocitySolver::PythonVelocitySolver ( )
inline

Member Function Documentation

◆ define()

void PythonInterface::PythonVelocitySolver::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 
)
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.

Implements IceVelocitySolver.

References PythonInterface::InitializePythonFunction(), PythonInterface::InitializePythonModule(), and solve().

Referenced by PythonInterface::PythonMuCoefficient::setMuCoefficient().

◆ solve()

int PythonInterface::PythonVelocitySolver::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 
)
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

Implements IceVelocitySolver.

References LevelSigmaCS::dx(), LevelSigmaCS::getH(), LevelSigmaCS::getTopography(), and PythonInterface::PythonEval().

Referenced by define().


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