Chombo + EB  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
PiecewiseLinearFillPatchFace Class Reference

Fills ghost cells by linear interpolation in space and time. More...

#include <PiecewiseLinearFillPatchFace.H>

Public Member Functions

 PiecewiseLinearFillPatchFace ()
 
 ~PiecewiseLinearFillPatchFace ()
 
 PiecewiseLinearFillPatchFace (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)
 
 PiecewiseLinearFillPatchFace (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< FluxBox > &a_fine_data, const LevelData< FluxBox > &a_old_coarse_data, const LevelData< FluxBox > &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 Member Functions

void timeInterp (LevelData< FluxBox > &m_coarsened_fine_data, const LevelData< FluxBox > &a_old_coarse_data, const LevelData< FluxBox > &a_new_coarse_data, Real a_time_interp_coef, int a_src_comp, int a_dest_comp, int a_num_comp)
 
void fillConstantInterp (LevelData< FluxBox > &a_fine_data, const LevelData< FluxBox > &m_coarsened_fine_data, int a_src_comp, int a_dest_comp, int a_num_comp) const
 
void computeSlopes (FArrayBox &slope_fab, const FArrayBox &data_fab, const IntVectSet &local_centered_interp, const IntVectSet &local_lo_interp, const IntVectSet &local_hi_interp, int a_dir, int a_src_comp, int a_num_comp) const
 
void incrementLinearInterpTangential (LevelData< FluxBox > &a_fine_data, const LevelData< FluxBox > &m_coarsened_fine_data, int a_dir, int a_src_comp, int a_dest_comp, int a_num_comp) const
 
void incrementLinearInterpNormal (LevelData< FluxBox > &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
 
IntVect m_coarse_slope
 
IntVect m_coarse_ghost
 
DisjointBoxLayout m_coarsened_fine_domain
 
ProblemDomain m_crse_problem_domain
 
LayoutData< IntVectSetm_fine_interp [SpaceDim]
 
LayoutData< IntVectSetm_coarse_centered_interp [SpaceDim][SpaceDim]
 
LayoutData< IntVectSetm_coarse_lo_interp [SpaceDim][SpaceDim]
 
LayoutData< IntVectSetm_coarse_hi_interp [SpaceDim][SpaceDim]
 

Static Protected Attributes

static const int s_stencil_radius
 

Detailed Description

Fills ghost cells by linear interpolation in space and time.

Fills some fine level ghost "faces" 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.

Constructor & Destructor Documentation

◆ PiecewiseLinearFillPatchFace() [1/3]

PiecewiseLinearFillPatchFace::PiecewiseLinearFillPatchFace ( )

Default constructor. User must subsequently call define().

◆ ~PiecewiseLinearFillPatchFace()

PiecewiseLinearFillPatchFace::~PiecewiseLinearFillPatchFace ( )

Destructor.

◆ PiecewiseLinearFillPatchFace() [2/3]

PiecewiseLinearFillPatchFace::PiecewiseLinearFillPatchFace ( 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.

{ 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_crse_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. \

◆ PiecewiseLinearFillPatchFace() [3/3]

PiecewiseLinearFillPatchFace::PiecewiseLinearFillPatchFace ( 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.

{ 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_crse_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

◆ define() [1/2]

void PiecewiseLinearFillPatchFace::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.

{ 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_crse_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. \

{ This:}\ —This object is modified.—

◆ define() [2/2]

void PiecewiseLinearFillPatchFace::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 
)

Defines this object. The user may call define() once and call fillInterp() multiple times with different valid data sets.

{ 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_crse_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. \

{ This:}\ —This object is modified.—

◆ isDefined()

bool PiecewiseLinearFillPatchFace::isDefined ( ) const

Returns true if this object was created with the defining constructor or if define() has been called.

{ This:}\ This object is not modified.

◆ fillInterp()

void PiecewiseLinearFillPatchFace::fillInterp ( LevelData< FluxBox > &  a_fine_data,
const LevelData< FluxBox > &  a_old_coarse_data,
const LevelData< FluxBox > &  a_new_coarse_data,
Real  a_time_interp_coef,
int  a_src_comp,
int  a_dest_comp,
int  a_num_comp 
)

This is an adaptation of the Cell-centered PiecewiseLinearFillPatch class for face-centered data.

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.

{ 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.

{ 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.

◆ printIntVectSets()

void PiecewiseLinearFillPatchFace::printIntVectSets ( ) const

◆ timeInterp()

void PiecewiseLinearFillPatchFace::timeInterp ( LevelData< FluxBox > &  m_coarsened_fine_data,
const LevelData< FluxBox > &  a_old_coarse_data,
const LevelData< FluxBox > &  a_new_coarse_data,
Real  a_time_interp_coef,
int  a_src_comp,
int  a_dest_comp,
int  a_num_comp 
)
protected

◆ fillConstantInterp()

void PiecewiseLinearFillPatchFace::fillConstantInterp ( LevelData< FluxBox > &  a_fine_data,
const LevelData< FluxBox > &  m_coarsened_fine_data,
int  a_src_comp,
int  a_dest_comp,
int  a_num_comp 
) const
protected

◆ computeSlopes()

void PiecewiseLinearFillPatchFace::computeSlopes ( FArrayBox slope_fab,
const FArrayBox data_fab,
const IntVectSet local_centered_interp,
const IntVectSet local_lo_interp,
const IntVectSet local_hi_interp,
int  a_dir,
int  a_src_comp,
int  a_num_comp 
) const
protected

◆ incrementLinearInterpTangential()

void PiecewiseLinearFillPatchFace::incrementLinearInterpTangential ( LevelData< FluxBox > &  a_fine_data,
const LevelData< FluxBox > &  m_coarsened_fine_data,
int  a_dir,
int  a_src_comp,
int  a_dest_comp,
int  a_num_comp 
) const
protected

◆ incrementLinearInterpNormal()

void PiecewiseLinearFillPatchFace::incrementLinearInterpNormal ( LevelData< FluxBox > &  a_fine_data,
int  a_src_comp,
int  a_dest_comp,
int  a_num_comp 
) const
protected

Member Data Documentation

◆ m_is_defined

bool PiecewiseLinearFillPatchFace::m_is_defined
protected

◆ s_stencil_radius

const int PiecewiseLinearFillPatchFace::s_stencil_radius
staticprotected

◆ m_ref_ratio

int PiecewiseLinearFillPatchFace::m_ref_ratio
protected

◆ m_interp_radius

int PiecewiseLinearFillPatchFace::m_interp_radius
protected

◆ m_coarse_slope

IntVect PiecewiseLinearFillPatchFace::m_coarse_slope
protected

◆ m_coarse_ghost

IntVect PiecewiseLinearFillPatchFace::m_coarse_ghost
protected

◆ m_coarsened_fine_domain

DisjointBoxLayout PiecewiseLinearFillPatchFace::m_coarsened_fine_domain
protected

◆ m_crse_problem_domain

ProblemDomain PiecewiseLinearFillPatchFace::m_crse_problem_domain
protected

◆ m_fine_interp

LayoutData<IntVectSet> PiecewiseLinearFillPatchFace::m_fine_interp[SpaceDim]
protected

◆ m_coarse_centered_interp

LayoutData<IntVectSet> PiecewiseLinearFillPatchFace::m_coarse_centered_interp[SpaceDim][SpaceDim]
protected

◆ m_coarse_lo_interp

LayoutData<IntVectSet> PiecewiseLinearFillPatchFace::m_coarse_lo_interp[SpaceDim][SpaceDim]
protected

◆ m_coarse_hi_interp

LayoutData<IntVectSet> PiecewiseLinearFillPatchFace::m_coarse_hi_interp[SpaceDim][SpaceDim]
protected

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