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

class to encapsulate CF info for quadratic interpolation More...

#include <QuadCFStencil.H>

Public Member Functions

Real computeSecondDerivative (const BaseFab< Real > &a_phic, int a_derivdir, int a_ivar, const IntVect &a_ivin, Real a_dx) const
 { Derivative functions} More...
 
Real computeFirstDerivative (const BaseFab< Real > &a_phic, int a_derivdir, int a_ivar, const IntVect &a_ivin, Real a_dx) const
 
Real computeMixedDerivative (const BaseFab< Real > &a_phic, int a_ivar, const IntVect &a_ivin, Real a_dx) const
 
 QuadCFStencil ()
 
 ~QuadCFStencil ()
 
 QuadCFStencil (const Box &a_fine_domain, const Box &a_grid, const DisjointBoxLayout &a_fineBoxes, const DisjointBoxLayout &a_coarBoxes, int a_refRatio, int a_direction, Side::LoHiSide a_hiorlo)
 
 QuadCFStencil (const ProblemDomain &a_fine_domain, const Box &a_grid, const DisjointBoxLayout &a_fineBoxes, const DisjointBoxLayout &a_coarBoxes, int a_refRatio, int a_direction, Side::LoHiSide a_hiorlo)
 
void define (const Box &a_fine_domain, const Box &a_grid, const DisjointBoxLayout &a_fineBoxes, const DisjointBoxLayout &a_coarBoxes, int a_refRatio, int a_direction, Side::LoHiSide a_hiorlo)
 
void define (const ProblemDomain &a_fine_domain, const Box &a_grid, const DisjointBoxLayout &a_fineBoxes, const DisjointBoxLayout &a_coarBoxes, int a_refRatio, int a_direction, Side::LoHiSide a_hiorlo)
 
void define (const ProblemDomain &a_fine_domain, const Box &a_grid, const Vector< Box > &a_periodicBoxes, const Vector< Box > &a_coarsenedPeriodicBoxes, const DisjointBoxLayout &a_coarBoxes, int a_refRatio, int a_direction, Side::LoHiSide a_hiorlo)
 faster constructor that requires the use of CFStencil::buildPeriodicVector More...
 
bool isDefined () const
 { Access functions} More...
 
bool isEmpty () const
 
const IntVectSetgetFineIVS () const
 
const IntVectSetgetCoarIVS () const
 
bool finePacked () const
 
const BoxpackedBox () const
 

Protected Attributes

bool m_isDefined
 
int m_direction
 
IntVectSet m_ivsStandard
 
IntVectSet m_ivsQuadd
 
BaseFab< DerivStencilm_mixedSten
 
BaseFab< DerivStencilm_second [SpaceDim]
 
BaseFab< DerivStencilm_firstD [SpaceDim]
 
BaseFab< bool > m_dropOrd
 
CFStencil m_baseCFS
 

Private Member Functions

void setDefaultValues ()
 
void addFabToSten (const BaseFab< Real > &fabin_a, DerivStencil &sten_a)
 
void operator= (const QuadCFStencil &cfs_in)
 
 QuadCFStencil (const QuadCFStencil &cfs_in)
 
void buildStencils (const IntVectSet &ivsAllGood)
 

Detailed Description

class to encapsulate CF info for quadratic interpolation

QuadCFStencil is a wrapper around a bunch of things that allow LevelOp to do coarse-fine interpolation on a particular face of a grid.

Constructor & Destructor Documentation

◆ QuadCFStencil() [1/4]

QuadCFStencil::QuadCFStencil ( )

◆ ~QuadCFStencil()

QuadCFStencil::~QuadCFStencil ( )

◆ QuadCFStencil() [2/4]

QuadCFStencil::QuadCFStencil ( const Box a_fine_domain,
const Box a_grid,
const DisjointBoxLayout a_fineBoxes,
const DisjointBoxLayout a_coarBoxes,
int  a_refRatio,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

◆ QuadCFStencil() [3/4]

QuadCFStencil::QuadCFStencil ( const ProblemDomain a_fine_domain,
const Box a_grid,
const DisjointBoxLayout a_fineBoxes,
const DisjointBoxLayout a_coarBoxes,
int  a_refRatio,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

◆ QuadCFStencil() [4/4]

QuadCFStencil::QuadCFStencil ( const QuadCFStencil cfs_in)
inlineprivate

References buildStencils().

Member Function Documentation

◆ computeSecondDerivative()

Real QuadCFStencil::computeSecondDerivative ( const BaseFab< Real > &  a_phic,
int  a_derivdir,
int  a_ivar,
const IntVect a_ivin,
Real  a_dx 
) const

{ Derivative functions}

compute second derivative in devdir_a direction at coarse point a_ivin Uses centered finite diff approximation if ivs_standard_m.contains(a_ivin ). Otherwise, it uses the stencil from second_m Asserts that a_derivdir != direction of face

◆ computeFirstDerivative()

Real QuadCFStencil::computeFirstDerivative ( const BaseFab< Real > &  a_phic,
int  a_derivdir,
int  a_ivar,
const IntVect a_ivin,
Real  a_dx 
) const

compute first derivative in devdir_a direction at coarse point a_ivin Uses centered finite diff approximation if ivs_standard_m.contains(a_ivin ). Otherwise, it uses the stencil from firstd_m Asserts that a_derivdir != direction of face

◆ computeMixedDerivative()

Real QuadCFStencil::computeMixedDerivative ( const BaseFab< Real > &  a_phic,
int  a_ivar,
const IntVect a_ivin,
Real  a_dx 
) const

compute mixed derivative (direction is unambiguous. x and y are the two directions tangential to face) at coarse point a_ivin. \ In two dimensions, always returns 0. \ Uses centered finite diff approximation if ivs_standard_m.contains(a_ivin ). It uses the stencil from mixed_sten_m.\ Returns 0 if SpaceDim != 3

◆ define() [1/3]

void QuadCFStencil::define ( const Box a_fine_domain,
const Box a_grid,
const DisjointBoxLayout a_fineBoxes,
const DisjointBoxLayout a_coarBoxes,
int  a_refRatio,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

◆ define() [2/3]

void QuadCFStencil::define ( const ProblemDomain a_fine_domain,
const Box a_grid,
const DisjointBoxLayout a_fineBoxes,
const DisjointBoxLayout a_coarBoxes,
int  a_refRatio,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

◆ define() [3/3]

void QuadCFStencil::define ( const ProblemDomain a_fine_domain,
const Box a_grid,
const Vector< Box > &  a_periodicBoxes,
const Vector< Box > &  a_coarsenedPeriodicBoxes,
const DisjointBoxLayout a_coarBoxes,
int  a_refRatio,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

faster constructor that requires the use of CFStencil::buildPeriodicVector

◆ isDefined()

bool QuadCFStencil::isDefined ( ) const

{ Access functions}

has full define function been called? return true if so

◆ isEmpty()

bool QuadCFStencil::isEmpty ( ) const
inline

are there any interpolation points? \ returns false if so.

References CH_assert, CFStencil::isDefined(), CFStencil::isEmpty(), and m_baseCFS.

◆ getFineIVS()

const IntVectSet& QuadCFStencil::getFineIVS ( ) const
inline

get fine intvects which need to be interpolated \ This will be empty if isEmpty() returns true

References CH_assert, CFStencil::getFineIVS(), CFStencil::isDefined(), and m_baseCFS.

◆ getCoarIVS()

const IntVectSet& QuadCFStencil::getCoarIVS ( ) const
inline

get coarse intvects that underly fiinterpivs. This will be empty if isEmpty() returns true

References CH_assert, CFStencil::getCoarIVS(), CFStencil::isDefined(), and m_baseCFS.

◆ finePacked()

bool QuadCFStencil::finePacked ( ) const
inline

References CFStencil::isPacked(), and m_baseCFS.

◆ packedBox()

const Box& QuadCFStencil::packedBox ( ) const
inline

◆ setDefaultValues()

void QuadCFStencil::setDefaultValues ( )
private

◆ addFabToSten()

void QuadCFStencil::addFabToSten ( const BaseFab< Real > &  fabin_a,
DerivStencil sten_a 
)
private

◆ operator=()

void QuadCFStencil::operator= ( const QuadCFStencil cfs_in)
inlineprivate

◆ buildStencils()

void QuadCFStencil::buildStencils ( const IntVectSet ivsAllGood)
private

Referenced by QuadCFStencil().

Member Data Documentation

◆ m_isDefined

bool QuadCFStencil::m_isDefined
protected

◆ m_direction

int QuadCFStencil::m_direction
protected

◆ m_ivsStandard

IntVectSet QuadCFStencil::m_ivsStandard
protected

set of all points which have ALL their derivatives taken normally. This means that no stencil either leaves the domain or intersects the next finer level.

◆ m_ivsQuadd

IntVectSet QuadCFStencil::m_ivsQuadd
protected

set of all points which have at least one derivative shifted

◆ m_mixedSten

BaseFab<DerivStencil> QuadCFStencil::m_mixedSten
protected

Derivative stencils. Only defined at intvects where there is at least one non-standard derivative to take (ie. at all points of ivs_Quadd) stencil information for mixed derivatives undefined if SpaceDim != 3

◆ m_second

BaseFab<DerivStencil> QuadCFStencil::m_second[SpaceDim]
protected

stencil information for unmixed derivatives (second derivatives)

◆ m_firstD

BaseFab<DerivStencil> QuadCFStencil::m_firstD[SpaceDim]
protected

stencil information for unmixed derivatives (first derivatives)

◆ m_dropOrd

BaseFab<bool> QuadCFStencil::m_dropOrd
protected

whether to drop order at any one-sided point

◆ m_baseCFS

CFStencil QuadCFStencil::m_baseCFS
protected

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