#include <FourthOrderInterpStencil.H>
Public Member Functions | |
FourthOrderInterpStencil () | |
Default constructor. | |
FourthOrderInterpStencil (const IntVect &a_bdryOffset, const int &a_refineCoarse, const int &a_degree=3, Interval a_fixedDims=Interval()) | |
Full constructor. | |
~FourthOrderInterpStencil () | |
Destructor. | |
void | define (const IntVect &a_bdryOffset, const int &a_refineCoarse, const int &a_degree=3, Interval a_fixedDims=Interval()) |
Actual constructor. | |
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. | |
Public Attributes | |
int | m_stencilSize |
number of coarse cells in the stencil | |
Vector< IntVect > | m_coarseBaseIndices |
length m_stencilSize, lists indices of coarse cell corresponding to each component of m_coarseToFineFab | |
FArrayBox | m_coarseToFineFab |
m_stencilSize coefficients of coarse cells for each cell in m_baseFineBox | |
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 | |
int | m_degree |
max degree of polynomials | |
Interval | m_fixedDims |
dimensions that are fixed, not interpolated | |
IntVect | m_refineVect |
1 in m_fixedDims, m_refineCoarse in other dimensions | |
IntVect | m_bdryOffset |
displacement from domain boundary in each dimension, in range -(a_degree-1):(a_degree-1) | |
Box | m_baseFineBox |
0:(m_refineCoarse-1) in every dimension | |
bool | m_defined |
whether define() has been called | |
Private Member Functions | |
void | operator= (const FourthOrderInterpStencil &a_input) |
FourthOrderInterpStencil (const FourthOrderInterpStencil &a_input) |
FourthOrderInterpStencil::FourthOrderInterpStencil | ( | ) |
Default constructor.
Object requires define() to be called before all other functions.
FourthOrderInterpStencil::FourthOrderInterpStencil | ( | const IntVect & | a_bdryOffset, | |
const int & | a_refineCoarse, | |||
const int & | a_degree = 3 , |
|||
Interval | a_fixedDims = Interval() | |||
) | [inline] |
Full constructor.
a_bdryOffset | in range -(a_degree-1):(a_degree-1), specifies displacement to boundary in each dimension |
a_refineCoarse | refinement ratio |
a_degree | max degree of polynomials |
a_fixedDims | dimensions that are fixed, not interpolated |
References define().
FourthOrderInterpStencil::~FourthOrderInterpStencil | ( | ) |
FourthOrderInterpStencil::FourthOrderInterpStencil | ( | const FourthOrderInterpStencil & | a_input | ) | [inline, private] |
References MayDay::Error().
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.
a_bdryOffset | in range -(a_degree-1):(a_degree-1), specifies displacement to boundary in each dimension |
a_refineCoarse | refinement ratio |
a_degree | max degree of polynomials |
a_fixedDims | dimensions that are fixed, not interpolated |
Referenced by FourthOrderInterpStencil().
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).
a_fineFab | to fill at m_baseFineBox + m_refineVect*a_coarseDataCell + a_coarseToFineOffset |
a_coarseFab | coarse data |
a_coarseDataCell | coarse cell with fine subcells to fill in |
a_coarseToFineOffset | offset from base coarse cell to coarsened fine cells |
Real FourthOrderInterpStencil::power1d0avg | ( | Real | a_lower, | |
Real | a_upper, | |||
int | a_ipwr | |||
) | const [protected] |
Real FourthOrderInterpStencil::power1dcoarseind0avg | ( | int | a_offset, | |
int | a_ipwr | |||
) | const [protected] |
Real FourthOrderInterpStencil::power1dfineind0avg | ( | int | a_offset, | |
int | a_ipwr | |||
) | const [protected] |
void FourthOrderInterpStencil::operator= | ( | const FourthOrderInterpStencil & | a_input | ) | [inline, private] |
References MayDay::Error().
int FourthOrderInterpStencil::m_refineCoarse [protected] |
refinement ratio
int FourthOrderInterpStencil::m_degree [protected] |
max degree of polynomials
Interval FourthOrderInterpStencil::m_fixedDims [protected] |
dimensions that are fixed, not interpolated
IntVect FourthOrderInterpStencil::m_refineVect [protected] |
1 in m_fixedDims, m_refineCoarse in other dimensions
IntVect FourthOrderInterpStencil::m_bdryOffset [protected] |
displacement from domain boundary in each dimension, in range -(a_degree-1):(a_degree-1)
Box FourthOrderInterpStencil::m_baseFineBox [protected] |
0:(m_refineCoarse-1) in every dimension
number of coarse cells in the stencil
length m_stencilSize, lists indices of coarse cell corresponding to each component of m_coarseToFineFab
m_stencilSize coefficients of coarse cells for each cell in m_baseFineBox
bool FourthOrderInterpStencil::m_defined [protected] |
whether define() has been called