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

class MultiLevelDataIBC stores initial topography and thickness data on multiple levels and imposes either periodic or reflection boundary conditions More...

#include <MultiLevelDataIBC.H>

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

Public Member Functions

 MultiLevelDataIBC (const Vector< RefCountedPtr< LevelData< FArrayBox > > > &a_thck, const Vector< RefCountedPtr< LevelData< FArrayBox > > > &a_topg, const RealVect &a_dxCrse, const Vector< int > &a_refRatio)
 
virtual ~MultiLevelDataIBC ()
 
virtual void define (const ProblemDomain &a_domain, const Real &a_dx)
 Define the object. More...
 
virtual IceThicknessIBCnew_thicknessIBC ()
 same as new_physIBC, except pointer cast to an IceThicknessIBC 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 the initial ice sheet geometry 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 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 thickness 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 MultiLevelDataIBC stores initial topography and thickness data on multiple levels and imposes either periodic or reflection boundary conditions

MultiLevelDataIBC is similar to LevelDataIBC (and might eventually subsume it entirely): it imposes either reflection or periodic boundary conditions on the velocity field, and provides an initial thickness and topgraphy derived from discrete data (typically loaded from a file). Unlike LevelDataIBC, it stores thickness and topography data in an AMR hierarchy, that is as Vector<LevelData<FArrayBox>*>. The "source" level domains that MultiLevelDataIBC stores need not be the same as the "destination" level domains stored bu (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

◆ MultiLevelDataIBC()

MultiLevelDataIBC::MultiLevelDataIBC ( const Vector< RefCountedPtr< LevelData< FArrayBox > > > &  a_thck,
const Vector< RefCountedPtr< LevelData< FArrayBox > > > &  a_topg,
const RealVect &  a_dxCrse,
const Vector< int > &  a_refRatio 
)

◆ ~MultiLevelDataIBC()

MultiLevelDataIBC::~MultiLevelDataIBC ( )
virtual

Member Function Documentation

◆ artViscBC()

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

Adjust boundary fluxes to account for artificial viscosity.

Implements IceThicknessIBC.

References velocitySolveBC().

◆ define()

void MultiLevelDataIBC::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. Default is to just call PhysIBC::define

Reimplemented from IceThicknessIBC.

◆ initialize()

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

Set up initial conditions.

shouldn't be here...

Implements IceThicknessIBC.

◆ initializeIceGeometry()

void MultiLevelDataIBC::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 finer 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 MultiLevelDataIBC::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 MultiLevelDataIBC(), setGeometryBCs(), and setSurfaceHeightBCs().

◆ new_thicknessIBC()

IceThicknessIBC * MultiLevelDataIBC::new_thicknessIBC ( )
virtual

same as new_physIBC, except pointer cast to an IceThicknessIBC

Implements IceThicknessIBC.

References MultiLevelDataIBC().

◆ primBC()

void MultiLevelDataIBC::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 thickness fluxes.

Implements IceThicknessIBC.

◆ regridIceGeometry()

bool MultiLevelDataIBC::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()

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

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 MultiLevelDataIBC::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 MultiLevelDataIBC::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 > MultiLevelDataIBC::velocitySolveBC ( )
virtual

return boundary condition for Ice velocity solve

Implements IceThicknessIBC.

References reflectionBC_MLDIBC().

Referenced by artViscBC().


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