BISICLES AMR ice sheet model  0.9
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MarineIBC Class Reference

Physical/domain initial and boundary conditions. More...

#include <MarineIBC.H>

Inheritance diagram for MarineIBC:
Inheritance graph
[legend]
Collaboration diagram for MarineIBC:
Collaboration graph
[legend]

Public Member Functions

 MarineIBC ()
 Constructor. More...
 
virtual ~MarineIBC ()
 Destructor. More...
 
virtual void define (const ProblemDomain &a_domain, const Real &a_dx)
 Define the object. More...
 
void setParameters (RefCountedPtr< RealFunction< RealVect > > a_thicknessFunction, RefCountedPtr< RealFunction< RealVect > > a_bedrockFunction, const Real &a_seaLevel)
 
void setParameters (RefCountedPtr< RealFunction< RealVect > > a_thicknessFunction, Vector< RefCountedPtr< RealFunction< RealVect > > > a_bedrockFunction, const Real &a_seaLevel)
 
virtual IceThicknessIBCnew_thicknessIBC ()
 Factory method - this object is its own factory. More...
 
void setBoundaryThickness (Real a_boundaryThickness)
 set boundary ice-sheet thickness More...
 
virtual void initialize (LevelData< FArrayBox > &a_U)
 Set up initial conditions. More...
 
bool regridIceGeometry (LevelSigmaCS &a_coords, const RealVect &a_dx, const RealVect &a_domainSize, const Real &a_time, const LevelSigmaCS *a_crseCoords, const int a_refRatio)
 set up topography, etc at regrid time More...
 
virtual void initializeIceGeometry (LevelSigmaCS &a_coords, const RealVect &a_dx, const RealVect &a_domainSize, const Real &a_time, const LevelSigmaCS *a_crseCoords, const int a_refRatio)
 set up initial ice state More...
 
virtual void primBC (FArrayBox &a_WGdnv, const FArrayBox &a_Wextrap, const FArrayBox &a_W, const int &a_dir, const Side::LoHiSide &a_side, const Real &a_time)
 Set boundary fluxes. More...
 
virtual void setBdrySlopes (FArrayBox &a_dW, const FArrayBox &a_W, const int &a_dir, const Real &a_time)
 Set boundary slopes. More...
 
virtual void artViscBC (FArrayBox &a_F, const FArrayBox &a_U, const FArrayBox &a_divVel, const int &a_dir, const Real &a_time)
 Adjust boundary fluxes to account for artificial viscosity. More...
 
virtual RefCountedPtr< CompGridVTOBC > velocitySolveBC ()
 return boundary condition for Ice velocity solve More...
 
virtual void modifyVelocityRHS (LevelData< FArrayBox > &a_rhs, LevelSigmaCS &a_coords, const ProblemDomain &a_domain, Real a_time, Real a_dt)
 if appropriate, modify velocity solve RHS in a problem-dependent way. More...
 
virtual void setSurfaceHeightBCs (LevelData< FArrayBox > &a_zSurface, LevelSigmaCS &a_coords, const ProblemDomain &a_domain, const RealVect &a_dx, Real a_time, Real a_dt)
 set non-periodic ghost cells for surface height z_s. More...
 
virtual void setGeometryBCs (LevelSigmaCS &a_coords, const ProblemDomain &a_domain, const RealVect &a_dx, Real a_time, Real a_dt)
 set non-periodic geometry (thickness, topography) ghost cells More...
 
- Public Member Functions inherited from IceThicknessIBC
 IceThicknessIBC ()
 Constructor. More...
 
virtual ~IceThicknessIBC ()
 Destructor. More...
 
virtual PhysIBC * new_physIBC ()
 Factory method - this object is its own factory. More...
 
virtual void velocityGhostBC (LevelData< FArrayBox > &a_velocity, const LevelSigmaCS &a_coords, const ProblemDomain &a_domain, Real a_time)
 fill ghost cells on velocity More...
 
virtual void modifyFaceVelocity (LevelData< FluxBox > &a_faceVel, const LevelSigmaCS &a_coords, const ProblemDomain &a_domain) const
 if appropriate, modify face velocities in a problem-dependent way. More...
 
virtual void setIceFractionBCs (LevelData< FArrayBox > &a_iceFrac, const ProblemDomain &a_domain, const RealVect &a_dx, Real a_time, Real a_dt)
 set non-periodic ghost cells for ice fraction More...
 
virtual void setGridHierarchy (Vector< RefCountedPtr< LevelSigmaCS > > &a_vectCS, Vector< ProblemDomain > &a_vectDomain)
 set AMR grid hierarchy (for the BC's which need this) More...
 
virtual void checkOK () const
 

Static Public Attributes

static RealVect s_edgeThickness
 ice thickness at edge of domain for use in computing velocity Bc's More...
 

Protected Member Functions

void setupBCs ()
 set up bc's based on parmparse inputs More...
 

Protected Attributes

Vector< RefCountedPtr< RealFunction< RealVect > > > m_bedrockFunction
 
RefCountedPtr< RealFunction< RealVect > > m_thicknessFunction
 
RealVect m_slope
 
Real m_originElevation
 
Real m_thickness
 ice sheet thickness (initially constant) More...
 
RealVect m_domainSize
 
Real m_seaLevel
 
bool m_isBCsetUp
 
bool m_paramsSet
 
RefCountedPtr< CompGridVTOBC > m_velBCs
 

Detailed Description

Physical/domain initial and boundary conditions.

Constructor & Destructor Documentation

◆ MarineIBC()

MarineIBC::MarineIBC ( )

Constructor.

References m_isBCsetUp, and m_paramsSet.

Referenced by new_thicknessIBC().

◆ ~MarineIBC()

MarineIBC::~MarineIBC ( )
virtual

Destructor.

Member Function Documentation

◆ artViscBC()

void MarineIBC::artViscBC ( FArrayBox &  a_F,
const FArrayBox &  a_U,
const FArrayBox &  a_divVel,
const int &  a_dir,
const Real &  a_time 
)
virtual

Adjust boundary fluxes to account for artificial viscosity.

Implements IceThicknessIBC.

◆ define()

void MarineIBC::define ( const ProblemDomain &  a_domain,
const Real &  a_dx 
)
virtual

Define the object.

Set the problem domain index space and the grid spacing for this initial and boundary condition object.

Set the problem domain index space and the grid spacing for this initial and boundary condition object. Just calls base-class define

Reimplemented from IceThicknessIBC.

◆ initialize()

void MarineIBC::initialize ( LevelData< FArrayBox > &  a_U)
virtual

Set up initial conditions.

shouldn't be here...

Implements IceThicknessIBC.

◆ initializeIceGeometry()

void MarineIBC::initializeIceGeometry ( LevelSigmaCS a_coords,
const RealVect &  a_dx,
const RealVect &  a_domainSize,
const Real &  a_time,
const LevelSigmaCS a_crseCoords,
const int  a_refRatio 
)
virtual

◆ modifyVelocityRHS()

void MarineIBC::modifyVelocityRHS ( LevelData< FArrayBox > &  a_rhs,
LevelSigmaCS a_coords,
const ProblemDomain &  a_domain,
Real  a_time,
Real  a_dt 
)
inlinevirtual

if appropriate, modify velocity solve RHS in a problem-dependent way.

In this case, what's done is to set the boundary thickness for use in computing the inhomogeneous form of the velocity BC. (actual RHS is left unmodified, which suggests that maybe this function should really be called something else...)

add a momemtum source s[dir] = 1/Dx * 0.5 * ri/rw * (ri - rw) * g * H^2 to the rhs[dir] at the high dir boundary (1D or 2D cases), or s[dir] = - 1/Dx * ri/rw * (ri - rw) * g * H (3D case) , which is equvalent to setting the momentum flux through the surface (with unit normal n) T.n n = s n

currently, dir = 0 only

Reimplemented from IceThicknessIBC.

Referenced by velocitySolveBC().

◆ new_thicknessIBC()

IceThicknessIBC * MarineIBC::new_thicknessIBC ( )
virtual

Factory method - this object is its own factory.

Return a pointer to a new IceThicknessIBC object with m_isDefined = false (i.e., its define() must be called before it is used).

Return a pointer to a new PhysIBC object with m_isDefined = false (i.e., its define() must be called before it is used).

Implements IceThicknessIBC.

References m_bedrockFunction, m_isBCsetUp, m_paramsSet, m_seaLevel, m_thicknessFunction, m_velBCs, and MarineIBC().

◆ primBC()

void MarineIBC::primBC ( FArrayBox &  a_WGdnv,
const FArrayBox &  a_Wextrap,
const FArrayBox &  a_W,
const int &  a_dir,
const Side::LoHiSide &  a_side,
const Real &  a_time 
)
virtual

Set boundary fluxes.

Implements IceThicknessIBC.

◆ regridIceGeometry()

bool MarineIBC::regridIceGeometry ( LevelSigmaCS a_coords,
const RealVect &  a_dx,
const RealVect &  a_domainSize,
const Real &  a_time,
const LevelSigmaCS a_crseCoords,
const int  a_refRatio 
)
virtual

set up topography, etc at regrid time

Reimplemented from IceThicknessIBC.

References LevelSigmaCS::dx(), LevelSigmaCS::getTopography(), LevelSigmaCS::grids(), m_bedrockFunction, and m_paramsSet.

◆ setBdrySlopes()

void MarineIBC::setBdrySlopes ( FArrayBox &  a_dW,
const FArrayBox &  a_W,
const int &  a_dir,
const Real &  a_time 
)
virtual

Set boundary slopes.

The boundary slopes in a_dW are already set to one sided difference approximations. If this function doesn't change them they will be used for the slopes at the boundaries.

Implements IceThicknessIBC.

◆ setBoundaryThickness()

void MarineIBC::setBoundaryThickness ( Real  a_boundaryThickness)
inline

set boundary ice-sheet thickness

◆ setGeometryBCs()

void MarineIBC::setGeometryBCs ( LevelSigmaCS a_coords,
const ProblemDomain &  a_domain,
const RealVect &  a_dx,
Real  a_time,
Real  a_dt 
)
virtual

set non-periodic geometry (thickness, topography) ghost cells

set non-periodic ghost cells for thickness & topography,

reflection

Reimplemented from IceThicknessIBC.

References LevelSigmaCS::getH(), LevelSigmaCS::getTopography(), and ReflectGhostCells().

◆ setParameters() [1/2]

void MarineIBC::setParameters ( RefCountedPtr< RealFunction< RealVect > >  a_thicknessFunction,
RefCountedPtr< RealFunction< RealVect > >  a_bedrockFunction,
const Real &  a_seaLevel 
)

Referenced by main().

◆ setParameters() [2/2]

void MarineIBC::setParameters ( RefCountedPtr< RealFunction< RealVect > >  a_thicknessFunction,
Vector< RefCountedPtr< RealFunction< RealVect > > >  a_bedrockFunction,
const Real &  a_seaLevel 
)

◆ setSurfaceHeightBCs()

void MarineIBC::setSurfaceHeightBCs ( LevelData< FArrayBox > &  a_zSurface,
LevelSigmaCS a_coords,
const ProblemDomain &  a_domain,
const RealVect &  a_dx,
Real  a_time,
Real  a_dt 
)
virtual

set non-periodic ghost cells for surface height z_s.

reflection

Reimplemented from IceThicknessIBC.

References ReflectGhostCells().

◆ setupBCs()

void MarineIBC::setupBCs ( )
protected

set up bc's based on parmparse inputs

References m_isBCsetUp, m_velBCs, and MarineVelBC().

Referenced by velocitySolveBC().

◆ velocitySolveBC()

RefCountedPtr< CompGridVTOBC > MarineIBC::velocitySolveBC ( )
virtual

return boundary condition for Ice velocity solve

eventually would like this to be a BCHolder

Implements IceThicknessIBC.

References LevelSigmaCS::dx(), LevelSigmaCS::getH(), LevelSigmaCS::gravity(), LevelSigmaCS::grids(), LevelSigmaCS::iceDensity(), m_isBCsetUp, m_velBCs, modifyVelocityRHS(), setupBCs(), and LevelSigmaCS::waterDensity().

Member Data Documentation

◆ m_bedrockFunction

Vector<RefCountedPtr<RealFunction<RealVect> > > MarineIBC::m_bedrockFunction
protected

◆ m_domainSize

RealVect MarineIBC::m_domainSize
protected

◆ m_isBCsetUp

bool MarineIBC::m_isBCsetUp
protected

◆ m_originElevation

Real MarineIBC::m_originElevation
protected

◆ m_paramsSet

bool MarineIBC::m_paramsSet
protected

◆ m_seaLevel

Real MarineIBC::m_seaLevel
protected

◆ m_slope

RealVect MarineIBC::m_slope
protected

◆ m_thickness

Real MarineIBC::m_thickness
protected

ice sheet thickness (initially constant)

◆ m_thicknessFunction

RefCountedPtr<RealFunction<RealVect> > MarineIBC::m_thicknessFunction
protected

Referenced by new_thicknessIBC(), and setParameters().

◆ m_velBCs

RefCountedPtr<CompGridVTOBC> MarineIBC::m_velBCs
protected

◆ s_edgeThickness

RealVect MarineIBC::s_edgeThickness
static

ice thickness at edge of domain for use in computing velocity Bc's

this is an initial hack intended to get things up and running, and assumes that thickness is constant along the front... This is public so that the BCFunc can access it.


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