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

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

#include <HumpIBC.H>

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

Public Member Functions

 HumpIBC ()
 Constructor. More...
 
virtual ~HumpIBC ()
 Destructor. More...
 
virtual void define (const ProblemDomain &a_domain, const Real &a_dx)
 Define the object. More...
 
void setParameters (Real a_maxThickness, Real a_radSqr, Real a_baseElevation, Real a_minThickness, RealVect a_center, const Real &a_seaLevel, const RealVect &a_widthScale=RealVect::Unit)
 sets parameters for the hump problem More...
 
virtual IceThicknessIBCnew_thicknessIBC ()
 Factory method - this object is its own factory. More...
 
virtual void initialize (LevelData< FArrayBox > &a_U)
 Set up initial conditions. 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...
 
- 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 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 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 setGeometryBCs (LevelSigmaCS &a_coords, const ProblemDomain &a_domain, const RealVect &a_dx, Real a_time, Real a_dt)
 set non-periodic ghost cells for geometry 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
 

Protected Member Functions

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

Protected Attributes

Real m_baseElevation
 
Real m_maxThickness
 max ice sheet thickness More...
 
Real m_radSqr
 
RealVect m_center
 
RealVect m_widthScale
 
RealVect m_domainSize
 
Real m_minThickness
 
Real m_seaLevel
 
bool m_isBCsetUp
 
bool m_paramsSet
 
RefCountedPtr< CompGridVTOBC > m_velBCs
 
bool m_doHOinit
 

Detailed Description

Physical/domain initial and boundary conditions.

Constructor & Destructor Documentation

◆ HumpIBC()

HumpIBC::HumpIBC ( )

Constructor.

References m_doHOinit, m_isBCsetUp, and m_paramsSet.

Referenced by new_thicknessIBC().

◆ ~HumpIBC()

HumpIBC::~HumpIBC ( )
virtual

Destructor.

Member Function Documentation

◆ artViscBC()

void HumpIBC::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 HumpIBC::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 HumpIBC::initialize ( LevelData< FArrayBox > &  a_U)
virtual

Set up initial conditions.

shouldn't be here...

Implements IceThicknessIBC.

◆ initializeIceGeometry()

void HumpIBC::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

set up initial ice state

reads info from ParmParse and sets up ice sheet geometry

reads info from ParmParse and sets up ice sheet geometry by calling the defineSigmaCS function in the util directory

Implements IceThicknessIBC.

References LevelSigmaCS::dx(), fourthOrderAverageCell(), LevelSigmaCS::getH(), LevelSigmaCS::getTopography(), LevelSigmaCS::grids(), m_baseElevation, m_center, m_maxThickness, m_minThickness, m_paramsSet, m_radSqr, m_seaLevel, m_widthScale, LevelSigmaCS::setSeaLevel(), and LevelSigmaCS::setTopography().

◆ modifyVelocityRHS()

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

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...)

(not necessary for the hump problem)

Reimplemented from IceThicknessIBC.

◆ new_thicknessIBC()

IceThicknessIBC * HumpIBC::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 HumpIBC(), m_baseElevation, m_center, m_doHOinit, m_isBCsetUp, m_maxThickness, m_minThickness, m_paramsSet, m_radSqr, m_seaLevel, m_velBCs, and m_widthScale.

◆ primBC()

void HumpIBC::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.

◆ setBdrySlopes()

void HumpIBC::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.

◆ setParameters()

void HumpIBC::setParameters ( Real  a_maxThickness,
Real  a_radSqr,
Real  a_baseElevation,
Real  a_minThickness,
RealVect  a_center,
const Real &  a_seaLevel,
const RealVect &  a_widthScale = RealVect::Unit 
)

sets parameters for the hump problem

References m_baseElevation, m_center, m_maxThickness, m_minThickness, m_paramsSet, m_radSqr, m_seaLevel, and m_widthScale.

Referenced by main().

◆ setSurfaceHeightBCs()

void HumpIBC::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.

use linear extrapolation

use linear extrapolation (corresponds to one-sided differencing)

Reimplemented from IceThicknessIBC.

◆ setupBCs()

void HumpIBC::setupBCs ( )
protected

set up bc's based on parmparse inputs

References HumpVelBC(), m_isBCsetUp, and m_velBCs.

Referenced by velocitySolveBC().

◆ velocitySolveBC()

RefCountedPtr< CompGridVTOBC > HumpIBC::velocitySolveBC ( )
virtual

return boundary condition for Ice velocity solve

eventually would like this to be a BCHolder

Implements IceThicknessIBC.

References m_isBCsetUp, m_velBCs, and setupBCs().

Member Data Documentation

◆ m_baseElevation

Real HumpIBC::m_baseElevation
protected

◆ m_center

RealVect HumpIBC::m_center
protected

◆ m_doHOinit

bool HumpIBC::m_doHOinit
protected

Referenced by HumpIBC(), and new_thicknessIBC().

◆ m_domainSize

RealVect HumpIBC::m_domainSize
protected

◆ m_isBCsetUp

bool HumpIBC::m_isBCsetUp
protected

◆ m_maxThickness

Real HumpIBC::m_maxThickness
protected

max ice sheet thickness

Referenced by initializeIceGeometry(), new_thicknessIBC(), and setParameters().

◆ m_minThickness

Real HumpIBC::m_minThickness
protected

◆ m_paramsSet

bool HumpIBC::m_paramsSet
protected

◆ m_radSqr

Real HumpIBC::m_radSqr
protected

◆ m_seaLevel

Real HumpIBC::m_seaLevel
protected

◆ m_velBCs

RefCountedPtr<CompGridVTOBC> HumpIBC::m_velBCs
protected

◆ m_widthScale

RealVect HumpIBC::m_widthScale
protected

useful for testing 1D versions of the hump

Referenced by initializeIceGeometry(), new_thicknessIBC(), and setParameters().


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