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() [1/2]

LevelConsOperator::LevelConsOperator ( )

Default constructor.

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

◆ ~LevelConsOperator()

virtual LevelConsOperator::~LevelConsOperator ( )
virtual

Destructor.

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

◆ LevelConsOperator() [2/2]

LevelConsOperator::LevelConsOperator ( const LevelConsOperator a_input)
private

Member Function Documentation

◆ define()

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.

◆ evalRHS()

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.

◆ evalRHSpatches()

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

◆ updateODE()

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)

◆ resetFluxes()

virtual void LevelConsOperator::resetFluxes ( )
virtual

reset fluxes contained in this object to zero

◆ getFluxes()

LevelData<FluxBox>& LevelConsOperator::getFluxes ( )

returns reference to fluxes computed and accumulated by this operator.

◆ defineSolnData()

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)

◆ defineRHSData()

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)

◆ copySolnData()

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

copy data from src->dest

(required by LevelRK4)

◆ spaceOrder()

void LevelConsOperator::spaceOrder ( int  a_spaceOrder)

set spatial order of accuracy

◆ limitFaceValues()

void LevelConsOperator::limitFaceValues ( bool  a_limitFaceValues)

if true, limit face values

◆ highOrderLimiter()

void LevelConsOperator::highOrderLimiter ( bool  a_highOrderLimiter)

◆ useFlattening()

void LevelConsOperator::useFlattening ( bool  a_useFlattening)

sets whether to flatten extrapolations to faces

◆ noPPM()

void LevelConsOperator::noPPM ( bool  a_noPPM)

sets m_noPPM

◆ doDeconvolution()

void LevelConsOperator::doDeconvolution ( bool  a_doDeconvolution)

sets m_doDeconvolution

◆ doFaceDeconvolution()

void LevelConsOperator::doFaceDeconvolution ( bool  a_doFaceDeconvolution)

sets m_doFaceDeconvolution

◆ useArtificialViscosity()

void LevelConsOperator::useArtificialViscosity ( bool  a_useArtificialViscosity)

sets whether to use artificial viscosity (from divergence)

◆ artificialViscosity()

void LevelConsOperator::artificialViscosity ( Real  a_artificialViscosity)

sets coefficient of artificial viscosity (from divergence)

◆ forwardEuler()

void LevelConsOperator::forwardEuler ( bool  a_forwardEuler)

sets whether to use forward Euler instead of RK4

◆ numGhost()

void LevelConsOperator::numGhost ( int  a_numGhost)

sets m_numGhost, the number of ghost cells

◆ evalCountMax()

void LevelConsOperator::evalCountMax ( int  a_evalCountMax)

set number of calls that will be made to evalRHS

◆ resetEvalCount()

void LevelConsOperator::resetEvalCount ( )

reset m_evalCount to 0

◆ addArtificialViscosity()

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.

◆ updateFluxTotalsAndRegisters()

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.

◆ getTimeInterpolator()

TimeInterpolatorRK4& LevelConsOperator::getTimeInterpolator ( )

Return time interpolator object within patch-fill object.

◆ fillGhosts()

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

◆ fillGhostsRK4()

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

◆ exchangeGhosts()

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

◆ defineFlattening()

virtual void LevelConsOperator::defineFlattening ( )
protectedvirtual

sets m_flattening

Reimplemented in LevelMappedConsOperator.

◆ definePatch()

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

sets m_patchConsOperator

Reimplemented in LevelMappedConsOperator.

◆ defineExchanger()

virtual void LevelConsOperator::defineExchanger ( )
protectedvirtual

sets m_exchangeCopier

◆ setPatchIndex()

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

Reimplemented in LevelMappedConsOperator.

◆ operator=()

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

Member Data Documentation

◆ m_grids

DisjointBoxLayout LevelConsOperator::m_grids
protected

◆ m_patchConsOperatorPtr

PatchConsOperator* LevelConsOperator::m_patchConsOperatorPtr
protected

◆ m_numGhost

int LevelConsOperator::m_numGhost
protected

◆ m_exchangeCopier

Copier LevelConsOperator::m_exchangeCopier
protected

◆ m_fluxes

LevelData<FluxBox> LevelConsOperator::m_fluxes
protected

◆ m_patcher

FourthOrderFillPatch LevelConsOperator::m_patcher
protected

◆ m_dx

Real LevelConsOperator::m_dx
protected

◆ m_domain

ProblemDomain LevelConsOperator::m_domain
protected

◆ m_refineCoarse

int LevelConsOperator::m_refineCoarse
protected

◆ m_numCons

int LevelConsOperator::m_numCons
protected

◆ m_numFluxes

int LevelConsOperator::m_numFluxes
protected

◆ m_hasCoarser

bool LevelConsOperator::m_hasCoarser
protected

◆ m_hasFiner

bool LevelConsOperator::m_hasFiner
protected

◆ m_flattening

BoxLayoutData<FArrayBox> LevelConsOperator::m_flattening
protected

◆ m_spaceOrder

int LevelConsOperator::m_spaceOrder
protected

◆ m_limitFaceValues

bool LevelConsOperator::m_limitFaceValues
protected

◆ m_highOrderLimiter

bool LevelConsOperator::m_highOrderLimiter
protected

if true, use high-order limiter

◆ m_useFlattening

bool LevelConsOperator::m_useFlattening
protected

◆ m_numFields

int LevelConsOperator::m_numFields
protected

◆ m_noPPM

bool LevelConsOperator::m_noPPM
protected

◆ m_doDeconvolution

bool LevelConsOperator::m_doDeconvolution
protected

◆ m_doFaceDeconvolution

bool LevelConsOperator::m_doFaceDeconvolution
protected

◆ m_evalCountMax

int LevelConsOperator::m_evalCountMax
protected

◆ m_evalCount

int LevelConsOperator::m_evalCount
protected

◆ m_useArtificialViscosity

bool LevelConsOperator::m_useArtificialViscosity
protected

◆ m_artificialViscosity

Real LevelConsOperator::m_artificialViscosity
protected

◆ m_forwardEuler

bool LevelConsOperator::m_forwardEuler
protected

◆ m_defined

bool LevelConsOperator::m_defined
protected

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