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

#include <LevelMappedConsOperator.H>

Inheritance diagram for LevelMappedConsOperator:
Inheritance graph
[legend]

Public Member Functions

 LevelMappedConsOperator ()
 Default constructor. More...
 
 LevelMappedConsOperator (PatchMappedConsOperator *a_operator)
 Constructs a Level operator with the given PatchMappedConsOperator instance. More...
 
virtual ~LevelMappedConsOperator ()
 Destructor. More...
 
virtual void define (LevelGridMetrics *const a_levelGridMetricsPtr, LevelData< FArrayBox > *const a_UPtr, const Copier *const a_UExchangeCopierPtr, const Copier *const a_JUExchangeCopierPtr, const DisjointBoxLayout *a_coarserGrids, const ProblemDomain &a_domain, const int a_numGhost, const int a_numInterpolatorCrFnGhost, const int a_refineCoarse, const Real a_dx, const MOLPhysics *const a_molPhysics, const int a_numStates, const bool a_hasCoarser)
 Define the object so that time stepping can begin (actual constructor) More...
 
void defineMetricsIndices (const NewFourthOrderCoordSys *const a_coordSysPtr)
 Define indices in to the metrics matrix. More...
 
void defineUnitNormals (LevelData< FluxBox > &a_NLev)
 Find unit normals for applying the Riemann problem on mapped grids. More...
 
virtual void evalRHS (LevelData< FArrayBox > &a_LofU, LevelData< FArrayBox > &a_JU, LevelFluxRegister &a_finerFluxRegister, LevelFluxRegister &a_coarserFluxRegister, const LevelData< FArrayBox > &a_JUcoarseOld, const Real &a_timeCoarseOld, const LevelData< FArrayBox > &a_JUcoarseNew, const Real &a_timeCoarseNew, Real a_time, Real a_fluxweight)
 Evaluate the operator $(-div(F))$ at a given time. More...
 
void useSourceTerm (bool a_useSourceTerm)
 sets whether to use source term 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 fillGhostsRK4AndComputeU (LevelData< FArrayBox > &a_JU, 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...
 
void setSourceTerm (LevelSourceTerm *a_sourceTermPtr)
 set source term object More...
 
void useArtificialDissipation (bool a_useArtificialDissipation)
 sets whether to use artificial dissipation More...
 
void artificialDissipation (Real a_artificialDissipation)
 sets coefficient of artificial dissipation More...
 
- Public Member Functions inherited from LevelConsOperator
 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 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...
 
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_patchMappedConsOperator More...
 
virtual void setPatchIndex (const DataIndex &a_ind) const
 
void defineMultiblockMbrs ()
 Define members required for multiblock grids. More...
 
void setCommonFlux (LevelData< FluxBox > &a_flux, const BlockRegister &a_blockRegister) const
 Sets single-valued fluxes at block boundaries. More...
 
virtual Real getMaxSpeed ()
 return maximum speed from m_UPtr More...
 
- Protected Member Functions inherited from LevelConsOperator
virtual void defineExchanger ()
 sets m_exchangeCopier More...
 

Protected Attributes

LevelGridMetricsm_levelGridMetricsPtr
 
LevelData< FArrayBox > * m_UPtr
 
LayoutData< FluxBoxm_unitNormalLay
 
const Copierm_UExchangeCopierPtr
 
const Copierm_JUExchangeCopierPtr
 
PatchMappedConsOperatorm_patchMappedConsOperatorPtr
 
TimeInterpolatorRK4 m_timeInterpolator
 
Tuple< IntVect, SpaceDimm_metricTermComponents
 
Interval m_velocityIntv
 
Interval m_vectorFluxIntv
 
BoxLayout m_grow1inDomainLayout
 
bool m_useSourceTerm
 
LevelSourceTermm_sourceTermPtr
 
bool m_useArtificialDissipation
 
Real m_artificialDissipation
 
Tuple< LayoutData< IntVectSet >, 2 *SpaceDimm_facesToFill
 
- Protected Attributes inherited from LevelConsOperator
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 LevelMappedConsOperator &)
 
 LevelMappedConsOperator (const LevelMappedConsOperator &)
 

Detailed Description

This class defines a flux divergence operator for hyperbolic conservation laws on a single refinement level of a set of structured grids.

Constructor & Destructor Documentation

◆ LevelMappedConsOperator() [1/3]

LevelMappedConsOperator::LevelMappedConsOperator ( )

Default constructor.

◆ LevelMappedConsOperator() [2/3]

LevelMappedConsOperator::LevelMappedConsOperator ( PatchMappedConsOperator a_operator)
explicit

Constructs a Level operator with the given PatchMappedConsOperator instance.

◆ ~LevelMappedConsOperator()

virtual LevelMappedConsOperator::~LevelMappedConsOperator ( )
virtual

Destructor.

◆ LevelMappedConsOperator() [3/3]

LevelMappedConsOperator::LevelMappedConsOperator ( const LevelMappedConsOperator )
private

Member Function Documentation

◆ define()

virtual void LevelMappedConsOperator::define ( LevelGridMetrics *const  a_levelGridMetricsPtr,
LevelData< FArrayBox > *const  a_UPtr,
const Copier *const  a_UExchangeCopierPtr,
const Copier *const  a_JUExchangeCopierPtr,
const DisjointBoxLayout a_coarserGrids,
const ProblemDomain a_domain,
const int  a_numGhost,
const int  a_numInterpolatorCrFnGhost,
const int  a_refineCoarse,
const Real  a_dx,
const MOLPhysics *const  a_molPhysics,
const int  a_numStates,
const bool  a_hasCoarser 
)
virtual

Define the object so that time stepping can begin (actual constructor)

◆ defineMetricsIndices()

void LevelMappedConsOperator::defineMetricsIndices ( const NewFourthOrderCoordSys *const  a_coordSysPtr)

Define indices in to the metrics matrix.

◆ defineUnitNormals()

void LevelMappedConsOperator::defineUnitNormals ( LevelData< FluxBox > &  a_NLev)

Find unit normals for applying the Riemann problem on mapped grids.

◆ evalRHS()

virtual void LevelMappedConsOperator::evalRHS ( LevelData< FArrayBox > &  a_LofU,
LevelData< FArrayBox > &  a_JU,
LevelFluxRegister a_finerFluxRegister,
LevelFluxRegister a_coarserFluxRegister,
const LevelData< FArrayBox > &  a_JUcoarseOld,
const Real a_timeCoarseOld,
const LevelData< FArrayBox > &  a_JUcoarseNew,
const Real a_timeCoarseNew,
Real  a_time,
Real  a_fluxweight 
)
virtual

Evaluate the operator $(-div(F))$ at a given time.

Reimplemented from LevelConsOperator.

◆ useSourceTerm()

void LevelMappedConsOperator::useSourceTerm ( bool  a_useSourceTerm)

sets whether to use source term

◆ addArtificialViscosity()

virtual void LevelMappedConsOperator::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 from LevelConsOperator.

◆ updateFluxTotalsAndRegisters()

virtual void LevelMappedConsOperator::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 from LevelConsOperator.

◆ getTimeInterpolator()

TimeInterpolatorRK4& LevelMappedConsOperator::getTimeInterpolator ( )

Return time interpolator object within patch-fill object.

◆ fillGhostsRK4AndComputeU()

virtual void LevelMappedConsOperator::fillGhostsRK4AndComputeU ( LevelData< FArrayBox > &  a_JU,
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

◆ setSourceTerm()

void LevelMappedConsOperator::setSourceTerm ( LevelSourceTerm a_sourceTermPtr)

set source term object

◆ useArtificialDissipation()

void LevelMappedConsOperator::useArtificialDissipation ( bool  a_useArtificialDissipation)

sets whether to use artificial dissipation

◆ artificialDissipation()

void LevelMappedConsOperator::artificialDissipation ( Real  a_artificialDissipation)

sets coefficient of artificial dissipation

◆ defineFlattening()

virtual void LevelMappedConsOperator::defineFlattening ( )
protectedvirtual

sets m_flattening

Reimplemented from LevelConsOperator.

◆ definePatch()

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

sets m_patchMappedConsOperator

Reimplemented from LevelConsOperator.

◆ setPatchIndex()

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

Reimplemented from LevelConsOperator.

◆ defineMultiblockMbrs()

void LevelMappedConsOperator::defineMultiblockMbrs ( )
protected

Define members required for multiblock grids.

◆ setCommonFlux()

void LevelMappedConsOperator::setCommonFlux ( LevelData< FluxBox > &  a_flux,
const BlockRegister a_blockRegister 
) const
protected

Sets single-valued fluxes at block boundaries.

◆ getMaxSpeed()

virtual Real LevelMappedConsOperator::getMaxSpeed ( )
protectedvirtual

return maximum speed from m_UPtr

◆ operator=()

void LevelMappedConsOperator::operator= ( const LevelMappedConsOperator )
private

Member Data Documentation

◆ m_levelGridMetricsPtr

LevelGridMetrics* LevelMappedConsOperator::m_levelGridMetricsPtr
protected

◆ m_UPtr

LevelData<FArrayBox>* LevelMappedConsOperator::m_UPtr
protected

◆ m_unitNormalLay

LayoutData<FluxBox> LevelMappedConsOperator::m_unitNormalLay
protected

◆ m_UExchangeCopierPtr

const Copier* LevelMappedConsOperator::m_UExchangeCopierPtr
protected

◆ m_JUExchangeCopierPtr

const Copier* LevelMappedConsOperator::m_JUExchangeCopierPtr
protected

◆ m_patchMappedConsOperatorPtr

PatchMappedConsOperator* LevelMappedConsOperator::m_patchMappedConsOperatorPtr
protected

◆ m_timeInterpolator

TimeInterpolatorRK4 LevelMappedConsOperator::m_timeInterpolator
protected

◆ m_metricTermComponents

Tuple<IntVect, SpaceDim> LevelMappedConsOperator::m_metricTermComponents
protected

◆ m_velocityIntv

Interval LevelMappedConsOperator::m_velocityIntv
protected

◆ m_vectorFluxIntv

Interval LevelMappedConsOperator::m_vectorFluxIntv
protected

◆ m_grow1inDomainLayout

BoxLayout LevelMappedConsOperator::m_grow1inDomainLayout
protected

◆ m_useSourceTerm

bool LevelMappedConsOperator::m_useSourceTerm
protected

◆ m_sourceTermPtr

LevelSourceTerm* LevelMappedConsOperator::m_sourceTermPtr
protected

◆ m_useArtificialDissipation

bool LevelMappedConsOperator::m_useArtificialDissipation
protected

◆ m_artificialDissipation

Real LevelMappedConsOperator::m_artificialDissipation
protected

◆ m_facesToFill

Tuple< LayoutData<IntVectSet>, 2*SpaceDim> LevelMappedConsOperator::m_facesToFill
protected

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