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

AMR Level for fourth-order solution to conservation law. More...

#include <AMRLevelCons.H>

Inheritance diagram for AMRLevelCons:
Inheritance graph
[legend]

Public Member Functions

 AMRLevelCons ()
 Constructor. More...
 
virtual ~AMRLevelCons ()
 Destructor. More...
 
virtual void define (AMRLevel *a_coarserLevelPtr, const ProblemDomain &a_problemDomain, int a_level, int a_refRatio)
 Define new AMR level. More...
 
virtual Real advance ()
 Advance by one timestep by RK4, and return new timestep. More...
 
virtual void addDissipation ()
 add dissipation to m_Unew: Kreiss-Oliger artificial viscosity More...
 
virtual void postTimeStep ()
 Things to do after a timestep – reflux. More...
 
virtual void tagCells (IntVectSet &a_tags)
 Create tags for regridding. More...
 
virtual void tagCellsInit (IntVectSet &a_tags)
 Create tags at initialization. More...
 
virtual void regrid (const Vector< Box > &a_newGrids)
 Set up data on this level after regridding. More...
 
virtual void initialGrid (const Vector< Box > &a_newGrids)
 Initialize grids. More...
 
virtual void defineDataHolders ()
 Define m_Unew and m_Uold. More...
 
virtual void initialData ()
 Initialize data: Set m_Unew at time 0. More...
 
virtual void setData (LevelData< FArrayBox > &a_U, Real a_time) const
 Set a_U at time a_time. More...
 
virtual void postInitialize ()
 Things to do after initialization. More...
 
virtual void writeCheckpointHeader (HDF5Handle &a_handle) const
 Write checkpoint header. More...
 
virtual void writeCheckpointLevel (HDF5Handle &a_handle) const
 Write checkpoint data for this level. More...
 
virtual void readCheckpointHeader (HDF5Handle &a_handle)
 Read checkpoint header. More...
 
virtual void readCheckpointLevel (HDF5Handle &a_handle)
 Read checkpoint data for this level. More...
 
virtual void writePlotHeader (HDF5Handle &a_handle) const
 Write plotfile header. More...
 
virtual void writePlotLevel (HDF5Handle &a_handle) const
 Write plotfile data for this level. More...
 
virtual Real computeDt ()
 Returns the dt computed earlier for this level. More...
 
virtual Real computeInitialDt ()
 Compute dt using initial data. More...
 
virtual Real getMaxWaveSpeed (const LevelData< FArrayBox > &a_U)
 Return maximum speed from conserved variables. More...
 
virtual void CFL (Real a_cfl)
 Set the CFL number. More...
 
virtual void spaceOrder (int a_spaceOrder)
 Set the spatial order of accuracy. More...
 
virtual void limitFaceValues (bool a_limitFaceValues)
 sets whether to limit face values in operator More...
 
virtual void highOrderLimiter (bool a_highOrderLimiter)
 
virtual void initialAverage (bool a_initialAverage)
 sets whether initial data is average; default false More...
 
virtual void useFlattening (bool a_useFlattening)
 sets whether to flatten extrapolations to faces More...
 
virtual void useArtVisc (bool a_useArtVisc)
 sets whether to use artificial viscosity More...
 
virtual void noPPM (bool a_noPPM)
 sets whether to turn off PPM More...
 
virtual void doDeconvolution (bool a_doDeconvolution)
 sets m_doDeconvolution More...
 
virtual void doFaceDeconvolution (bool a_doFaceDeconvolution)
 sets m_doFaceDeconvolution More...
 
virtual void useArtificialViscosity (bool a_useArtificialViscosity)
 sets whether to use artificial viscosity (from divergence) More...
 
virtual void artificialViscosity (Real a_artificialViscosity)
 sets coefficient of artificial viscosity (from divergence) More...
 
virtual void ratioArtVisc (Real a_ratioArtVisc)
 sets coefficient of artificial viscosity More...
 
virtual void forwardEuler (bool a_forwardEuler)
 sets whether forward Euler is used (instead of RK4) More...
 
virtual void enforceMinVal (bool a_enforceMinVal, Real a_minVal)
 sets whether to enforce a min value More...
 
virtual void domainLength (Real a_domainLength)
 Set the physical dimension of the longest side of the domain. More...
 
virtual void refinementThreshold (Real a_refineThresh)
 Set the refinement threshold. More...
 
virtual void refinementIsScaled (bool a_refinementIsScaled)
 Set whether refinement threshold is scaled with dx. More...
 
virtual void tagPressure (bool a_tagPressure)
 Set whether to tag on pressure instead of on density. More...
 
virtual void tagVorticity (bool a_tagVorticity)
 Set whether to tag on vorticity instead of on density. More...
 
void tagBufferSize (int a_tagBufferSize)
 Set the tag buffer size. More...
 
void molPhysics (const MOLPhysics *const a_molPhysics)
 Set the MOLPhysics class. More...
 
LevelData< FArrayBox > * U ()
 Accessors. More...
 
void computeVorticity (LevelData< FArrayBox > &a_vorticity, const LevelData< FArrayBox > &a_U) const
 
- Public Member Functions inherited from AMRLevel
 AMRLevel ()
 
virtual ~AMRLevel ()
 
virtual void define (AMRLevel *a_coarser_level_ptr, const Box &a_problem_domain, int a_level, int a_ref_ratio)
 
virtual bool convergedToSteadyState ()
 
virtual void preRegrid (int a_base_level, const Vector< Vector< Box > > &a_new_grids)
 
virtual void postRegrid (int a_base_level)
 
virtual void postInitialGrid (const bool a_restart)
 
virtual void conclude (int a_step) const
 
virtual void writeCustomPlotFile (const std::string &a_prefix, int a_step) const
 
virtual void finerLevelPtr (AMRLevel *a_finer_level_ptr)
 
virtual void dt (Real a_dt)
 
virtual void time (Real a_time)
 
virtual void initialDtMultiplier (Real a_initial_dt_multiplier)
 
virtual Real dt () const
 
virtual Real time () const
 
virtual Real initialDtMultiplier () const
 
virtual const ProblemDomainproblemDomain () const
 
virtual Vector< Boxboxes () const
 
bool isDefined () const
 
bool hasCoarserLevel () const
 
bool hasFinerLevel () const
 
virtual int level () const
 
virtual int refRatio () const
 
Vector< AMRLevel * > getAMRLevelHierarchy ()
 Retrieve an array of all of the AMRLevel objects in the entire hierarchy. More...
 

Protected Member Functions

virtual void setDefaultValues ()
 
DisjointBoxLayout loadBalance (const Vector< Box > &a_grids)
 
virtual void levelSetup ()
 
virtual void transferSettingsToLevelOp ()
 
virtual void transferSettingsFromAMRLevel (AMRLevelCons *a_amrConsPtr)
 
AMRLevelConsgetCoarserLevel () const
 
AMRLevelConsgetFinerLevel () const
 
virtual void advanceU ()
 Advance by one timestep by RK4. More...
 
virtual Real computeNewDt ()
 Compute new timestep from m_Unew, and store it in m_dtNew. More...
 
virtual Real maxVorticity (LevelData< FArrayBox > &a_vecMag)
 Compute max vorticity of m_Unew, and store their magnitudes in a_vecMag. More...
 
virtual int indexForTagging ()
 Index within primitive variables for tagging cells. More...
 

Protected Attributes

LevelData< FArrayBoxm_Uold
 
LevelData< FArrayBoxm_Unew
 
Real m_r0
 
Real m_cfl
 
int m_spaceOrder
 
bool m_limitFaceValues
 
bool m_highOrderLimiter
 if true, use high-order limiter More...
 
bool m_initialAverage
 
bool m_useFlattening
 
bool m_useArtVisc
 
Real m_ratioArtVisc
 
bool m_forwardEuler
 
bool m_enforceMinVal
 
bool m_noPPM
 
bool m_doDeconvolution
 
bool m_doFaceDeconvolution
 
bool m_useArtificialViscosity
 
Real m_artificialViscosity
 
Real m_minVal
 
Real m_dx
 
CoarseAveragem_coarseAveragePtr
 
Real m_dtNew
 
int m_numStates
 
Vector< std::string > m_stateNames
 
int m_numGhost
 
IntVect m_ghostVect
 
Real m_domainLength
 
FourthOrderFineInterp m_fineInterp
 
LevelConsOperatorm_levelConsOperatorPtr
 
LevelFluxRegister m_fluxRegister
 
MOLPhysicsm_molPhysics
 
Real m_refineThresh
 
bool m_refinementIsScaled
 
bool m_tagPressure
 
bool m_tagVorticity
 
int m_tagBufferSize
 
bool m_hasCoarser
 
bool m_hasFiner
 
DisjointBoxLayout m_grids
 
- Protected Attributes inherited from AMRLevel
ProblemDomain m_problem_domain
 
Vector< Boxm_level_grids
 
int m_level
 
int m_ref_ratio
 
Real m_initial_dt_multiplier
 
Real m_dt
 
Real m_time
 
AMRLevelm_coarser_level_ptr
 
AMRLevelm_finer_level_ptr
 
bool m_isDefined
 

Private Member Functions

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

Friends

class AMRLevelConsFactory
 

Additional Inherited Members

- Static Public Member Functions inherited from AMRLevel
static int verbosity ()
 
static void verbosity (int a_verbosity)
 
- Static Protected Attributes inherited from AMRLevel
static int s_verbosity
 

Detailed Description

AMR Level for fourth-order solution to conservation law.

Constructor & Destructor Documentation

◆ AMRLevelCons() [1/2]

AMRLevelCons::AMRLevelCons ( )

Constructor.

Referenced by U().

◆ ~AMRLevelCons()

virtual AMRLevelCons::~AMRLevelCons ( )
virtual

Destructor.

◆ AMRLevelCons() [2/2]

AMRLevelCons::AMRLevelCons ( const AMRLevelCons a_input)
private

Member Function Documentation

◆ define()

virtual void AMRLevelCons::define ( AMRLevel a_coarserLevelPtr,
const ProblemDomain a_problemDomain,
int  a_level,
int  a_refRatio 
)
virtual

Define new AMR level.

Reimplemented from AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ advance()

virtual Real AMRLevelCons::advance ( )
virtual

Advance by one timestep by RK4, and return new timestep.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ addDissipation()

virtual void AMRLevelCons::addDissipation ( )
virtual

add dissipation to m_Unew: Kreiss-Oliger artificial viscosity

◆ postTimeStep()

virtual void AMRLevelCons::postTimeStep ( )
virtual

Things to do after a timestep – reflux.

If (!m_hasFiner) then this does nothing except write out some diagnostics depending on the verbosity level.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ tagCells()

virtual void AMRLevelCons::tagCells ( IntVectSet a_tags)
virtual

Create tags for regridding.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ tagCellsInit()

virtual void AMRLevelCons::tagCellsInit ( IntVectSet a_tags)
virtual

Create tags at initialization.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ regrid()

virtual void AMRLevelCons::regrid ( const Vector< Box > &  a_newGrids)
virtual

Set up data on this level after regridding.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ initialGrid()

virtual void AMRLevelCons::initialGrid ( const Vector< Box > &  a_newGrids)
virtual

Initialize grids.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ defineDataHolders()

virtual void AMRLevelCons::defineDataHolders ( )
virtual

Define m_Unew and m_Uold.

◆ initialData()

virtual void AMRLevelCons::initialData ( )
virtual

Initialize data: Set m_Unew at time 0.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ setData()

virtual void AMRLevelCons::setData ( LevelData< FArrayBox > &  a_U,
Real  a_time 
) const
virtual

Set a_U at time a_time.

◆ postInitialize()

virtual void AMRLevelCons::postInitialize ( )
virtual

Things to do after initialization.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ writeCheckpointHeader()

virtual void AMRLevelCons::writeCheckpointHeader ( HDF5Handle a_handle) const
virtual

Write checkpoint header.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ writeCheckpointLevel()

virtual void AMRLevelCons::writeCheckpointLevel ( HDF5Handle a_handle) const
virtual

Write checkpoint data for this level.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ readCheckpointHeader()

virtual void AMRLevelCons::readCheckpointHeader ( HDF5Handle a_handle)
virtual

Read checkpoint header.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ readCheckpointLevel()

virtual void AMRLevelCons::readCheckpointLevel ( HDF5Handle a_handle)
virtual

Read checkpoint data for this level.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ writePlotHeader()

virtual void AMRLevelCons::writePlotHeader ( HDF5Handle a_handle) const
virtual

Write plotfile header.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ writePlotLevel()

virtual void AMRLevelCons::writePlotLevel ( HDF5Handle a_handle) const
virtual

Write plotfile data for this level.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ computeDt()

virtual Real AMRLevelCons::computeDt ( )
virtual

Returns the dt computed earlier for this level.

Implements AMRLevel.

◆ computeInitialDt()

virtual Real AMRLevelCons::computeInitialDt ( )
virtual

Compute dt using initial data.

Implements AMRLevel.

Reimplemented in AMRLevelMappedCons.

◆ getMaxWaveSpeed()

virtual Real AMRLevelCons::getMaxWaveSpeed ( const LevelData< FArrayBox > &  a_U)
virtual

Return maximum speed from conserved variables.

Reimplemented in AMRLevelMappedCons.

◆ CFL()

virtual void AMRLevelCons::CFL ( Real  a_cfl)
virtual

Set the CFL number.

◆ spaceOrder()

virtual void AMRLevelCons::spaceOrder ( int  a_spaceOrder)
virtual

Set the spatial order of accuracy.

can be 2 or 4 (default)

◆ limitFaceValues()

virtual void AMRLevelCons::limitFaceValues ( bool  a_limitFaceValues)
virtual

sets whether to limit face values in operator

◆ highOrderLimiter()

virtual void AMRLevelCons::highOrderLimiter ( bool  a_highOrderLimiter)
virtual

◆ initialAverage()

virtual void AMRLevelCons::initialAverage ( bool  a_initialAverage)
virtual

sets whether initial data is average; default false

◆ useFlattening()

virtual void AMRLevelCons::useFlattening ( bool  a_useFlattening)
virtual

sets whether to flatten extrapolations to faces

◆ useArtVisc()

virtual void AMRLevelCons::useArtVisc ( bool  a_useArtVisc)
virtual

sets whether to use artificial viscosity

◆ noPPM()

virtual void AMRLevelCons::noPPM ( bool  a_noPPM)
virtual

sets whether to turn off PPM

◆ doDeconvolution()

virtual void AMRLevelCons::doDeconvolution ( bool  a_doDeconvolution)
virtual

sets m_doDeconvolution

◆ doFaceDeconvolution()

virtual void AMRLevelCons::doFaceDeconvolution ( bool  a_doFaceDeconvolution)
virtual

sets m_doFaceDeconvolution

◆ useArtificialViscosity()

virtual void AMRLevelCons::useArtificialViscosity ( bool  a_useArtificialViscosity)
virtual

sets whether to use artificial viscosity (from divergence)

◆ artificialViscosity()

virtual void AMRLevelCons::artificialViscosity ( Real  a_artificialViscosity)
virtual

sets coefficient of artificial viscosity (from divergence)

◆ ratioArtVisc()

virtual void AMRLevelCons::ratioArtVisc ( Real  a_ratioArtVisc)
virtual

sets coefficient of artificial viscosity

◆ forwardEuler()

virtual void AMRLevelCons::forwardEuler ( bool  a_forwardEuler)
virtual

sets whether forward Euler is used (instead of RK4)

◆ enforceMinVal()

virtual void AMRLevelCons::enforceMinVal ( bool  a_enforceMinVal,
Real  a_minVal 
)
virtual

sets whether to enforce a min value

◆ domainLength()

virtual void AMRLevelCons::domainLength ( Real  a_domainLength)
virtual

Set the physical dimension of the longest side of the domain.

◆ refinementThreshold()

virtual void AMRLevelCons::refinementThreshold ( Real  a_refineThresh)
virtual

Set the refinement threshold.

◆ refinementIsScaled()

virtual void AMRLevelCons::refinementIsScaled ( bool  a_refinementIsScaled)
virtual

Set whether refinement threshold is scaled with dx.

◆ tagPressure()

virtual void AMRLevelCons::tagPressure ( bool  a_tagPressure)
virtual

Set whether to tag on pressure instead of on density.

◆ tagVorticity()

virtual void AMRLevelCons::tagVorticity ( bool  a_tagVorticity)
virtual

Set whether to tag on vorticity instead of on density.

◆ tagBufferSize()

void AMRLevelCons::tagBufferSize ( int  a_tagBufferSize)

Set the tag buffer size.

◆ molPhysics()

void AMRLevelCons::molPhysics ( const MOLPhysics *const  a_molPhysics)

Set the MOLPhysics class.

◆ U()

LevelData<FArrayBox>* AMRLevelCons::U ( )
inline

◆ computeVorticity()

void AMRLevelCons::computeVorticity ( LevelData< FArrayBox > &  a_vorticity,
const LevelData< FArrayBox > &  a_U 
) const

Referenced by U().

◆ setDefaultValues()

virtual void AMRLevelCons::setDefaultValues ( )
protectedvirtual

Reimplemented in AMRLevelMappedCons.

Referenced by U().

◆ loadBalance()

DisjointBoxLayout AMRLevelCons::loadBalance ( const Vector< Box > &  a_grids)
protected

Referenced by U().

◆ levelSetup()

virtual void AMRLevelCons::levelSetup ( )
protectedvirtual

Reimplemented in AMRLevelMappedCons.

Referenced by U().

◆ transferSettingsToLevelOp()

virtual void AMRLevelCons::transferSettingsToLevelOp ( )
protectedvirtual

Reimplemented in AMRLevelMappedCons.

Referenced by U().

◆ transferSettingsFromAMRLevel()

virtual void AMRLevelCons::transferSettingsFromAMRLevel ( AMRLevelCons a_amrConsPtr)
protectedvirtual

Referenced by U().

◆ getCoarserLevel()

AMRLevelCons* AMRLevelCons::getCoarserLevel ( ) const
protected

Referenced by U().

◆ getFinerLevel()

AMRLevelCons* AMRLevelCons::getFinerLevel ( ) const
protected

Referenced by U().

◆ advanceU()

virtual void AMRLevelCons::advanceU ( )
protectedvirtual

Advance by one timestep by RK4.

Reimplemented in AMRLevelMappedCons.

Referenced by U().

◆ computeNewDt()

virtual Real AMRLevelCons::computeNewDt ( )
protectedvirtual

Compute new timestep from m_Unew, and store it in m_dtNew.

Reimplemented in AMRLevelMappedCons.

Referenced by U().

◆ maxVorticity()

virtual Real AMRLevelCons::maxVorticity ( LevelData< FArrayBox > &  a_vecMag)
protectedvirtual

Compute max vorticity of m_Unew, and store their magnitudes in a_vecMag.

Referenced by U().

◆ indexForTagging()

virtual int AMRLevelCons::indexForTagging ( )
protectedvirtual

Index within primitive variables for tagging cells.

Reimplemented in AMRLevelMappedCons.

Referenced by U().

◆ operator=()

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

Referenced by U().

Friends And Related Function Documentation

◆ AMRLevelConsFactory

friend class AMRLevelConsFactory
friend

Member Data Documentation

◆ m_Uold

LevelData<FArrayBox> AMRLevelCons::m_Uold
protected

◆ m_Unew

LevelData<FArrayBox> AMRLevelCons::m_Unew
protected

Referenced by U().

◆ m_r0

Real AMRLevelCons::m_r0
protected

◆ m_cfl

Real AMRLevelCons::m_cfl
protected

◆ m_spaceOrder

int AMRLevelCons::m_spaceOrder
protected

◆ m_limitFaceValues

bool AMRLevelCons::m_limitFaceValues
protected

◆ m_highOrderLimiter

bool AMRLevelCons::m_highOrderLimiter
protected

if true, use high-order limiter

◆ m_initialAverage

bool AMRLevelCons::m_initialAverage
protected

◆ m_useFlattening

bool AMRLevelCons::m_useFlattening
protected

◆ m_useArtVisc

bool AMRLevelCons::m_useArtVisc
protected

◆ m_ratioArtVisc

Real AMRLevelCons::m_ratioArtVisc
protected

◆ m_forwardEuler

bool AMRLevelCons::m_forwardEuler
protected

◆ m_enforceMinVal

bool AMRLevelCons::m_enforceMinVal
protected

◆ m_noPPM

bool AMRLevelCons::m_noPPM
protected

◆ m_doDeconvolution

bool AMRLevelCons::m_doDeconvolution
protected

◆ m_doFaceDeconvolution

bool AMRLevelCons::m_doFaceDeconvolution
protected

◆ m_useArtificialViscosity

bool AMRLevelCons::m_useArtificialViscosity
protected

◆ m_artificialViscosity

Real AMRLevelCons::m_artificialViscosity
protected

◆ m_minVal

Real AMRLevelCons::m_minVal
protected

◆ m_dx

Real AMRLevelCons::m_dx
protected

◆ m_coarseAveragePtr

CoarseAverage* AMRLevelCons::m_coarseAveragePtr
protected

◆ m_dtNew

Real AMRLevelCons::m_dtNew
protected

◆ m_numStates

int AMRLevelCons::m_numStates
protected

◆ m_stateNames

Vector<std::string> AMRLevelCons::m_stateNames
protected

◆ m_numGhost

int AMRLevelCons::m_numGhost
protected

◆ m_ghostVect

IntVect AMRLevelCons::m_ghostVect
protected

◆ m_domainLength

Real AMRLevelCons::m_domainLength
protected

◆ m_fineInterp

FourthOrderFineInterp AMRLevelCons::m_fineInterp
protected

◆ m_levelConsOperatorPtr

LevelConsOperator* AMRLevelCons::m_levelConsOperatorPtr
protected

◆ m_fluxRegister

LevelFluxRegister AMRLevelCons::m_fluxRegister
protected

◆ m_molPhysics

MOLPhysics* AMRLevelCons::m_molPhysics
protected

◆ m_refineThresh

Real AMRLevelCons::m_refineThresh
protected

◆ m_refinementIsScaled

bool AMRLevelCons::m_refinementIsScaled
protected

◆ m_tagPressure

bool AMRLevelCons::m_tagPressure
protected

◆ m_tagVorticity

bool AMRLevelCons::m_tagVorticity
protected

◆ m_tagBufferSize

int AMRLevelCons::m_tagBufferSize
protected

◆ m_hasCoarser

bool AMRLevelCons::m_hasCoarser
protected

◆ m_hasFiner

bool AMRLevelCons::m_hasFiner
protected

◆ m_grids

DisjointBoxLayout AMRLevelCons::m_grids
protected

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