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

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

#include <AMRLevelMappedCons.H>

Inheritance diagram for AMRLevelMappedCons:
Inheritance graph
[legend]

Public Member Functions

 AMRLevelMappedCons (MultiBlockCoordSysFactory *const a_coordSysFact, const AMRLevelMappedStabilityStrategy *const a_stabilityStrategy, const AMRLevelMappedTaggingStrategy *const a_taggingStategy)
 Factory constructor. More...
 
virtual ~AMRLevelMappedCons ()
 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 postTimeStep ()
 add dissipation to m_Unew: Kreiss-Oliger artificial viscosity 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 preRegrid (int a_base_level, const Vector< Vector< Box > > &a_new_grids)
 Pre-regrid operations necessary for updating metric terms. 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 postInitialGrid (const bool a_restart)
 Compute the grid metrics for mapped grids. More...
 
virtual void initialData ()
 Initialize data. 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 void writeMappedPlotFile () const
 Write mapped-grid info. More...
 
virtual void conclude (int a_step) const
 Conclude by testing conservation if necessary. More...
 
virtual Real computeInitialDt ()
 Compute dt using initial data. More...
 
void coordinateSystem (MultiBlockCoordSysFactory *a_coordSysFact)
 
virtual Real getMaxWaveSpeed (const LevelData< FArrayBox > &a_U)
 Return maximum speed from conserved variables. More...
 
void useSourceTerm (bool a_useSourceTerm)
 Set whether to use a source term. More...
 
void sourceTerm (const LevelSourceTerm *const a_sourceTerm)
 Set the source term. More...
 
void useArtificialDissipation (bool a_useArtificialDissipation)
 Set whether to add artificial dissipation. More...
 
void artificialDissipation (Real a_artificialDissipation)
 Set coefficient of artificial dissipation. More...
 
- Public Member Functions inherited from AMRLevelCons
 AMRLevelCons ()
 Constructor. More...
 
virtual ~AMRLevelCons ()
 Destructor. More...
 
virtual void addDissipation ()
 add dissipation to m_Unew: Kreiss-Oliger artificial viscosity More...
 
virtual void defineDataHolders ()
 Define m_Unew and m_Uold. More...
 
virtual void setData (LevelData< FArrayBox > &a_U, Real a_time) const
 Set a_U at time a_time. More...
 
virtual Real computeDt ()
 Returns the dt computed earlier for this level. 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 postRegrid (int a_base_level)
 
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 ()
 Set the MOLPhysics class. More...
 
virtual void levelSetup ()
 Setup menagerie of data structures. More...
 
virtual void transferSettingsToLevelOp ()
 Transfer settings from this to m_levelMappedConsOperator: called by levelSetup() More...
 
virtual void transferSettingsFromAMRLevelMapped (AMRLevelMappedCons *a_amrConsPtr)
 Transfer settings from a_amrConsPtr to this: called by define() More...
 
AMRLevelMappedConsgetCoarserLevel () const
 Get the next coarser level. More...
 
AMRLevelMappedConsgetFinerLevel () const
 Get the next finer level. More...
 
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 int indexForTagging ()
 Index within primitive variables for tagging cells. More...
 
void myComputeNorm (const int a_type, Vector< Real > &a_norm) const
 Compute a norm for some reason. More...
 
void reportNorm () const
 Compute and write out norm of conserved quantities. More...
 
void reportError () const
 Report norms of errors (requires exact solution) More...
 
virtual void setData (LevelData< FArrayBox > &a_U, LevelData< FArrayBox > &a_JU) const
 Initialize <U> and <JU> at time m_time. More...
 
void writeJ (bool a_writeJ)
 
void writeExact (bool a_writeExact)
 
void writeError (bool a_writeError)
 
void writeMap (bool a_writeMap)
 
- Protected Member Functions inherited from AMRLevelCons
DisjointBoxLayout loadBalance (const Vector< Box > &a_grids)
 
virtual void transferSettingsFromAMRLevel (AMRLevelCons *a_amrConsPtr)
 
AMRLevelConsgetCoarserLevel () const
 
AMRLevelConsgetFinerLevel () const
 
virtual Real maxVorticity (LevelData< FArrayBox > &a_vecMag)
 Compute max vorticity of m_Unew, and store their magnitudes in a_vecMag. More...
 

Protected Attributes

MultiBlockCoordSysFactorym_coordSysFact
 
MultiBlockCoordSysm_coordSys
 
MultiBlockCoordSysm_coordSysFine
 
MultiBlockUtil m_mbUtil
 
LevelGridMetricsm_levelGridMetricsPtr
 
MappedLevelData m_data
 
LevelMappedConsOperatorm_levelMappedConsOperatorPtr
 
LevelFluxRegisterm_fluxRegisterPtr
 
int m_levelStep
 
bool m_useSourceTerm
 
bool m_useArtificialDissipation
 
Real m_artificialDissipation
 
AMRLevelMappedStabilityStrategym_stabilityStrategy
 
AMRLevelMappedTaggingStrategym_taggingStrategy
 
std::string m_plotPrefix
 
LevelSourceTermm_sourceTermPtr
 
RefCountedPtr< LevelData
< FArrayBox > > 
m_UexactPtr
 
RefCountedPtr< LevelData
< FArrayBox > > 
m_JUexactPtr
 
- Protected Attributes inherited from AMRLevelCons
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
 

Static Protected Attributes

static int s_finestLevel
 
static Vector< Reals_L1NormJUConsvRef
 
static bool s_writeJ
 whether to write out J More...
 
static bool s_writeExact
 whether to write out exact value from time More...
 
static bool s_writeError
 whether to write out error from time More...
 
static bool s_writeMap
 whether to write out mapping file More...
 
- Static Protected Attributes inherited from AMRLevel
static int s_verbosity
 

Private Member Functions

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

Friends

class AMRLevelMappedConsFactory
 
class LevelGridMetrics
 

Additional Inherited Members

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

Detailed Description

AMR Level for fourth-order solution to conservation law.

Constructor & Destructor Documentation

AMRLevelMappedCons::AMRLevelMappedCons ( MultiBlockCoordSysFactory *const  a_coordSysFact,
const AMRLevelMappedStabilityStrategy *const  a_stabilityStrategy,
const AMRLevelMappedTaggingStrategy *const  a_taggingStategy 
)

Factory constructor.

virtual AMRLevelMappedCons::~AMRLevelMappedCons ( )
virtual

Destructor.

AMRLevelMappedCons::AMRLevelMappedCons ( const AMRLevelMappedCons a_input)
private

Member Function Documentation

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

Define new AMR level.

Reimplemented from AMRLevelCons.

virtual Real AMRLevelMappedCons::advance ( )
virtual

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

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::postTimeStep ( )
virtual

add dissipation to m_Unew: Kreiss-Oliger artificial viscosity

Things to do after a timestep – reflux

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::tagCells ( IntVectSet a_tags)
virtual

Create tags for regridding.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::tagCellsInit ( IntVectSet a_tags)
virtual

Create tags at initialization.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::preRegrid ( int  a_base_level,
const Vector< Vector< Box > > &  a_new_grids 
)
virtual

Pre-regrid operations necessary for updating metric terms.

Reimplemented from AMRLevel.

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

Set up data on this level after regridding.

Reimplemented from AMRLevelCons.

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

Initialize grids.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::postInitialGrid ( const bool  a_restart)
virtual

Compute the grid metrics for mapped grids.

Reimplemented from AMRLevel.

virtual void AMRLevelMappedCons::initialData ( )
virtual

Initialize data.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::postInitialize ( )
virtual

Things to do after initialization.

Reimplemented from AMRLevelCons.

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

Write checkpoint header.

Reimplemented from AMRLevelCons.

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

Write checkpoint data for this level.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::readCheckpointHeader ( HDF5Handle a_handle)
virtual

Read checkpoint header.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::readCheckpointLevel ( HDF5Handle a_handle)
virtual

Read checkpoint data for this level.

Reimplemented from AMRLevelCons.

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

Write plotfile header.

Reimplemented from AMRLevelCons.

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

Write plotfile data for this level.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::writeMappedPlotFile ( ) const
virtual

Write mapped-grid info.

virtual void AMRLevelMappedCons::conclude ( int  a_step) const
virtual

Conclude by testing conservation if necessary.

Reimplemented from AMRLevel.

virtual Real AMRLevelMappedCons::computeInitialDt ( )
virtual

Compute dt using initial data.

Reimplemented from AMRLevelCons.

void AMRLevelMappedCons::coordinateSystem ( MultiBlockCoordSysFactory a_coordSysFact)
virtual Real AMRLevelMappedCons::getMaxWaveSpeed ( const LevelData< FArrayBox > &  a_U)
virtual

Return maximum speed from conserved variables.

Reimplemented from AMRLevelCons.

void AMRLevelMappedCons::useSourceTerm ( bool  a_useSourceTerm)

Set whether to use a source term.

void AMRLevelMappedCons::sourceTerm ( const LevelSourceTerm *const  a_sourceTerm)

Set the source term.

void AMRLevelMappedCons::useArtificialDissipation ( bool  a_useArtificialDissipation)

Set whether to add artificial dissipation.

void AMRLevelMappedCons::artificialDissipation ( Real  a_artificialDissipation)

Set coefficient of artificial dissipation.

virtual void AMRLevelMappedCons::setDefaultValues ( )
protectedvirtual

Set the MOLPhysics class.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::levelSetup ( )
protectedvirtual

Setup menagerie of data structures.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::transferSettingsToLevelOp ( )
protectedvirtual

Transfer settings from this to m_levelMappedConsOperator: called by levelSetup()

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::transferSettingsFromAMRLevelMapped ( AMRLevelMappedCons a_amrConsPtr)
protectedvirtual

Transfer settings from a_amrConsPtr to this: called by define()

AMRLevelMappedCons* AMRLevelMappedCons::getCoarserLevel ( ) const
protected

Get the next coarser level.

AMRLevelMappedCons* AMRLevelMappedCons::getFinerLevel ( ) const
protected

Get the next finer level.

virtual void AMRLevelMappedCons::advanceU ( )
protectedvirtual

Advance by one timestep by RK4.

Reimplemented from AMRLevelCons.

virtual Real AMRLevelMappedCons::computeNewDt ( )
protectedvirtual

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

Reimplemented from AMRLevelCons.

virtual int AMRLevelMappedCons::indexForTagging ( )
protectedvirtual

Index within primitive variables for tagging cells.

Reimplemented from AMRLevelCons.

void AMRLevelMappedCons::myComputeNorm ( const int  a_type,
Vector< Real > &  a_norm 
) const
protected

Compute a norm for some reason.

void AMRLevelMappedCons::reportNorm ( ) const
protected

Compute and write out norm of conserved quantities.

void AMRLevelMappedCons::reportError ( ) const
protected

Report norms of errors (requires exact solution)

virtual void AMRLevelMappedCons::setData ( LevelData< FArrayBox > &  a_U,
LevelData< FArrayBox > &  a_JU 
) const
protectedvirtual

Initialize <U> and <JU> at time m_time.

void AMRLevelMappedCons::writeJ ( bool  a_writeJ)
inlineprotected

References s_writeJ.

void AMRLevelMappedCons::writeExact ( bool  a_writeExact)
inlineprotected

References s_writeExact.

void AMRLevelMappedCons::writeError ( bool  a_writeError)
inlineprotected

References s_writeError.

void AMRLevelMappedCons::writeMap ( bool  a_writeMap)
inlineprotected

References s_writeMap.

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

Friends And Related Function Documentation

friend class AMRLevelMappedConsFactory
friend
friend class LevelGridMetrics
friend

Member Data Documentation

MultiBlockCoordSysFactory* AMRLevelMappedCons::m_coordSysFact
protected
MultiBlockCoordSys* AMRLevelMappedCons::m_coordSys
protected
MultiBlockCoordSys* AMRLevelMappedCons::m_coordSysFine
protected
MultiBlockUtil AMRLevelMappedCons::m_mbUtil
protected
LevelGridMetrics* AMRLevelMappedCons::m_levelGridMetricsPtr
protected
MappedLevelData AMRLevelMappedCons::m_data
protected
LevelMappedConsOperator* AMRLevelMappedCons::m_levelMappedConsOperatorPtr
protected
LevelFluxRegister* AMRLevelMappedCons::m_fluxRegisterPtr
protected
int AMRLevelMappedCons::m_levelStep
protected
bool AMRLevelMappedCons::m_useSourceTerm
protected
bool AMRLevelMappedCons::m_useArtificialDissipation
protected
Real AMRLevelMappedCons::m_artificialDissipation
protected
AMRLevelMappedStabilityStrategy* AMRLevelMappedCons::m_stabilityStrategy
protected
AMRLevelMappedTaggingStrategy* AMRLevelMappedCons::m_taggingStrategy
protected
std::string AMRLevelMappedCons::m_plotPrefix
protected
LevelSourceTerm* AMRLevelMappedCons::m_sourceTermPtr
protected
int AMRLevelMappedCons::s_finestLevel
staticprotected

The finest level from the initial grid or latest regrid.

Vector<Real> AMRLevelMappedCons::s_L1NormJUConsvRef
staticprotected

L_1 norm of JU at start of solution used for checking conservation

bool AMRLevelMappedCons::s_writeJ
staticprotected

whether to write out J

Referenced by writeJ().

bool AMRLevelMappedCons::s_writeExact
staticprotected

whether to write out exact value from time

Referenced by writeExact().

bool AMRLevelMappedCons::s_writeError
staticprotected

whether to write out error from time

Referenced by writeError().

bool AMRLevelMappedCons::s_writeMap
staticprotected

whether to write out mapping file

Referenced by writeMap().

RefCountedPtr< LevelData<FArrayBox> > AMRLevelMappedCons::m_UexactPtr
mutableprotected
RefCountedPtr< LevelData<FArrayBox> > AMRLevelMappedCons::m_JUexactPtr
mutableprotected

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