Chombo + EB + MF  3.2
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
NonAggregatedEBStencil Class Reference

Very slow, bad version of EB stencil. More...

#include <NonAggregatedEBStencil.H>

Public Member Functions

 ~NonAggregatedEBStencil ()
 
 NonAggregatedEBStencil (const Vector< VolIndex > &a_srcVofs, const BaseIVFAB< VoFStencil > &a_vofstencil, const Box &a_box, const EBISBox &a_ebisbox, const IntVect &a_ghostVectPhi, const IntVect &a_ghostVectLph, int a_varDest=0, bool a_doRelaxOpt=false, int ncomp=1, IntVectSet a_setIrreg=IntVectSet(), bool a_useInputSets=false)
 
 NonAggregatedEBStencil (const Vector< VolIndex > &a_srcVofs, const Vector< VoFStencil > &a_vofStencil, const Box &a_boxLph, const Box &a_boxPhi, const EBISBox &a_ebisBoxLph, const EBISBox &a_ebisBoxPhi, const IntVect &a_ghostVectLph, const IntVect &a_ghostVectPhi, int a_varDest=0, int ncomp=1, IntVectSet a_setIrreg=IntVectSet(), bool a_useInputSets=false)
 
void apply (EBCellFAB &a_lofphi, const EBCellFAB &a_phi, bool incrementOnly=false, int ivar=0) const
 
void apply (EBCellFAB &a_lofphi, const EBCellFAB &a_phi, const BaseIVFAB< Real > &a_alphaWeight, Real a_alpha, Real a_beta, bool incrementOnly=false) const
 
void apply (EBCellFAB &a_lofphi, const EBCellFAB &a_phi, const Real a_lambdaFactor, const Real a_alpha, const BaseIVFAB< Real > &a_alphaWeight, const Real a_beta, const BaseIVFAB< Real > &a_betaWeight, Real a_one, bool incrementOnly=false) const
 
void applyInhomDomBC (EBCellFAB &a_lofphi, const EBCellFAB &a_phi, const Real a_factor) const
 
void relax (EBCellFAB &a_phi, const EBCellFAB &a_rhs, const BaseIVFAB< Real > &a_alphaWeight, const BaseIVFAB< Real > &a_betaWeight, Real a_alpha, Real a_beta, Real a_safety) const
 
void relaxClone (EBCellFAB &a_phi, const EBCellFAB &a_phiOld, const EBCellFAB &a_rhs, const BaseIVFAB< Real > &a_alphaWeight, const BaseIVFAB< Real > &a_betaWeight, Real a_alpha, Real a_beta, Real a_safety) const
 
void cache (const EBCellFAB &a_lphi, int a_ivar=0) const
 
void cachePhi (const EBCellFAB &a_lphi, int a_ivar=0) const
 
void uncache (EBCellFAB &a_lphi, int a_ivar=0) const
 
void uncachePhi (EBCellFAB &a_phi, int a_ivar=0) const
 

Protected Attributes

Vector< VolIndexm_srcVofs
 
Vector< VoFStencilm_vofStencil
 
EBISBox m_ebisBox
 
int m_destVar
 
Vector< Realm_cacheLph
 
Vector< Realm_cachePhi
 
bool m_doRelaxOpt
 
int m_nComp
 
IntVectSet m_setIrreg
 
bool m_useInputSets
 

Private Member Functions

 NonAggregatedEBStencil ()
 
void operator= (const NonAggregatedEBStencil &stenin)
 
 NonAggregatedEBStencil (const NonAggregatedEBStencil &stenin)
 

Detailed Description

Very slow, bad version of EB stencil.

Slow version of the stencil used only to illustrate just how good an idea aggregation is. It also could be useful for debugging if an issue ever comes up with the aggregated version. Under no circumstances should this class be used as anything but as an educational or debugging tool. Using this will absolutely destroy your performance. Really.

Constructor & Destructor Documentation

◆ ~NonAggregatedEBStencil()

NonAggregatedEBStencil::~NonAggregatedEBStencil ( )

Destructor

◆ NonAggregatedEBStencil() [1/4]

NonAggregatedEBStencil::NonAggregatedEBStencil ( const Vector< VolIndex > &  a_srcVofs,
const BaseIVFAB< VoFStencil > &  a_vofstencil,
const Box a_box,
const EBISBox a_ebisbox,
const IntVect a_ghostVectPhi,
const IntVect a_ghostVectLph,
int  a_varDest = 0,
bool  a_doRelaxOpt = false,
int  ncomp = 1,
IntVectSet  a_setIrreg = IntVectSet(),
bool  a_useInputSets = false 
)

Full constructor. Box is unghosted. When setting Lphi(i,j) = L(phi(i,j)) GhostVectPhi is the ghost vect of phi GhostVectLph is the ghost vect of lphi

◆ NonAggregatedEBStencil() [2/4]

NonAggregatedEBStencil::NonAggregatedEBStencil ( const Vector< VolIndex > &  a_srcVofs,
const Vector< VoFStencil > &  a_vofStencil,
const Box a_boxLph,
const Box a_boxPhi,
const EBISBox a_ebisBoxLph,
const EBISBox a_ebisBoxPhi,
const IntVect a_ghostVectLph,
const IntVect a_ghostVectPhi,
int  a_varDest = 0,
int  ncomp = 1,
IntVectSet  a_setIrreg = IntVectSet(),
bool  a_useInputSets = false 
)

Second constructor for creating stencil where dest and src live on 2 different levels and dest is Lphi and src is Phi. no relax optimization here

◆ NonAggregatedEBStencil() [3/4]

NonAggregatedEBStencil::NonAggregatedEBStencil ( )
inlineprivate

References MayDay::Error().

◆ NonAggregatedEBStencil() [4/4]

NonAggregatedEBStencil::NonAggregatedEBStencil ( const NonAggregatedEBStencil stenin)
inlineprivate

References MayDay::Error().

Member Function Documentation

◆ apply() [1/3]

void NonAggregatedEBStencil::apply ( EBCellFAB a_lofphi,
const EBCellFAB a_phi,
bool  incrementOnly = false,
int  ivar = 0 
) const

Applies stencil to each component of phi using the stencil weights and offsets to compute L. If incrementOnly = true, a_lofphi is incremented without any set to zero. If false, a_lofphi is set to zero and set equal to L(phi). ivar is so you can apply a scalar ebstencil to a component of a larger holder

◆ apply() [2/3]

void NonAggregatedEBStencil::apply ( EBCellFAB a_lofphi,
const EBCellFAB a_phi,
const BaseIVFAB< Real > &  a_alphaWeight,
Real  a_alpha,
Real  a_beta,
bool  incrementOnly = false 
) const

Applies stencil to each component of phi using the stencil weights and offsets to compute L. but with constants. a_lofphi_i = alpha*phi_i + beta*lphi_i If incrementOnly = true, a_lofphi is incremented without any set to zero. If false, a_lofphi is set to zero and set equal to a_lofphi_i Alpha and beta are defined over getIrregIVS(lphBox) where lphBox = grow(a_box, a_ghostVectLph) where a_box are given in the constructor.

◆ apply() [3/3]

void NonAggregatedEBStencil::apply ( EBCellFAB a_lofphi,
const EBCellFAB a_phi,
const Real  a_lambdaFactor,
const Real  a_alpha,
const BaseIVFAB< Real > &  a_alphaWeight,
const Real  a_beta,
const BaseIVFAB< Real > &  a_betaWeight,
Real  a_one,
bool  incrementOnly = false 
) const

◆ applyInhomDomBC()

void NonAggregatedEBStencil::applyInhomDomBC ( EBCellFAB a_lofphi,
const EBCellFAB a_phi,
const Real  a_factor 
) const

◆ relax()

void NonAggregatedEBStencil::relax ( EBCellFAB a_phi,
const EBCellFAB a_rhs,
const BaseIVFAB< Real > &  a_alphaWeight,
const BaseIVFAB< Real > &  a_betaWeight,
Real  a_alpha,
Real  a_beta,
Real  a_safety 
) const

◆ relaxClone()

void NonAggregatedEBStencil::relaxClone ( EBCellFAB a_phi,
const EBCellFAB a_phiOld,
const EBCellFAB a_rhs,
const BaseIVFAB< Real > &  a_alphaWeight,
const BaseIVFAB< Real > &  a_betaWeight,
Real  a_alpha,
Real  a_beta,
Real  a_safety 
) const

◆ cache()

void NonAggregatedEBStencil::cache ( const EBCellFAB a_lphi,
int  a_ivar = 0 
) const

Cache lphi. ivar is so you can apply a scalar ebstencil to a component of a larger holder

◆ cachePhi()

void NonAggregatedEBStencil::cachePhi ( const EBCellFAB a_lphi,
int  a_ivar = 0 
) const

Cache phi ivar is so you can apply a scalar ebstencil to a component of a larger holder

◆ uncache()

void NonAggregatedEBStencil::uncache ( EBCellFAB a_lphi,
int  a_ivar = 0 
) const

Uncache lphi ivar is so you can apply a scalar ebstencil to a component of a larger holder

◆ uncachePhi()

void NonAggregatedEBStencil::uncachePhi ( EBCellFAB a_phi,
int  a_ivar = 0 
) const

Uncache phi ivar is so you can apply a scalar ebstencil to a component of a larger holder

◆ operator=()

void NonAggregatedEBStencil::operator= ( const NonAggregatedEBStencil stenin)
inlineprivate

References MayDay::Error().

Member Data Documentation

◆ m_srcVofs

Vector<VolIndex> NonAggregatedEBStencil::m_srcVofs
protected

◆ m_vofStencil

Vector<VoFStencil> NonAggregatedEBStencil::m_vofStencil
protected

◆ m_ebisBox

EBISBox NonAggregatedEBStencil::m_ebisBox
protected

◆ m_destVar

int NonAggregatedEBStencil::m_destVar
protected

◆ m_cacheLph

Vector<Real> NonAggregatedEBStencil::m_cacheLph
mutableprotected

◆ m_cachePhi

Vector<Real> NonAggregatedEBStencil::m_cachePhi
mutableprotected

◆ m_doRelaxOpt

bool NonAggregatedEBStencil::m_doRelaxOpt
protected

◆ m_nComp

int NonAggregatedEBStencil::m_nComp
protected

◆ m_setIrreg

IntVectSet NonAggregatedEBStencil::m_setIrreg
protected

◆ m_useInputSets

bool NonAggregatedEBStencil::m_useInputSets
protected

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