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

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

#include <PatchConsOperator.H>

Inheritance diagram for PatchConsOperator:
Inheritance graph
[legend]

Public Member Functions

 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 setCurrentTime (const Real &a_currentTime)
 Set the current time before calling evalRHS or addArtificialViscosity. 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...
 
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 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 addArtificialViscosity (FArrayBox &a_UnewFab, const FArrayBox &a_UoldFab, FluxBox &a_flux, Real a_weight)
 add artificial viscosity to a_Unew 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 getAllFluxes (FluxBox &a_FfaceAvg, FluxBox &a_FfaceCen, const FluxBox &a_WfaceAvg, const FluxBox &a_WfaceCen)
 
virtual void reduceFlux (FluxBox &a_FfaceAvg, FluxBox &a_FfaceForGrad)
 

Protected Attributes

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

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

Detailed Description

Patch Cons Operator - a class for evaluating the Laplacian.

Constructor & Destructor Documentation

◆ PatchConsOperator() [1/2]

PatchConsOperator::PatchConsOperator ( )

Default constructor.

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

◆ ~PatchConsOperator()

virtual PatchConsOperator::~PatchConsOperator ( )
virtual

Destructor.

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

◆ PatchConsOperator() [2/2]

PatchConsOperator::PatchConsOperator ( const PatchConsOperator a_input)
private

Member Function Documentation

◆ define()

virtual void PatchConsOperator::define ( const ProblemDomain a_domain,
const Real a_dx,
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 PatchConsOperator::setCurrentTime ( const Real a_currentTime)
virtual

Set the current time before calling evalRHS or addArtificialViscosity.

Reimplemented in PatchMappedConsOperator.

◆ setCurrentBox()

virtual void PatchConsOperator::setCurrentBox ( const Box a_currentBox)
virtual

Set the current box before calling evalRHS or addArtificialViscosity.

◆ getNormalFlux()

virtual void PatchConsOperator::getNormalFlux ( FluxBox a_FfaceAvg,
const FArrayBox a_UavgFab,
Real  a_weight,
bool  a_setFlattening,
FArrayBox a_flatteningFab 
)
virtual

Evaluate the normal flux.

◆ updateODE()

virtual void PatchConsOperator::updateODE ( FArrayBox a_solnFab,
const FArrayBox a_rhsFab,
Real  a_dt 
)
virtual

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

◆ getFaceAvg()

virtual void PatchConsOperator::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 in PatchMappedConsOperator.

◆ spaceOrder()

void PatchConsOperator::spaceOrder ( int  a_spaceOrder)

set spatial order of accuracy

◆ limitFaceValues()

void PatchConsOperator::limitFaceValues ( bool  a_limitFaceValues)

if true, limit face values

◆ highOrderLimiter()

void PatchConsOperator::highOrderLimiter ( bool  a_highOrderLimiter)

◆ useFlattening()

void PatchConsOperator::useFlattening ( bool  a_useFlattening)

sets whether to flatten extrapolations to faces

◆ noPPM()

void PatchConsOperator::noPPM ( bool  a_noPPM)

sets m_noPPM

◆ doDeconvolution()

void PatchConsOperator::doDeconvolution ( bool  a_doDeconvolution)

sets m_doDeconvolution

◆ doFaceDeconvolution()

void PatchConsOperator::doFaceDeconvolution ( bool  a_doFaceDeconvolution)

sets m_doFaceDeconvolution

◆ useArtificialViscosity()

void PatchConsOperator::useArtificialViscosity ( bool  a_useArtificialViscosity)

sets whether to use artificial viscosity (from divergence)

◆ artificialViscosity()

void PatchConsOperator::artificialViscosity ( Real  a_artificialViscosity)

sets coefficient of artificial viscosity (from divergence)

◆ numGhost()

void PatchConsOperator::numGhost ( int  a_numGhost)

sets m_numGhost, the number of ghost cells

◆ addArtificialViscosity()

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

add artificial viscosity to a_Unew

Reimplemented in PatchMappedConsOperator.

◆ getFluxDivergence()

virtual void PatchConsOperator::getFluxDivergence ( FArrayBox a_LofU,
const FluxBox a_FfaceAvg 
)
virtual

◆ isDefined()

virtual bool PatchConsOperator::isDefined ( ) const
virtual

Is the object completely defined.

Return true if the object is completely defined.

◆ preRiemann()

virtual void PatchConsOperator::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 in PatchMappedConsOperator.

◆ postRiemann()

virtual void PatchConsOperator::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 in PatchMappedConsOperator.

◆ getAllFluxes()

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

Reimplemented in PatchMappedConsOperator.

◆ reduceFlux()

virtual void PatchConsOperator::reduceFlux ( FluxBox a_FfaceAvg,
FluxBox a_FfaceForGrad 
)
protectedvirtual

◆ operator=()

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

Member Data Documentation

◆ m_isDefined

bool PatchConsOperator::m_isDefined
protected

◆ m_dx

Real PatchConsOperator::m_dx
protected

◆ m_domain

ProblemDomain PatchConsOperator::m_domain
protected

◆ m_molPhysics

MOLPhysics* PatchConsOperator::m_molPhysics
protected

◆ m_util

MOLUtilities PatchConsOperator::m_util
protected

◆ m_spaceOrder

int PatchConsOperator::m_spaceOrder
protected

◆ m_limitFaceValues

bool PatchConsOperator::m_limitFaceValues
protected

◆ m_highOrderLimiter

bool PatchConsOperator::m_highOrderLimiter
protected

◆ m_useFlattening

bool PatchConsOperator::m_useFlattening
protected

◆ m_numFluxes

int PatchConsOperator::m_numFluxes
protected

◆ m_numGhost

int PatchConsOperator::m_numGhost
protected

◆ m_numFields

int PatchConsOperator::m_numFields
protected

◆ m_numFluxesPerField

int PatchConsOperator::m_numFluxesPerField
protected

◆ m_hasCoarser

bool PatchConsOperator::m_hasCoarser
protected

◆ m_hasFiner

bool PatchConsOperator::m_hasFiner
protected

◆ m_noPPM

bool PatchConsOperator::m_noPPM
protected

◆ m_doDeconvolution

bool PatchConsOperator::m_doDeconvolution
protected

◆ m_doFaceDeconvolution

bool PatchConsOperator::m_doFaceDeconvolution
protected

◆ m_useArtificialViscosity

bool PatchConsOperator::m_useArtificialViscosity
protected

◆ m_artificialViscosity

Real PatchConsOperator::m_artificialViscosity
protected

◆ m_currentTime

Real PatchConsOperator::m_currentTime
protected

◆ m_isCurrentTimeSet

bool PatchConsOperator::m_isCurrentTimeSet
protected

◆ m_currentBox

Box PatchConsOperator::m_currentBox
protected

◆ m_isCurrentBoxSet

bool PatchConsOperator::m_isCurrentBoxSet
protected

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