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

class LevelDataIBC stores initial topography and thickness data on a single levels and imposes either periodic or reflection boundary conditions More...

#include <LevelDataIBC.H>

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

Public Member Functions

 LevelDataIBC (RefCountedPtr< LevelData< FArrayBox > > a_thck, RefCountedPtr< LevelData< FArrayBox > > a_topg, const RealVect &a_dx, Real a_defaultThickness=0.0, Real a_defaultTopography=-10000, bool a_setDefaultValues=false)
 Constructor. More...
 
 LevelDataIBC ()
 
virtual ~LevelDataIBC ()
 Destructor. More...
 
virtual void define (const ProblemDomain &a_domain, const Real &a_dx)
 Define the object. 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...
 
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)
 modify the ice sheet geometry after regrid 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 the initial ice sheet geometry 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
 

Detailed Description

class LevelDataIBC stores initial topography and thickness data on a single levels and imposes either periodic or reflection boundary conditions

LevelDataIBC constructs initial thickness and topography data from uniformly gridded DEMs such as ALBMAP (usually loaded from a file). It also imposes reflection or periodic boundary conditions on the velocity field. The "source" level domain need not coincide with any of the "destination" level domains stored by (say) AmrIce, but do need to be compatible with them such that the usual coarsening and refining operations can be used to construct the destination data from the source.

Constructor & Destructor Documentation

◆ LevelDataIBC() [1/2]

LevelDataIBC::LevelDataIBC ( RefCountedPtr< LevelData< FArrayBox > >  a_thck,
RefCountedPtr< LevelData< FArrayBox > >  a_topg,
const RealVect &  a_dx,
Real  a_defaultThickness = 0.0,
Real  a_defaultTopography = -10000,
bool  a_setDefaultValues = false 
)

Constructor.

◆ LevelDataIBC() [2/2]

LevelDataIBC::LevelDataIBC ( )

◆ ~LevelDataIBC()

LevelDataIBC::~LevelDataIBC ( )
virtual

Destructor.

Member Function Documentation

◆ artViscBC()

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

Reimplemented from IceThicknessIBC.

◆ initialize()

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

Set up initial conditions.

shouldn't be here...

Implements IceThicknessIBC.

◆ initializeIceGeometry()

void LevelDataIBC::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 the initial ice sheet geometry

Thickness and topography data are determined, in order of preference, by

  1. copying from one of the stored levels, if possible, or
  2. coarse averaging from a stored level, if possible but 1. is not, or
  3. interpolating from a_crseCoords
  4. interpolating from a coarser stored level

Implements IceThicknessIBC.

References FillFromReference(), LevelSigmaCS::getH(), LevelSigmaCS::getTopography(), LevelSigmaCS::ghostVect(), LevelSigmaCS::grids(), LevelSigmaCS::interpFromCoarse(), and setGeometryBCs().

◆ modifyVelocityRHS()

virtual void LevelDataIBC::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.

Reimplemented from IceThicknessIBC.

References LevelDataIBC(), setGeometryBCs(), and setSurfaceHeightBCs().

◆ new_thicknessIBC()

IceThicknessIBC * LevelDataIBC::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).

Implements IceThicknessIBC.

References LevelSigmaCS::getH(), LevelSigmaCS::getTopography(), LevelSigmaCS::grids(), LevelSigmaCS::iceDensity(), LevelDataIBC(), column_thermodynamics::rhoi, column_thermodynamics::rhoo, LevelSigmaCS::seaLevel(), and LevelSigmaCS::waterDensity().

◆ primBC()

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

modify the ice sheet geometry after regrid

Reimplemented from IceThicknessIBC.

References FillFromReference(), LevelSigmaCS::getTopography(), and LevelSigmaCS::interpFromCoarse().

◆ setBdrySlopes()

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

◆ setGeometryBCs()

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

Reimplemented from IceThicknessIBC.

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

Referenced by initializeIceGeometry(), and modifyVelocityRHS().

◆ setSurfaceHeightBCs()

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

Reimplemented from IceThicknessIBC.

References ReflectGhostCells().

Referenced by modifyVelocityRHS().

◆ velocitySolveBC()

RefCountedPtr< CompGridVTOBC > LevelDataIBC::velocitySolveBC ( )
virtual

return boundary condition for Ice velocity solve

eventually would like this to be a BCHolder

Implements IceThicknessIBC.


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