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

#include <PatchMappedConsOperator.H>

Inheritance diagram for PatchMappedConsOperator:
Inheritance graph
[legend]

Public Member Functions

 PatchMappedConsOperator (const int a_numFluxesPerField=1)
 Constructor. More...
 
virtual ~PatchMappedConsOperator ()
 Destructor. More...
 
virtual void define (const ProblemDomain &a_domain, const Real &a_dx, LevelGridMetrics *a_levelGridMetrics, const MOLPhysics *const a_molPhysics, const int &a_numStates)
 Actual constructor. More...
 
virtual void setCurrentTime (const Real &a_currentTime)
 Set the current time before calling evalRHS or addArtificialViscosity. More...
 
virtual void setCurrentBox (const DataIndex &a_currentDataIdx, const Box &a_currentBox)
 Set the current data index and box before calling. More...
 
virtual void evalFlux (const FArrayBox &a_UavgFab, FluxBox &a_FfaceAvg, FluxBox &a_FfromWfaceAvg, Real a_weight, bool a_setFlattening, FArrayBox &a_flatteningFab)
 Evaluate the flux at a given time. More...
 
virtual void evalRHS (FArrayBox &a_LofU, const FluxBox &a_FfaceAvg)
 Evaluate the operator (div(flux)) at a given time. More...
 
virtual void getFaceAvg (FluxBox &a_faceW, const FArrayBox &a_cellW, const FArrayBox &a_WofUavg, FArrayBox &a_flatteningFab, bool a_setFlattening)
 finds face-centered W and limits it using Colella&Sekora limiter; also solves Riemann problem More...
 
void unitNormals (const LayoutData< FluxBox > *const a_unitNormalLayPtr)
 sets m_unitNormalLayPtr More...
 
void setMaxSpeed (Real a_maxSpeed)
 sets m_maxSpeed More...
 
void useArtificialDissipation (bool a_useArtificialDissipation)
 sets whether to use artificial dissipation More...
 
void artificialDissipation (Real a_artificialDissipation)
 sets coefficient of artificial dissipation More...
 
virtual void addArtificialViscosity (FArrayBox &a_UnewFab, const FArrayBox &a_UoldFab, FluxBox &a_flux, Real a_weight)
 add artificial viscosity to a_Unew More...
 
void addMappedArtificialViscosity (FArrayBox &a_JUnewFab, const FArrayBox &a_UoldFab, FluxBox &a_flux, const FluxBox &a_N, const FArrayBox &a_J, const Box &a_box, Real a_weight)
 Add artificial viscosity to a_JUnew for mapped grids. More...
 
virtual Real getMaxWaveSpeed (const FArrayBox &a_U, const Box &a_bx)
 
- Public Member Functions inherited from PatchConsOperator
 PatchConsOperator ()
 Default constructor. More...
 
virtual ~PatchConsOperator ()
 Destructor. More...
 
virtual void define (const ProblemDomain &a_domain, const Real &a_dx, const MOLPhysics *const a_molPhysics, const int &a_numStates)
 Actual constructor. More...
 
virtual void setCurrentBox (const Box &a_currentBox)
 Set the current box before calling evalRHS or addArtificialViscosity. More...
 
virtual void getNormalFlux (FluxBox &a_FfaceAvg, const FArrayBox &a_UavgFab, Real a_weight, bool a_setFlattening, FArrayBox &a_flatteningFab)
 Evaluate the normal flux. More...
 
virtual void updateODE (FArrayBox &a_solnFab, const FArrayBox &a_rhsFab, Real a_dt)
 update solution – soln += dt*rhs (required by LevelRK4) 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 numGhost (int a_numGhost)
 sets m_numGhost, the number of ghost cells More...
 
virtual void getFluxDivergence (FArrayBox &a_LofU, const FluxBox &a_FfaceAvg)
 
virtual bool isDefined () const
 Is the object completely defined. More...
 

Protected Member Functions

virtual void preRiemann (FArrayBox &a_WLeft, FArrayBox &a_WRight, int a_dir, const Box &a_box)
 may be used in derived classes just before calling Riemann solver in direction a_dir More...
 
virtual void postRiemann (FArrayBox &a_Wface, int a_dir, const Box &a_box)
 may be used in derived classes just after calling Riemann solver in direction a_dir More...
 
virtual void forwardBasisTransform (FArrayBox &a_W, const int a_dir, const Box &a_box)
 
virtual void reverseBasisTransform (FArrayBox &a_W, const int a_dir, const Box &a_box)
 
virtual void getAllFluxes (FluxBox &a_FfaceAvg, FluxBox &a_FfaceCen, const FluxBox &a_WfaceAvg, const FluxBox &a_WfaceCen)
 
virtual void fluxCorrection (FluxBox &a_fluxAvg, const FArrayBox &a_UavgFab)
 
- Protected Member Functions inherited from PatchConsOperator
virtual void reduceFlux (FluxBox &a_FfaceAvg, FluxBox &a_FfaceForGrad)
 

Protected Attributes

ProblemDomain m_blockDomain
 
const MultiBlockCoordSysm_coordSys
 
MOLMappedPhysicsm_molMappedPhysics
 
LevelGridMetricsm_levelGridMetrics
 
const LayoutData< FluxBox > * m_unitNormalLayPtr
 
bool m_useArtificialDissipation
 
Real m_artificialDissipation
 
Real m_maxSpeed
 
bool m_isMaxSpeedSet
 
DataIndex m_currentDataIdx
 
- Protected Attributes inherited from PatchConsOperator
bool m_isDefined
 
Real m_dx
 
ProblemDomain m_domain
 
MOLPhysicsm_molPhysics
 
MOLUtilities m_util
 
int m_spaceOrder
 
bool m_limitFaceValues
 
bool m_highOrderLimiter
 
bool m_useFlattening
 
int m_numFluxes
 
int m_numGhost
 
int m_numFields
 
int m_numFluxesPerField
 
bool m_hasCoarser
 
bool m_hasFiner
 
bool m_noPPM
 
bool m_doDeconvolution
 
bool m_doFaceDeconvolution
 
bool m_useArtificialViscosity
 
Real m_artificialViscosity
 
Real m_currentTime
 
bool m_isCurrentTimeSet
 
Box m_currentBox
 
bool m_isCurrentBoxSet
 

Private Member Functions

PatchMappedConsOperatoroperator= (const PatchMappedConsOperator &a_input)
 
 PatchMappedConsOperator (const PatchMappedConsOperator &a_input)
 

Detailed Description

Patch Mapped Cons Operator - a class for evaluating hyperbolic conservation fluxes on mapped multiblock grids

Constructor & Destructor Documentation

◆ PatchMappedConsOperator() [1/2]

PatchMappedConsOperator::PatchMappedConsOperator ( const int  a_numFluxesPerField = 1)

Constructor.

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

◆ ~PatchMappedConsOperator()

virtual PatchMappedConsOperator::~PatchMappedConsOperator ( )
virtual

Destructor.

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

◆ PatchMappedConsOperator() [2/2]

PatchMappedConsOperator::PatchMappedConsOperator ( const PatchMappedConsOperator a_input)
private

Member Function Documentation

◆ define()

virtual void PatchMappedConsOperator::define ( const ProblemDomain a_domain,
const Real a_dx,
LevelGridMetrics a_levelGridMetrics,
const MOLPhysics *const  a_molPhysics,
const int &  a_numStates 
)
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.

◆ setCurrentTime()

virtual void PatchMappedConsOperator::setCurrentTime ( const Real a_currentTime)
virtual

Set the current time before calling evalRHS or addArtificialViscosity.

Reimplemented from PatchConsOperator.

◆ setCurrentBox()

virtual void PatchMappedConsOperator::setCurrentBox ( const DataIndex a_currentDataIdx,
const Box a_currentBox 
)
virtual

Set the current data index and box before calling.

Required before calling evalRHS or addArtificialViscosity.

◆ evalFlux()

virtual void PatchMappedConsOperator::evalFlux ( const FArrayBox a_UavgFab,
FluxBox a_FfaceAvg,
FluxBox a_FfromWfaceAvg,
Real  a_weight,
bool  a_setFlattening,
FArrayBox a_flatteningFab 
)
virtual

Evaluate the flux at a given time.

◆ evalRHS()

virtual void PatchMappedConsOperator::evalRHS ( FArrayBox a_LofU,
const FluxBox a_FfaceAvg 
)
virtual

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

◆ getFaceAvg()

virtual void PatchMappedConsOperator::getFaceAvg ( FluxBox a_faceW,
const FArrayBox a_cellW,
const FArrayBox a_WofUavg,
FArrayBox a_flatteningFab,
bool  a_setFlattening 
)
virtual

finds face-centered W and limits it using Colella&Sekora limiter; also solves Riemann problem

Parameters
a_cellWcell-averaged primitive variables

Reimplemented from PatchConsOperator.

◆ unitNormals()

void PatchMappedConsOperator::unitNormals ( const LayoutData< FluxBox > *const  a_unitNormalLayPtr)

sets m_unitNormalLayPtr

◆ setMaxSpeed()

void PatchMappedConsOperator::setMaxSpeed ( Real  a_maxSpeed)

sets m_maxSpeed

◆ useArtificialDissipation()

void PatchMappedConsOperator::useArtificialDissipation ( bool  a_useArtificialDissipation)

sets whether to use artificial dissipation

◆ artificialDissipation()

void PatchMappedConsOperator::artificialDissipation ( Real  a_artificialDissipation)

sets coefficient of artificial dissipation

◆ addArtificialViscosity()

virtual void PatchMappedConsOperator::addArtificialViscosity ( FArrayBox a_UnewFab,
const FArrayBox a_UoldFab,
FluxBox a_flux,
Real  a_weight 
)
virtual

add artificial viscosity to a_Unew

Reimplemented from PatchConsOperator.

◆ addMappedArtificialViscosity()

void PatchMappedConsOperator::addMappedArtificialViscosity ( FArrayBox a_JUnewFab,
const FArrayBox a_UoldFab,
FluxBox a_flux,
const FluxBox a_N,
const FArrayBox a_J,
const Box a_box,
Real  a_weight 
)

Add artificial viscosity to a_JUnew for mapped grids.

◆ getMaxWaveSpeed()

virtual Real PatchMappedConsOperator::getMaxWaveSpeed ( const FArrayBox a_U,
const Box a_bx 
)
virtual

◆ preRiemann()

virtual void PatchMappedConsOperator::preRiemann ( FArrayBox a_WLeft,
FArrayBox a_WRight,
int  a_dir,
const Box a_box 
)
protectedvirtual

may be used in derived classes just before calling Riemann solver in direction a_dir

Reimplemented from PatchConsOperator.

◆ postRiemann()

virtual void PatchMappedConsOperator::postRiemann ( FArrayBox a_Wface,
int  a_dir,
const Box a_box 
)
protectedvirtual

may be used in derived classes just after calling Riemann solver in direction a_dir

Reimplemented from PatchConsOperator.

◆ forwardBasisTransform()

virtual void PatchMappedConsOperator::forwardBasisTransform ( FArrayBox a_W,
const int  a_dir,
const Box a_box 
)
protectedvirtual

◆ reverseBasisTransform()

virtual void PatchMappedConsOperator::reverseBasisTransform ( FArrayBox a_W,
const int  a_dir,
const Box a_box 
)
protectedvirtual

◆ getAllFluxes()

virtual void PatchMappedConsOperator::getAllFluxes ( FluxBox a_FfaceAvg,
FluxBox a_FfaceCen,
const FluxBox a_WfaceAvg,
const FluxBox a_WfaceCen 
)
protectedvirtual

Reimplemented from PatchConsOperator.

◆ fluxCorrection()

virtual void PatchMappedConsOperator::fluxCorrection ( FluxBox a_fluxAvg,
const FArrayBox a_UavgFab 
)
protectedvirtual

◆ operator=()

PatchMappedConsOperator& PatchMappedConsOperator::operator= ( const PatchMappedConsOperator a_input)
private

Member Data Documentation

◆ m_blockDomain

ProblemDomain PatchMappedConsOperator::m_blockDomain
protected

◆ m_coordSys

const MultiBlockCoordSys* PatchMappedConsOperator::m_coordSys
protected

◆ m_molMappedPhysics

MOLMappedPhysics* PatchMappedConsOperator::m_molMappedPhysics
protected

◆ m_levelGridMetrics

LevelGridMetrics* PatchMappedConsOperator::m_levelGridMetrics
protected

◆ m_unitNormalLayPtr

const LayoutData<FluxBox>* PatchMappedConsOperator::m_unitNormalLayPtr
protected

◆ m_useArtificialDissipation

bool PatchMappedConsOperator::m_useArtificialDissipation
protected

◆ m_artificialDissipation

Real PatchMappedConsOperator::m_artificialDissipation
protected

◆ m_maxSpeed

Real PatchMappedConsOperator::m_maxSpeed
protected

◆ m_isMaxSpeedSet

bool PatchMappedConsOperator::m_isMaxSpeedSet
protected

◆ m_currentDataIdx

DataIndex PatchMappedConsOperator::m_currentDataIdx
protected

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