Chombo + EB
3.0
|
Time interpolator class using 4th-order Runge-Kutta. 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) | |
Full constructor. More... | |
~FourthOrderInterpStencil () | |
Destructor. More... | |
void | define (const IntVect &a_bdryOffset, const int &a_refineCoarse, const int &a_degree=3) |
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... | |
Protected Attributes | |
int | m_refineCoarse |
refinement ratio More... | |
int | m_degree |
max degree of polynomials 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... | |
int | m_stencilSize |
number of coarse cells in the stencil More... | |
Vector< int > | m_coarseBaseIndices |
length m_stencilSize*SpaceDim, 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... | |
bool | m_defined |
whether define() has been called More... | |
Private Member Functions | |
void | operator= (const FourthOrderInterpStencil &a_input) |
FourthOrderInterpStencil (const FourthOrderInterpStencil &a_input) | |
Time interpolator class using 4th-order Runge-Kutta.
FourthOrderInterpStencil::FourthOrderInterpStencil | ( | ) |
Default constructor.
Object requires define() to be called before all other functions.
|
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 |
References define(), fillFine(), IntVect::Zero, and ~FourthOrderInterpStencil().
FourthOrderInterpStencil::~FourthOrderInterpStencil | ( | ) |
Destructor.
Destroys all objects created by define(). Passed in data references of define() are left alone.
Referenced by FourthOrderInterpStencil().
|
inlineprivate |
References MayDay::Error().
void FourthOrderInterpStencil::define | ( | const IntVect & | a_bdryOffset, |
const int & | a_refineCoarse, | ||
const int & | a_degree = 3 |
||
) |
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 |
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_refineCoarse * (a_coarseDataCell + a_coarseToFineOffset). The coarse cells from which we draw data are (a_coarseDataCell + m_coarseBaseIndices[i*D+[0:2]]: 0 <= i < m_stencilSize).
a_fineFab | to fill at m_baseFineBox + m_refineCoarse*(a_coarseBase + 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 |
Referenced by FourthOrderInterpStencil().
|
inlineprivate |
References MayDay::Error().
|
protected |
refinement ratio
|
protected |
max degree of polynomials
|
protected |
displacement from domain boundary in each dimension, in range -(a_degree-1):(a_degree-1)
|
protected |
0:(m_refineCoarse-1) in every dimension
|
protected |
number of coarse cells in the stencil
|
protected |
length m_stencilSize*SpaceDim, lists indices of coarse cell corresponding to each component of m_coarseToFineFab
|
protected |
m_stencilSize coefficients of coarse cells for each cell in m_baseFineBox
|
protected |
whether define() has been called