AMRLevelMappedCons Class Reference

#include <AMRLevelMappedCons.H>

Inheritance diagram for AMRLevelMappedCons:

Inheritance graph
[legend]

List of all members.


Detailed Description

AMR Level for fourth-order solution to conservation law.

Public Member Functions

 AMRLevelMappedCons (MultiBlockCoordSysFactory *const a_coordSysFact, const AMRLevelMappedStabilityStrategy *const a_stabilityStrategy, const AMRLevelMappedTaggingStrategy *const a_taggingStategy)
 Factory constructor.
virtual ~AMRLevelMappedCons ()
 Destructor.
virtual void define (AMRLevel *a_coarserLevelPtr, const ProblemDomain &a_problemDomain, int a_level, int a_refRatio)
 Define new AMR level.
virtual Real advance ()
 Advance by one timestep by RK4, and return new timestep.
virtual void postTimeStep ()
 add dissipation to m_Unew: Kreiss-Oliger artificial viscosity
virtual void tagCells (IntVectSet &a_tags)
 Create tags for regridding.
virtual void tagCellsInit (IntVectSet &a_tags)
 Create tags at initialization.
virtual void preRegrid (int a_base_level, const Vector< Vector< Box > > &a_new_grids)
 Pre-regrid operations necessary for updating metric terms.
virtual void regrid (const Vector< Box > &a_newGrids)
 Set up data on this level after regridding.
virtual void initialGrid (const Vector< Box > &a_newGrids)
 Initialize grids.
virtual void postInitialGrid (const bool a_restart)
 Compute the grid metrics for mapped grids.
virtual void initialData ()
 Initialize data.
virtual void postInitialize ()
 Things to do after initialization.
virtual void writeCheckpointHeader (HDF5Handle &a_handle) const
 Write checkpoint header.
virtual void writeCheckpointLevel (HDF5Handle &a_handle) const
 Write checkpoint data for this level.
virtual void readCheckpointHeader (HDF5Handle &a_handle)
 Read checkpoint header.
virtual void readCheckpointLevel (HDF5Handle &a_handle)
 Read checkpoint data for this level.
virtual void writePlotHeader (HDF5Handle &a_handle) const
 Write plotfile header.
virtual void writePlotLevel (HDF5Handle &a_handle) const
 Write plotfile data for this level.
virtual void writeMappedPlotFile () const
 Write mapped-grid info.
virtual void conclude (int a_step) const
 Conclude by testing conservation if necessary.
virtual Real computeInitialDt ()
 Compute dt using initial data.
void coordinateSystem (MultiBlockCoordSysFactory *a_coordSysFact)
virtual Real getMaxWaveSpeed (const LevelData< FArrayBox > &a_U)
 Return maximum speed from conserved variables.
void useSourceTerm (bool a_useSourceTerm)
 Set whether to use a source term.
void sourceTerm (const LevelSourceTerm *const a_sourceTerm)
 Set the source term.
void useArtificialDissipation (bool a_useArtificialDissipation)
 Set whether to add artificial dissipation.
void artificialDissipation (Real a_artificialDissipation)
 Set coefficient of artificial dissipation.

Protected Member Functions

virtual void setDefaultValues ()
 Set the MOLPhysics class.
virtual void levelSetup ()
 Setup menagerie of data structures.
virtual void transferSettingsToLevelOp ()
 Transfer settings from this to m_levelMappedConsOperator: called by levelSetup().
virtual void transferSettingsFromAMRLevelMapped (AMRLevelMappedCons *a_amrConsPtr)
 Transfer settings from a_amrConsPtr to this: called by define().
AMRLevelMappedConsgetCoarserLevel () const
 Get the next coarser level.
AMRLevelMappedConsgetFinerLevel () const
 Get the next finer level.
virtual void advanceU ()
 Advance by one timestep by RK4.
virtual Real computeNewDt ()
 Compute new timestep from m_Unew, and store it in m_dtNew.
virtual int indexForTagging ()
 Index within primitive variables for tagging cells.
void myComputeNorm (const int a_type, Vector< Real > &a_norm) const
 Compute a norm for some reason.
void reportNorm () const
 Compute and write out norm of conserved quantities.
void reportError () const
 Report norms of errors (requires exact solution).
virtual void setData (LevelData< FArrayBox > &a_U, LevelData< FArrayBox > &a_JU) const
 Initialize <U> and <JU> at time m_time.
void writeJ (bool a_writeJ)
void writeExact (bool a_writeExact)
void writeError (bool a_writeError)
void writeMap (bool a_writeMap)

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

Static Protected Attributes

static int s_finestLevel
static Vector< Reals_L1NormJUConsvRef
static bool s_writeJ
 whether to write out J
static bool s_writeExact
 whether to write out exact value from time
static bool s_writeError
 whether to write out error from time
static bool s_writeMap
 whether to write out mapping file

Private Member Functions

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

Friends

class AMRLevelMappedConsFactory
class LevelGridMetrics

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 (  )  [protected, virtual]

Set the MOLPhysics class.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::levelSetup (  )  [protected, virtual]

Setup menagerie of data structures.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::transferSettingsToLevelOp (  )  [protected, virtual]

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

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::transferSettingsFromAMRLevelMapped ( AMRLevelMappedCons a_amrConsPtr  )  [protected, virtual]

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

AMRLevelMappedCons* AMRLevelMappedCons::getCoarserLevel (  )  const [protected]

Get the next coarser level.

Reimplemented from AMRLevelCons.

AMRLevelMappedCons* AMRLevelMappedCons::getFinerLevel (  )  const [protected]

Get the next finer level.

Reimplemented from AMRLevelCons.

virtual void AMRLevelMappedCons::advanceU (  )  [protected, virtual]

Advance by one timestep by RK4.

Reimplemented from AMRLevelCons.

virtual Real AMRLevelMappedCons::computeNewDt (  )  [protected, virtual]

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

Reimplemented from AMRLevelCons.

virtual int AMRLevelMappedCons::indexForTagging (  )  [protected, virtual]

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 [protected, virtual]

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

void AMRLevelMappedCons::writeJ ( bool  a_writeJ  )  [inline, protected]

References s_writeJ.

void AMRLevelMappedCons::writeExact ( bool  a_writeExact  )  [inline, protected]

References s_writeExact.

void AMRLevelMappedCons::writeError ( bool  a_writeError  )  [inline, protected]

References s_writeError.

void AMRLevelMappedCons::writeMap ( bool  a_writeMap  )  [inline, protected]

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

std::string AMRLevelMappedCons::m_plotPrefix [protected]

int AMRLevelMappedCons::s_finestLevel [static, protected]

The finest level from the initial grid or latest regrid.

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

bool AMRLevelMappedCons::s_writeJ [static, protected]

whether to write out J

Referenced by writeJ().

bool AMRLevelMappedCons::s_writeExact [static, protected]

whether to write out exact value from time

Referenced by writeExact().

bool AMRLevelMappedCons::s_writeError [static, protected]

whether to write out error from time

Referenced by writeError().

bool AMRLevelMappedCons::s_writeMap [static, protected]

whether to write out mapping file

Referenced by writeMap().


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

Generated on Tue Aug 22 03:26:56 2017 for Chombo + EB + MF by  doxygen 1.5.5