chombo-discharge
Public Member Functions | Protected Member Functions | List of all members
CentroidInterpolationStencil Class Reference

Class which can take cell-centered data and interpolate it to cell centroids. More...

#include <CD_CentroidInterpolationStencil.H>

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

Public Member Functions

 CentroidInterpolationStencil ()=delete
 Disallowed weak constructor.
 
 CentroidInterpolationStencil (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. Subsequently calls define. More...
 
virtual ~CentroidInterpolationStencil ()
 Destructor.
 
- Public Member Functions inherited from IrregStencil
 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 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) override
 Build the interpolation stencils. More...
 
virtual bool getTaylorExtrapolationStencil (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)
 Build the interpolation stencils using Taylor series. More...
 
virtual bool getLeastSquaresStencil (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)
 Build the interpolation stencils using least squares interpolation. More...
 
virtual bool getPiecewiseLinearStencil (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)
 Build the interpolation stencils using piecewise linear reconstruction. More...
 
- Protected Member Functions inherited from IrregStencil
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.
 

Additional Inherited Members

- Public Types inherited from IrregStencil
enum class  StencilType {
  NoType , Linear , TaylorExtrapolation , LeastSquares ,
  PiecewiseLinear
}
 Enum for identifying stencil – only meant for enhancing code visibility.
 
- Protected Attributes inherited from IrregStencil
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 inherited from IrregStencil
static constexpr int m_defaultStenComp = 0
 Default stencil component.
 
static constexpr int m_defaultNumSten = 1
 Default stencil component.
 

Detailed Description

Class which can take cell-centered data and interpolate it to cell centroids.

Constructor & Destructor Documentation

◆ CentroidInterpolationStencil()

CentroidInterpolationStencil::CentroidInterpolationStencil ( 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. Subsequently calls define.

Parameters
[in]a_dblGrids
[in]a_ebislEBIS layout
[in]a_domainProblem domain
[in]a_dxResolutions
[in]a_orderInterpolation order
[in]a_radiusMaximum stencil radius
[in]a_typeStencil type

Member Function Documentation

◆ buildStencil()

void CentroidInterpolationStencil::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 
)
overrideprotectedvirtual

Build the interpolation stencils.

Parameters
[out]a_stenReturned stencil
[in]a_vofVolIndex where stencil is defined
[in]a_gridsGrids
[in]a_domainProblem domain
[in]a_ebisboxEBISBox
[in]a_boxBox currently being evaluated
[in]a_dxGrid resolution
[in]a_cfivsCoarse-fine interface

This calls one of the other function for computing the stencil.

Implements IrregStencil.

◆ getLeastSquaresStencil()

bool CentroidInterpolationStencil::getLeastSquaresStencil ( 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 
)
protectedvirtual

Build the interpolation stencils using least squares interpolation.

Parameters
[out]a_stenReturned stencil
[in]a_vofVolIndex where stencil is defined
[in]a_gridsGrids
[in]a_domainProblem domain
[in]a_ebisboxEBISBox
[in]a_boxBox currently being evaluated
[in]a_dxGrid resolution
[in]a_cfivsCoarse-fine interface

This defines an overdetermined system of equations, using a large neighborhood of cells, which is solved with weighted least squarse.

◆ getPiecewiseLinearStencil()

bool CentroidInterpolationStencil::getPiecewiseLinearStencil ( 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 
)
protectedvirtual

Build the interpolation stencils using piecewise linear reconstruction.

Parameters
[out]a_stenReturned stencil
[in]a_vofVolIndex where stencil is defined
[in]a_gridsGrids
[in]a_domainProblem domain
[in]a_ebisboxEBISBox
[in]a_boxBox currently being evaluated
[in]a_dxGrid resolution
[in]a_cfivsCoarse-fine interface

◆ getTaylorExtrapolationStencil()

bool CentroidInterpolationStencil::getTaylorExtrapolationStencil ( 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 
)
protectedvirtual

Build the interpolation stencils using Taylor series.

Parameters
[out]a_stenReturned stencil
[in]a_vofVolIndex where stencil is defined
[in]a_gridsGrids
[in]a_domainProblem domain
[in]a_ebisboxEBISBox
[in]a_boxBox currently being evaluated
[in]a_dxGrid resolution
[in]a_cfivsCoarse-fine interface

This tries to compute up to second order derivatives for use in a Taylor series.


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