chombo-discharge
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
IrregStencil Class Referenceabstract

Class for holding stencils on irregular cells over a single AMR level. More...

#include <CD_IrregStencil.H>

Inheritance diagram for IrregStencil:
Inheritance graph
[legend]

Public Types

enum class  StencilType {
  NoType , Linear , TaylorExtrapolation , LeastSquares ,
  PiecewiseLinear
}
 Enum for identifying stencil – only meant for enhancing code visibility.
 

Public Member Functions

 IrregStencil ()
 Weak constructor (does nothing)
 
 IrregStencil (const DisjointBoxLayout &a_dbl, const EBISLayout &a_ebisl, const ProblemDomain &a_domain, const Real &a_dx, const int a_order, const int a_radius, const IrregStencil::StencilType a_type)
 Full constructor. More...
 
virtual ~IrregStencil ()
 Destructor.
 
const BaseIVFAB< VoFStencil > & operator[] (const DataIndex &a_dit) const
 Get the stencils over a single box.
 
BaseIVFAB< VoFStencil > & operator[] (const DataIndex &a_dit)
 Get the stencils over a single box.
 
virtual void apply (EBCellFAB &a_dst, const EBCellFAB &a_src, const DataIndex &a_dit) const
 Apply the stencil.
 
virtual void apply (BaseIVFAB< Real > &a_dst, const EBCellFAB &a_src, const DataIndex &a_dit) const
 Apply the stencil.
 

Protected Member Functions

virtual void define (const DisjointBoxLayout &a_dbl, const EBISLayout &a_ebisl, const ProblemDomain &a_domain, const Real &a_dx, const int a_order, const int a_radius, const IrregStencil::StencilType a_type)
 Define function.
 
virtual void buildStencil (VoFStencil &a_sten, const VolIndex &a_vof, const DisjointBoxLayout &a_dbl, const ProblemDomain &a_domain, const EBISBox &a_ebisbox, const Box &a_box, const Real &a_dx, const IntVectSet &a_cfivs)=0
 Build the desired stencil.
 

Protected Attributes

LayoutData< RefCountedPtr< BaseIVFAB< VoFStencil > > > m_stencils
 Stencil.
 
LayoutData< VoFIterator > m_vofIter
 VoFIterators.
 
DisjointBoxLayout m_dbl
 Grids.
 
EBISLayout m_ebisl
 EBIS layout.
 
Real m_dx
 Level resolution.
 
int m_radius
 Stencil radius.
 
int m_order
 Stencil order.
 
IrregStencil::StencilType m_stencilType
 Stencil type.
 
ProblemDomain m_domain
 Domain.
 

Static Protected Attributes

static constexpr int m_defaultStenComp = 0
 Default stencil component.
 
static constexpr int m_defaultNumSten = 1
 Default stencil component.
 

Detailed Description

Class for holding stencils on irregular cells over a single AMR level.

Users can use this class for holding VoFStencils on an AMR level, and to embed it in an AMR context through IrregAmrStencil. Applications functions do not use stencil aggregration, so do not use this class in performance-critical stencil code (like multigrid). To use this class, override the buildStencil function which will build the stencil in each cut-cell.

Note
By default, a single stencil is allocated in the cut-cells. If you need more, override the define and apply functions.

Constructor & Destructor Documentation

◆ IrregStencil()

IrregStencil::IrregStencil ( const DisjointBoxLayout &  a_dbl,
const EBISLayout &  a_ebisl,
const ProblemDomain &  a_domain,
const Real &  a_dx,
const int  a_order,
const int  a_radius,
const IrregStencil::StencilType  a_type 
)

Full constructor.

Parameters
[in]a_dblGrids
[in]a_ebislEBIS layout
[in]a_domainProblem domain
[in]a_dxResolutions
[in]a_orderInterpolation order
[in]a_radiusRadius for least squares
[in]a_typeStencil type

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