Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
PiecewiseLinearFillPatch Class Reference
Fills ghost cells by linear interpolation in space and time.
More...
#include <PiecewiseLinearFillPatch.H>
Collaboration diagram for PiecewiseLinearFillPatch:
[legend]List of all members.
Public Methods |
| PiecewiseLinearFillPatch () |
| ~PiecewiseLinearFillPatch () |
| PiecewiseLinearFillPatch (const DisjointBoxLayout &a_fine_domain, const DisjointBoxLayout &a_coarse_domain, int a_num_comps, const Box &a_crse_problem_domain, int a_ref_ratio, int a_interp_radius) |
| PiecewiseLinearFillPatch (const DisjointBoxLayout &a_fine_domain, const DisjointBoxLayout &a_coarse_domain, int a_num_comps, const ProblemDomain &a_crse_problem_domain, int a_ref_ratio, int a_interp_radius) |
void | define (const DisjointBoxLayout &a_fine_domain, const DisjointBoxLayout &a_coarse_domain, int a_num_comps, const Box &a_crse_problem_domain, int a_ref_ratio, int a_interp_radius) |
void | define (const DisjointBoxLayout &a_fine_domain, const DisjointBoxLayout &a_coarse_domain, int a_num_comps, const ProblemDomain &a_crse_problem_domain, int a_ref_ratio, int a_interp_radius) |
bool | isDefined () const |
void | fillInterp (LevelData< FArrayBox > &a_fine_data, const LevelData< FArrayBox > &a_old_coarse_data, const LevelData< FArrayBox > &a_new_coarse_data, Real a_time_interp_coef, int a_src_comp, int a_dest_comp, int a_num_comp) |
void | printIntVectSets () const |
Protected Methods |
void | timeInterp (const LevelData< FArrayBox > &a_old_coarse_data, const LevelData< FArrayBox > &a_new_coarse_data, Real a_time_interp_coef, int a_src_comp, int a_dest_comp, int a_num_comp) |
void | fillConstantInterp (LevelData< FArrayBox > &a_fine_data, int a_src_comp, int a_dest_comp, int a_num_comp) const |
void | computeSlopes (int a_src_comp, int a_num_comp) |
void | incrementLinearInterp (LevelData< FArrayBox > &a_fine_data, int a_src_comp, int a_dest_comp, int a_num_comp) const |
Protected Attributes |
bool | m_is_defined |
int | m_ref_ratio |
int | m_interp_radius |
LevelData< FArrayBox > | m_coarsened_fine_data |
LevelData< FArrayBox > | m_slopes [3] |
ProblemDomain | m_crse_problem_domain |
LayoutData< IntVectSet > | m_fine_interp |
LayoutData< IntVectSet > | m_coarse_centered_interp [SpaceDim] |
LayoutData< IntVectSet > | m_coarse_lo_interp [SpaceDim] |
LayoutData< IntVectSet > | m_coarse_hi_interp [SpaceDim] |
Static Protected Attributes |
const int | s_stencil_radius |
Detailed Description
Fills ghost cells by linear interpolation in space and time.
Fills some fine level ghost cells by piecewise linear interpolation from the coarse level.
This class fills the first a_interp_radius layers of fine level ghost cells that are not part of other fine level grids. It uses piecewise linear interpolation from the coarse level. The slopes are computed using van leer limiting if there is enough room for the stencil. It drops order and uses first-order one-sided differences otherwise.
Below is a picture of a fine level, with a_interp_radius = 1. The ghost cells of grid 1 are shown. Cells marked X are interpolated to from the coarse level. Cells marked ^ are not interpolated to because they are in the valid domain of another fine grid. Cells marked . are not interpolated to because they are outside the problem domain. All of this changes in the presence of periodic boundary conditions -- in periodic directions, all cells are considered to be within the domain.
\begin{verbatim} +=======================================+ | | | | | | | | | + - - - - - - - - - - - - - - | + | X X X X X X X X X X X X X X X|. | | +===========================+ | | X| |. | | | | | | X| grid 1 |. | | | | | | X| |. | | | | | | X| |. | +=======+===+===============+=======+ | | | ^ ^ ^|X X X X X X X X|^ ^ ^ ^|. | | + - - | - - - - - - - | - - - | + | | | |grid 2 | | | grid 0 | +=======+ | | | | | | | | | | | | | +===========+ | | | | | | problem domain | +=======================================+ \end{verbatim}
the picture below shows the locations of the types of slopes. The coarse grid is shown, and the projection of the fine grid onto the coarse index space (on which slopes are computed). Coarse cells marked ^ and . do not need slopes. Van Leer slopes in both directions are used at coarse cells marked X. Coarse cells marked V and < have one-sided differencing: cells marked V have low-sided differencing in the y-direction (in this example, because the coarse grid doesn't exist on the high side of these cells), and cells marked < have low-sided differencing in the x-direction (because the problem domain doesn't exist on the high side of these cells). There can also be cells that have one-sided differences in both directions.
\begin{verbatim} +-----------------------+===============+ | | coarse grid 1 | | | | | | | +=======================+ - - - - - - - | - + | \ / \ / \ / \ /|\ / \ / \ / \ /| | | V V V V | X X X < | . | | / \ / \ / \ / \|/ \ / \ / \ / \| | | +---------------------------+ | | \ /| | | | | X | | | . | | / \| | | | | | | | | | \ /| | | | | X | | | . | | / \| | | | +-------+---+---------------+-------+ | | | |\ / \ /|\ / \ /| | | | | ^ ^ | X X | X X | ^ ^ | . | | | |/ \ / \|/ \ / \| | | | + - - - | - - - - - - - +-------+ - + | | | | | | | | | | | | | | | | +-----------+ +===============+ | | | | | | | coarse grid 0 | | +=======================+---------------+ \end{verbatim}
Constructor & Destructor Documentation
PiecewiseLinearFillPatch::PiecewiseLinearFillPatch |
( |
|
) |
|
|
|
Default constructor. User must subsequently call define(). |
PiecewiseLinearFillPatch::~PiecewiseLinearFillPatch |
( |
|
) |
|
|
PiecewiseLinearFillPatch::PiecewiseLinearFillPatch |
( |
const DisjointBoxLayout & |
a_fine_domain, |
|
|
const DisjointBoxLayout & |
a_coarse_domain, |
|
|
int |
a_num_comps, |
|
|
const Box & |
a_crse_problem_domain, |
|
|
int |
a_ref_ratio, |
|
|
int |
a_interp_radius |
|
) |
|
|
|
Defining constructor.
{\bf Arguments:}\ a_fine_domain (not modified): domain of fine level. \ a_coarse_domain (not modified): domain of coarse level. \ a_num_comps (not modified): number of components of state vector. \ a_problem_domain (not modified): problem domain on the coarse level. \ a_ref_ratio (not modified): refinement ratio. \ a_interp_radius (not modified): number of layers of fine ghost cells to fill by interpolation. \ |
PiecewiseLinearFillPatch::PiecewiseLinearFillPatch |
( |
const DisjointBoxLayout & |
a_fine_domain, |
|
|
const DisjointBoxLayout & |
a_coarse_domain, |
|
|
int |
a_num_comps, |
|
|
const ProblemDomain & |
a_crse_problem_domain, |
|
|
int |
a_ref_ratio, |
|
|
int |
a_interp_radius |
|
) |
|
|
|
Defining constructor.
{\bf Arguments:}\ a_fine_domain (not modified): domain of fine level. \ a_coarse_domain (not modified): domain of coarse level. \ a_num_comps (not modified): number of components of state vector. \ a_problem_domain (not modified): problem domain on the coarse level. \ a_ref_ratio (not modified): refinement ratio. \ a_interp_radius (not modified): number of layers of fine ghost cells to fill by interpolation. \ |
Member Function Documentation
void PiecewiseLinearFillPatch::computeSlopes |
( |
int |
a_src_comp, |
|
|
int |
a_num_comp |
|
) |
[protected] |
|
|
Defines this object. The user may call define() once and call fillInterp() multiple times with different valid data sets.
{\bf Arguments:}\ a_fine_domain (not modified): domain of fine level. \ a_coarse_domain (not modified): domain of coarse level. \ a_num_comps (not modified): number of components of state vector. \ a_problem_domain (not modified): problem domain on the coarse level. \ a_ref_ratio (not modified): refinement ratio. \ a_interp_radius (not modified): number of layers of fine ghost cells to fill by interpolation. \
{\bf This:}\ ---This object is modified.--- |
void PiecewiseLinearFillPatch::define |
( |
const DisjointBoxLayout & |
a_fine_domain, |
|
|
const DisjointBoxLayout & |
a_coarse_domain, |
|
|
int |
a_num_comps, |
|
|
const Box & |
a_crse_problem_domain, |
|
|
int |
a_ref_ratio, |
|
|
int |
a_interp_radius |
|
) |
|
|
|
Defines this object. The user may call define() once and call fillInterp() multiple times with different valid data sets.
{\bf Arguments:}\ a_fine_domain (not modified): domain of fine level. \ a_coarse_domain (not modified): domain of coarse level. \ a_num_comps (not modified): number of components of state vector. \ a_problem_domain (not modified): problem domain on the coarse level. \ a_ref_ratio (not modified): refinement ratio. \ a_interp_radius (not modified): number of layers of fine ghost cells to fill by interpolation. \
{\bf This:}\ ---This object is modified.--- |
void PiecewiseLinearFillPatch::fillConstantInterp |
( |
LevelData< FArrayBox > & |
a_fine_data, |
|
|
int |
a_src_comp, |
|
|
int |
a_dest_comp, |
|
|
int |
a_num_comp |
|
) |
const [protected] |
|
|
Fills the first m_interp_radius layers of fine ghost cells by interpolation from the coarse level. It is an error to call if not this->isDefined(). The range components to interpolate must be specified. The corresponding components on the coarse and fine levels may be different. It is required that a_fine_data's domain is the same as was specified in the most recent call to define(). It is expected that the coarse and fine level's domains are properly nested.
{\bf Arguments:}\ a_fine_data (modified): fine-level data being interpolated to.\ a_old_coarse_data (not modified): coarse level source data at the old time.\ a_new_coarse_data (not modified): coarse level source data at the new time.\ a_time_interp_coef (not modified): time interpolation coefficient, in the range [0:1]. 0=old time, 1=new time.\ a_src_comp (not modifed): starting coarse data component.\ a_dest_comp (not modifed): starting fine data component.\ a_num_comp (not modified): number of data components to be interpolated.
{\bf This:}\ Well, it's complicated. As far as the user is concerned, this object is not modified. See the design document if you care for details. |
void PiecewiseLinearFillPatch::incrementLinearInterp |
( |
LevelData< FArrayBox > & |
a_fine_data, |
|
|
int |
a_src_comp, |
|
|
int |
a_dest_comp, |
|
|
int |
a_num_comp |
|
) |
const [protected] |
|
bool PiecewiseLinearFillPatch::isDefined |
( |
|
) |
const |
|
|
Returns true if this object was created with the defining constructor or if define() has been called.
{\bf This:}\ This object is not modified. |
void PiecewiseLinearFillPatch::printIntVectSets |
( |
|
) |
const |
|
void PiecewiseLinearFillPatch::timeInterp |
( |
const LevelData< FArrayBox > & |
a_old_coarse_data, |
|
|
const LevelData< FArrayBox > & |
a_new_coarse_data, |
|
|
Real |
a_time_interp_coef, |
|
|
int |
a_src_comp, |
|
|
int |
a_dest_comp, |
|
|
int |
a_num_comp |
|
) |
[protected] |
|
Member Data Documentation
ProblemDomain PiecewiseLinearFillPatch::m_crse_problem_domain [protected]
|
|
int PiecewiseLinearFillPatch::m_interp_radius [protected]
|
|
bool PiecewiseLinearFillPatch::m_is_defined [protected]
|
|
int PiecewiseLinearFillPatch::m_ref_ratio [protected]
|
|
const int PiecewiseLinearFillPatch::s_stencil_radius [static, protected]
|
|
The documentation for this class was generated from the following file:
Generated on Wed Apr 16 14:35:26 2003 for EBChombo by
1.2.16