LevelConsOperator Class Reference

#include <LevelConsOperator.H>

Inheritance diagram for LevelConsOperator:

Inheritance graph
[legend]

List of all members.


Detailed Description

Level Cons Operator - a class for evaluating the Laplacian.

Public Member Functions

 LevelConsOperator ()
 Default constructor.
virtual ~LevelConsOperator ()
 Destructor.
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.
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.
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)
virtual void resetFluxes ()
 reset fluxes contained in this object to zero
LevelData< FluxBox > & getFluxes ()
 returns reference to fluxes computed and accumulated by this operator.
virtual void defineSolnData (LevelData< FArrayBox > &a_newSoln, const LevelData< FArrayBox > &a_existingSoln)
 define newSoln to match existingSoln, including ghost cells
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)
void copySolnData (LevelData< FArrayBox > &a_dest, const LevelData< FArrayBox > &a_src)
 copy data from src->dest
void spaceOrder (int a_spaceOrder)
 set spatial order of accuracy
void limitFaceValues (bool a_limitFaceValues)
 if true, limit face values
void highOrderLimiter (bool a_highOrderLimiter)
void useFlattening (bool a_useFlattening)
 sets whether to flatten extrapolations to faces
void noPPM (bool a_noPPM)
 sets m_noPPM
void doDeconvolution (bool a_doDeconvolution)
 sets m_doDeconvolution
void doFaceDeconvolution (bool a_doFaceDeconvolution)
 sets m_doFaceDeconvolution
void useArtificialViscosity (bool a_useArtificialViscosity)
 sets whether to use artificial viscosity (from divergence)
void artificialViscosity (Real a_artificialViscosity)
 sets coefficient of artificial viscosity (from divergence)
void forwardEuler (bool a_forwardEuler)
 sets whether to use forward Euler instead of RK4
void numGhost (int a_numGhost)
 sets m_numGhost, the number of ghost cells
void evalCountMax (int a_evalCountMax)
 set number of calls that will be made to evalRHS
void resetEvalCount ()
 reset m_evalCount to 0
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
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
TimeInterpolatorRK4getTimeInterpolator ()
 Return time interpolator object within patch-fill object.
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
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
virtual void exchangeGhosts (LevelData< FArrayBox > &a_U)

Protected Member Functions

virtual void defineFlattening ()
 sets m_flattening
virtual void definePatch (const MOLPhysics *const a_molPhysics)
 sets m_patchConsOperator
virtual void defineExchanger ()
 sets m_exchangeCopier
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
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)

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.

Reimplemented in LevelMappedConsOperator.

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 (  )  [protected, virtual]

sets m_flattening

Reimplemented in LevelMappedConsOperator.

virtual void LevelConsOperator::definePatch ( const MOLPhysics *const   a_molPhysics  )  [protected, virtual]

sets m_patchConsOperator

Reimplemented in LevelMappedConsOperator.

virtual void LevelConsOperator::defineExchanger (  )  [protected, virtual]

sets m_exchangeCopier

virtual void LevelConsOperator::setPatchIndex ( const DataIndex a_ind  )  const [protected, virtual]

Reimplemented in LevelMappedConsOperator.

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


Member Data Documentation

if true, use high-order limiter

bool LevelConsOperator::m_noPPM [protected]

bool LevelConsOperator::m_defined [protected]


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

Generated on Sun Apr 30 03:27:13 2017 for Chombo + EB + MF by  doxygen 1.5.5