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

Level Cons Operator - a class for evaluating the Laplacian. More...

#include <LevelConsOperator.H>

Inheritance diagram for LevelConsOperator:
Inheritance graph
[legend]

Public Member Functions

 LevelConsOperator ()
 Default constructor. More...
 
virtual ~LevelConsOperator ()
 Destructor. More...
 
virtual void define (const DisjointBoxLayout &a_thisDisjointBoxLayout, const DisjointBoxLayout &a_coarserDisjointBoxLayout, const ProblemDomain &a_domain, const int &a_refineCoarse, const Real &a_dx, const MOLPhysics *const a_molPhysics, const int &a_numStates, const bool &a_hasCoarser, const bool &a_hasFiner)
 Actual constructor. More...
 
virtual void evalRHS (LevelData< FArrayBox > &a_LofU, LevelData< FArrayBox > &a_U, LevelFluxRegister &a_finerFluxRegister, LevelFluxRegister &a_coarserFluxRegister, const LevelData< FArrayBox > &a_UcoarseOld, const Real &a_timeCoarseOld, const LevelData< FArrayBox > &a_UcoarseNew, const Real &a_timeCoarseNew, Real a_time, Real a_weight)
 Evaluate the operator (div(flux) ) at a given time. More...
 
virtual void evalRHSpatches (LevelData< FArrayBox > &a_LofU, const LevelData< FArrayBox > &a_U, LevelFluxRegister &a_finerFluxRegister, LevelFluxRegister &a_coarserFluxRegister, Real a_weight)
 
virtual void updateODE (LevelData< FArrayBox > &a_soln, const LevelData< FArrayBox > &a_rhs, Real a_dt)
 update solution – soln += dt*rhs (required by LevelRK4) More...
 
virtual void resetFluxes ()
 reset fluxes contained in this object to zero More...
 
LevelData< FluxBox > & getFluxes ()
 returns reference to fluxes computed and accumulated by this operator. More...
 
virtual void defineSolnData (LevelData< FArrayBox > &a_newSoln, const LevelData< FArrayBox > &a_existingSoln)
 define newSoln to match existingSoln, including ghost cells More...
 
virtual void defineRHSData (LevelData< FArrayBox > &a_newRHS, const LevelData< FArrayBox > &a_existingSoln)
 define RHS data based on existingSoln (in this case, w/o ghost cells) More...
 
void copySolnData (LevelData< FArrayBox > &a_dest, const LevelData< FArrayBox > &a_src)
 copy data from src->dest More...
 
void spaceOrder (int a_spaceOrder)
 set spatial order of accuracy More...
 
void limitFaceValues (bool a_limitFaceValues)
 if true, limit face values More...
 
void highOrderLimiter (bool a_highOrderLimiter)
 
void useFlattening (bool a_useFlattening)
 sets whether to flatten extrapolations to faces More...
 
void noPPM (bool a_noPPM)
 sets m_noPPM More...
 
void doDeconvolution (bool a_doDeconvolution)
 sets m_doDeconvolution More...
 
void doFaceDeconvolution (bool a_doFaceDeconvolution)
 sets m_doFaceDeconvolution More...
 
void useArtificialViscosity (bool a_useArtificialViscosity)
 sets whether to use artificial viscosity (from divergence) More...
 
void artificialViscosity (Real a_artificialViscosity)
 sets coefficient of artificial viscosity (from divergence) More...
 
void forwardEuler (bool a_forwardEuler)
 sets whether to use forward Euler instead of RK4 More...
 
void numGhost (int a_numGhost)
 sets m_numGhost, the number of ghost cells More...
 
void evalCountMax (int a_evalCountMax)
 set number of calls that will be made to evalRHS More...
 
void resetEvalCount ()
 reset m_evalCount to 0 More...
 
virtual void addArtificialViscosity (LevelData< FArrayBox > &a_Unew, const LevelData< FArrayBox > &a_Uold, LevelFluxRegister &a_finerFluxRegister, LevelFluxRegister &a_coarserFluxRegister, Real a_oldTime, Real a_weight)
 add artificial viscosity to a_Unew More...
 
virtual void updateFluxTotalsAndRegisters (FluxBox &a_Fface, LevelFluxRegister &a_finerFluxRegister, LevelFluxRegister &a_coarserFluxRegister, const DataIndex &a_dataIndex, Real a_weight)
 update a_finerFluxRegister and a_coarserFluxRegister More...
 
TimeInterpolatorRK4getTimeInterpolator ()
 Return time interpolator object within patch-fill object. More...
 
virtual void fillGhosts (LevelData< FArrayBox > &a_U, const Real &a_time, const Real &a_timeCoarseOld, const Real &a_timeCoarseNew)
 fill in ghost cells of a_U More...
 
virtual void fillGhostsRK4 (LevelData< FArrayBox > &a_U, const Real &a_time, int a_stage, const Real &a_timeCoarseOld, const Real &a_timeCoarseNew)
 fill in ghost cells of a_U to RK4 intermediates More...
 
virtual void exchangeGhosts (LevelData< FArrayBox > &a_U)
 

Protected Member Functions

virtual void defineFlattening ()
 sets m_flattening More...
 
virtual void definePatch (const MOLPhysics *const a_molPhysics)
 sets m_patchConsOperator More...
 
virtual void defineExchanger ()
 sets m_exchangeCopier More...
 
virtual void setPatchIndex (const DataIndex &a_ind) const
 

Protected Attributes

DisjointBoxLayout m_grids
 
PatchConsOperatorm_patchConsOperatorPtr
 
int m_numGhost
 
Copier m_exchangeCopier
 
LevelData< FluxBoxm_fluxes
 
FourthOrderFillPatch m_patcher
 
Real m_dx
 
ProblemDomain m_domain
 
int m_refineCoarse
 
int m_numCons
 
int m_numFluxes
 
bool m_hasCoarser
 
bool m_hasFiner
 
BoxLayoutData< FArrayBoxm_flattening
 
int m_spaceOrder
 
bool m_limitFaceValues
 
bool m_highOrderLimiter
 if true, use high-order limiter More...
 
bool m_useFlattening
 
int m_numFields
 
bool m_noPPM
 
bool m_doDeconvolution
 
bool m_doFaceDeconvolution
 
int m_evalCountMax
 
int m_evalCount
 
bool m_useArtificialViscosity
 
Real m_artificialViscosity
 
bool m_forwardEuler
 
bool m_defined
 

Private Member Functions

void operator= (const LevelConsOperator &a_input)
 
 LevelConsOperator (const LevelConsOperator &a_input)
 

Detailed Description

Level Cons Operator - a class for evaluating the Laplacian.

Constructor & Destructor Documentation

LevelConsOperator::LevelConsOperator ( )

Default constructor.

Object requires define() to be called before all other functions.

virtual LevelConsOperator::~LevelConsOperator ( )
virtual

Destructor.

Destroys all objects created by define(). Passed in data references of define() are left alone.

LevelConsOperator::LevelConsOperator ( const LevelConsOperator a_input)
private

Member Function Documentation

virtual void LevelConsOperator::define ( const DisjointBoxLayout a_thisDisjointBoxLayout,
const DisjointBoxLayout a_coarserDisjointBoxLayout,
const ProblemDomain a_domain,
const int &  a_refineCoarse,
const Real a_dx,
const MOLPhysics *const  a_molPhysics,
const int &  a_numStates,
const bool &  a_hasCoarser,
const bool &  a_hasFiner 
)
virtual

Actual constructor.

Inside the routine, we cast away const-ness on the data members for the assignment. The arguments passed in are maintained const (coding standards). a_refine is the refinement ratio between this level and the next coarser level. For the coarsest level, an empty DisjointBoxLayout is passed in for coarserDisjointBoxLayout.

virtual void LevelConsOperator::evalRHS ( LevelData< FArrayBox > &  a_LofU,
LevelData< FArrayBox > &  a_U,
LevelFluxRegister a_finerFluxRegister,
LevelFluxRegister a_coarserFluxRegister,
const LevelData< FArrayBox > &  a_UcoarseOld,
const Real a_timeCoarseOld,
const LevelData< FArrayBox > &  a_UcoarseNew,
const Real a_timeCoarseNew,
Real  a_time,
Real  a_weight 
)
virtual

Evaluate the operator (div(flux) ) at a given time.

For the coarsest level, UcoarseOld and UcoarseNew are empty LevelData<FArrayBox> objects. Also, either UcoarseOld or UcoarseNew might be empty to indicate that t(nf) = t(nc) the one grid is at the current time and interpolation is not required for boundary condition generation. U must be defined on the same DisjointBoxLayouts as were used in define(). Coarse flux register is flux register with the next coarser level. Fine flux register is the flux register with the next finer level. To the finer level FR, this level is the coarse level. To the coarser level FR, this level is the fine level.

Reimplemented in LevelMappedConsOperator.

virtual void LevelConsOperator::evalRHSpatches ( LevelData< FArrayBox > &  a_LofU,
const LevelData< FArrayBox > &  a_U,
LevelFluxRegister a_finerFluxRegister,
LevelFluxRegister a_coarserFluxRegister,
Real  a_weight 
)
virtual
virtual void LevelConsOperator::updateODE ( LevelData< FArrayBox > &  a_soln,
const LevelData< FArrayBox > &  a_rhs,
Real  a_dt 
)
virtual

update solution – soln += dt*rhs (required by LevelRK4)

virtual void LevelConsOperator::resetFluxes ( )
virtual

reset fluxes contained in this object to zero

LevelData<FluxBox>& LevelConsOperator::getFluxes ( )

returns reference to fluxes computed and accumulated by this operator.

virtual void LevelConsOperator::defineSolnData ( LevelData< FArrayBox > &  a_newSoln,
const LevelData< FArrayBox > &  a_existingSoln 
)
virtual

define newSoln to match existingSoln, including ghost cells

(required by LevelRK4)

virtual void LevelConsOperator::defineRHSData ( LevelData< FArrayBox > &  a_newRHS,
const LevelData< FArrayBox > &  a_existingSoln 
)
virtual

define RHS data based on existingSoln (in this case, w/o ghost cells)

(required by LevelRK4)

void LevelConsOperator::copySolnData ( LevelData< FArrayBox > &  a_dest,
const LevelData< FArrayBox > &  a_src 
)

copy data from src->dest

(required by LevelRK4)

void LevelConsOperator::spaceOrder ( int  a_spaceOrder)

set spatial order of accuracy

void LevelConsOperator::limitFaceValues ( bool  a_limitFaceValues)

if true, limit face values

void LevelConsOperator::highOrderLimiter ( bool  a_highOrderLimiter)
void LevelConsOperator::useFlattening ( bool  a_useFlattening)

sets whether to flatten extrapolations to faces

void LevelConsOperator::noPPM ( bool  a_noPPM)

sets m_noPPM

void LevelConsOperator::doDeconvolution ( bool  a_doDeconvolution)

sets m_doDeconvolution

void LevelConsOperator::doFaceDeconvolution ( bool  a_doFaceDeconvolution)

sets m_doFaceDeconvolution

void LevelConsOperator::useArtificialViscosity ( bool  a_useArtificialViscosity)

sets whether to use artificial viscosity (from divergence)

void LevelConsOperator::artificialViscosity ( Real  a_artificialViscosity)

sets coefficient of artificial viscosity (from divergence)

void LevelConsOperator::forwardEuler ( bool  a_forwardEuler)

sets whether to use forward Euler instead of RK4

void LevelConsOperator::numGhost ( int  a_numGhost)

sets m_numGhost, the number of ghost cells

void LevelConsOperator::evalCountMax ( int  a_evalCountMax)

set number of calls that will be made to evalRHS

void LevelConsOperator::resetEvalCount ( )

reset m_evalCount to 0

virtual void LevelConsOperator::addArtificialViscosity ( LevelData< FArrayBox > &  a_Unew,
const LevelData< FArrayBox > &  a_Uold,
LevelFluxRegister a_finerFluxRegister,
LevelFluxRegister a_coarserFluxRegister,
Real  a_oldTime,
Real  a_weight 
)
virtual

add artificial viscosity to a_Unew

Reimplemented in LevelMappedConsOperator.

virtual void LevelConsOperator::updateFluxTotalsAndRegisters ( FluxBox a_Fface,
LevelFluxRegister a_finerFluxRegister,
LevelFluxRegister a_coarserFluxRegister,
const DataIndex a_dataIndex,
Real  a_weight 
)
virtual

update a_finerFluxRegister and a_coarserFluxRegister

Reimplemented in LevelMappedConsOperator.

TimeInterpolatorRK4& LevelConsOperator::getTimeInterpolator ( )

Return time interpolator object within patch-fill object.

virtual void LevelConsOperator::fillGhosts ( LevelData< FArrayBox > &  a_U,
const Real a_time,
const Real a_timeCoarseOld,
const Real a_timeCoarseNew 
)
virtual

fill in ghost cells of a_U

virtual void LevelConsOperator::fillGhostsRK4 ( LevelData< FArrayBox > &  a_U,
const Real a_time,
int  a_stage,
const Real a_timeCoarseOld,
const Real a_timeCoarseNew 
)
virtual

fill in ghost cells of a_U to RK4 intermediates

virtual void LevelConsOperator::exchangeGhosts ( LevelData< FArrayBox > &  a_U)
virtual
virtual void LevelConsOperator::defineFlattening ( )
protectedvirtual

sets m_flattening

Reimplemented in LevelMappedConsOperator.

virtual void LevelConsOperator::definePatch ( const MOLPhysics *const  a_molPhysics)
protectedvirtual

sets m_patchConsOperator

Reimplemented in LevelMappedConsOperator.

virtual void LevelConsOperator::defineExchanger ( )
protectedvirtual

sets m_exchangeCopier

virtual void LevelConsOperator::setPatchIndex ( const DataIndex a_ind) const
protectedvirtual

Reimplemented in LevelMappedConsOperator.

void LevelConsOperator::operator= ( const LevelConsOperator a_input)
private

Member Data Documentation

DisjointBoxLayout LevelConsOperator::m_grids
protected
PatchConsOperator* LevelConsOperator::m_patchConsOperatorPtr
protected
int LevelConsOperator::m_numGhost
protected
Copier LevelConsOperator::m_exchangeCopier
protected
LevelData<FluxBox> LevelConsOperator::m_fluxes
protected
FourthOrderFillPatch LevelConsOperator::m_patcher
protected
Real LevelConsOperator::m_dx
protected
ProblemDomain LevelConsOperator::m_domain
protected
int LevelConsOperator::m_refineCoarse
protected
int LevelConsOperator::m_numCons
protected
int LevelConsOperator::m_numFluxes
protected
bool LevelConsOperator::m_hasCoarser
protected
bool LevelConsOperator::m_hasFiner
protected
BoxLayoutData<FArrayBox> LevelConsOperator::m_flattening
protected
int LevelConsOperator::m_spaceOrder
protected
bool LevelConsOperator::m_limitFaceValues
protected
bool LevelConsOperator::m_highOrderLimiter
protected

if true, use high-order limiter

bool LevelConsOperator::m_useFlattening
protected
int LevelConsOperator::m_numFields
protected
bool LevelConsOperator::m_noPPM
protected
bool LevelConsOperator::m_doDeconvolution
protected
bool LevelConsOperator::m_doFaceDeconvolution
protected
int LevelConsOperator::m_evalCountMax
protected
int LevelConsOperator::m_evalCount
protected
bool LevelConsOperator::m_useArtificialViscosity
protected
Real LevelConsOperator::m_artificialViscosity
protected
bool LevelConsOperator::m_forwardEuler
protected
bool LevelConsOperator::m_defined
protected

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