Chombo + EB + MF  3.2
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
FourthOrderInterpStencil Class Reference

Class to manage coarse-to-fine spatial interpolation to all fine cells within a single particular coarse cell. More...

#include <FourthOrderInterpStencil.H>

Public Member Functions

 FourthOrderInterpStencil ()
 Default constructor. More...
 
 FourthOrderInterpStencil (const IntVect &a_bdryOffset, const int &a_refineCoarse, const int &a_degree=3, Interval a_fixedDims=Interval())
 Full constructor. More...
 
 ~FourthOrderInterpStencil ()
 Destructor. More...
 
void define (const IntVect &a_bdryOffset, const int &a_refineCoarse, const int &a_degree=3, Interval a_fixedDims=Interval())
 Actual constructor. More...
 
void fillFine (FArrayBox &a_fineFab, const FArrayBox &a_coarseFab, const IntVect &a_coarseDataCell, const IntVect &a_coarseToFineOffset=IntVect::Zero) const
 Interpolate to all the fine cells within one coarse cell. More...
 

Public Attributes

int m_stencilSize
 number of coarse cells in the stencil More...
 
Vector< IntVectm_coarseBaseIndices
 length m_stencilSize, lists indices of coarse cell corresponding to each component of m_coarseToFineFab More...
 
FArrayBox m_coarseToFineFab
 m_stencilSize coefficients of coarse cells for each cell in m_baseFineBox More...
 

Protected Member Functions

Real power1d0avg (Real a_lower, Real a_upper, int a_ipwr) const
 
Real power1dcoarseind0avg (int a_offset, int a_ipwr) const
 
Real power1dfineind0avg (int a_offset, int a_ipwr) const
 

Protected Attributes

int m_refineCoarse
 refinement ratio More...
 
int m_degree
 max degree of polynomials More...
 
Interval m_fixedDims
 dimensions that are fixed, not interpolated More...
 
IntVect m_refineVect
 1 in m_fixedDims, m_refineCoarse in other dimensions More...
 
IntVect m_bdryOffset
 displacement from domain boundary in each dimension, in range -(a_degree-1):(a_degree-1) More...
 
Box m_baseFineBox
 0:(m_refineCoarse-1) in every dimension More...
 
bool m_defined
 whether define() has been called More...
 

Private Member Functions

void operator= (const FourthOrderInterpStencil &a_input)
 
 FourthOrderInterpStencil (const FourthOrderInterpStencil &a_input)
 

Detailed Description

Class to manage coarse-to-fine spatial interpolation to all fine cells within a single particular coarse cell.

Constructor & Destructor Documentation

◆ FourthOrderInterpStencil() [1/3]

FourthOrderInterpStencil::FourthOrderInterpStencil ( )

Default constructor.

Object requires define() to be called before all other functions.

◆ FourthOrderInterpStencil() [2/3]

FourthOrderInterpStencil::FourthOrderInterpStencil ( const IntVect a_bdryOffset,
const int &  a_refineCoarse,
const int &  a_degree = 3,
Interval  a_fixedDims = Interval() 
)
inline

Full constructor.

Parameters
a_bdryOffsetin range -(a_degree-1):(a_degree-1), specifies displacement to boundary in each dimension
a_refineCoarserefinement ratio
a_degreemax degree of polynomials
a_fixedDimsdimensions that are fixed, not interpolated

References define(), fillFine(), IntVect::Zero, and ~FourthOrderInterpStencil().

◆ ~FourthOrderInterpStencil()

FourthOrderInterpStencil::~FourthOrderInterpStencil ( )

Destructor.

Destroys all objects created by define(). Passed in data references of define() are left alone.

Referenced by FourthOrderInterpStencil().

◆ FourthOrderInterpStencil() [3/3]

FourthOrderInterpStencil::FourthOrderInterpStencil ( const FourthOrderInterpStencil a_input)
inlineprivate

References MayDay::Error().

Member Function Documentation

◆ define()

void FourthOrderInterpStencil::define ( const IntVect a_bdryOffset,
const int &  a_refineCoarse,
const int &  a_degree = 3,
Interval  a_fixedDims = Interval() 
)

Actual constructor.

Set up object.

Parameters
a_bdryOffsetin range -(a_degree-1):(a_degree-1), specifies displacement to boundary in each dimension
a_refineCoarserefinement ratio
a_degreemax degree of polynomials
a_fixedDimsdimensions that are fixed, not interpolated

Referenced by FourthOrderInterpStencil().

◆ fillFine()

void FourthOrderInterpStencil::fillFine ( FArrayBox a_fineFab,
const FArrayBox a_coarseFab,
const IntVect a_coarseDataCell,
const IntVect a_coarseToFineOffset = IntVect::Zero 
) const

Interpolate to all the fine cells within one coarse cell.

Fill the fine cells inside a_coarseDataCell with interpolated data from a_coarseFab.

The fine cells to be filled in are at m_baseFineBox + m_refineVect * a_coarseDataCell + a_coarseToFineOffset. The coarse cells from which we draw data are (a_coarseDataCell + m_coarseBaseIndices[i*D+[0:D-1]]: 0 <= i < m_stencilSize).

Parameters
a_fineFabto fill at m_baseFineBox + m_refineVect*a_coarseDataCell + a_coarseToFineOffset
a_coarseFabcoarse data
a_coarseDataCellcoarse cell with fine subcells to fill in
a_coarseToFineOffsetoffset from base coarse cell to coarsened fine cells

Referenced by FourthOrderInterpStencil().

◆ power1d0avg()

Real FourthOrderInterpStencil::power1d0avg ( Real  a_lower,
Real  a_upper,
int  a_ipwr 
) const
protected

◆ power1dcoarseind0avg()

Real FourthOrderInterpStencil::power1dcoarseind0avg ( int  a_offset,
int  a_ipwr 
) const
protected

◆ power1dfineind0avg()

Real FourthOrderInterpStencil::power1dfineind0avg ( int  a_offset,
int  a_ipwr 
) const
protected

◆ operator=()

void FourthOrderInterpStencil::operator= ( const FourthOrderInterpStencil a_input)
inlineprivate

References MayDay::Error().

Member Data Documentation

◆ m_refineCoarse

int FourthOrderInterpStencil::m_refineCoarse
protected

refinement ratio

◆ m_degree

int FourthOrderInterpStencil::m_degree
protected

max degree of polynomials

◆ m_fixedDims

Interval FourthOrderInterpStencil::m_fixedDims
protected

dimensions that are fixed, not interpolated

◆ m_refineVect

IntVect FourthOrderInterpStencil::m_refineVect
protected

1 in m_fixedDims, m_refineCoarse in other dimensions

◆ m_bdryOffset

IntVect FourthOrderInterpStencil::m_bdryOffset
protected

displacement from domain boundary in each dimension, in range -(a_degree-1):(a_degree-1)

◆ m_baseFineBox

Box FourthOrderInterpStencil::m_baseFineBox
protected

0:(m_refineCoarse-1) in every dimension

◆ m_stencilSize

int FourthOrderInterpStencil::m_stencilSize

number of coarse cells in the stencil

◆ m_coarseBaseIndices

Vector<IntVect> FourthOrderInterpStencil::m_coarseBaseIndices

length m_stencilSize, lists indices of coarse cell corresponding to each component of m_coarseToFineFab

◆ m_coarseToFineFab

FArrayBox FourthOrderInterpStencil::m_coarseToFineFab

m_stencilSize coefficients of coarse cells for each cell in m_baseFineBox

◆ m_defined

bool FourthOrderInterpStencil::m_defined
protected

whether define() has been called


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