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

AMRLevel for advection-diffusion. More...

#include <AMRLevelAdvectDiffuse.H>

Inheritance diagram for AMRLevelAdvectDiffuse:
Inheritance graph
[legend]

Public Member Functions

 AMRLevelAdvectDiffuse ()
 Default constructor. More...
 
 AMRLevelAdvectDiffuse (const AdvectPhysics &a_gphys, AdvectionVelocityFunction a_advFunc, BCHolder a_bcFunc, const Real &a_cfl, const Real &a_domainLength, const Real &a_refineThresh, const int &a_tagBufferSize, const Real &a_initialDtMultiplier, const bool &a_useLimiting, const Real &a_nu)
 Full constructor. Arguments are same as in define() More...
 
void makeDiffusiveSource (LevelData< FArrayBox > &a_diffusiveSource)
 
void define (const AdvectPhysics &a_gphys, AdvectionVelocityFunction a_advFunc, BCHolder a_bcFunc, const Real &a_cfl, const Real &a_domainLength, const Real &a_refineThresh, const int &a_tagBufferSize, const Real &a_initialDtMultiplier, const bool &a_useLimiting, const Real &a_nu)
 Defines this AMRLevelAdvectDiffuse. More...
 
virtual ~AMRLevelAdvectDiffuse ()
 
virtual void define (AMRLevel *a_coarserLevelPtr, const Box &a_problemDomain, int a_level, int a_refRatio)
 Never called: historical. More...
 
virtual void define (AMRLevel *a_coarserLevelPtr, const ProblemDomain &a_problemDomain, int a_level, int a_refRatio)
 Define new AMRLevelAdvectDiffuse from coarser. More...
 
virtual Real advance ()
 Advance by one timestep. More...
 
virtual void postTimeStep ()
 Things to do after a timestep. 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 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 Real computeDt ()
 Returns the dt computed earlier for this level. More...
 
virtual Real computeInitialDt ()
 Compute dt using initial data. More...
 
LevelData< FArrayBox > & getStateNew ()
 
LevelData< FArrayBox > & getStateOld ()
 
- Public Member Functions inherited from AMRLevel
 AMRLevel ()
 
virtual ~AMRLevel ()
 
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

void setSolverCoef (Real a_alpha, Real a_beta)
 
void interpolateInTime (LevelData< FArrayBox > &a_interp, const LevelData< FArrayBox > &a_old, const LevelData< FArrayBox > &a_new, Real a_time, Real a_tOld, Real a_tNew)
 
void getHierarchyAndGrids (Vector< AMRLevelAdvectDiffuse * > &a_hierarchy, Vector< DisjointBoxLayout > &a_grids, Vector< int > &a_refRat, ProblemDomain &a_lev0Dom, Real &a_lev0Dx)
 
void doImplicitReflux ()
 
void printRefluxRHSMax (const std::string &a_preflix)
 
Real diffusiveAdvance (LevelData< FArrayBox > &a_diffusiveSource)
 
void defineSolvers ()
 
void getCoarseDataPointers (LevelData< FArrayBox > **a_coarserDataOldPtr, LevelData< FArrayBox > **a_coarserDataNewPtr, LevelFluxRegister **a_coarserFRPtr, LevelFluxRegister **a_finerFRPtr, Real &a_tCoarserOld, Real &a_tCoarserNew)
 
void fillAdvectionVelocity ()
 
void levelSetup ()
 
AMRLevelAdvectDiffusegetCoarserLevel () const
 
AMRLevelAdvectDiffusegetFinerLevel () const
 

Protected Attributes

BCHolder m_bcFunc
 
LevelData< FArrayBoxm_UOld
 
LevelData< FArrayBoxm_UNew
 
LevelData< FArrayBoxm_dU
 
LevelData< FluxBoxm_advVel
 
Vector< string > m_stateNames
 
bool m_isDefined
 
Real m_cfl
 
Real m_domainLength
 
Real m_refineThresh
 
int m_tagBufferSize
 
Real m_initialDtMultiplier
 
bool m_useLimiting
 
Real m_nu
 
Real m_dx
 
RefCountedPtr< AdvectPhysicsm_advPhys
 
AdvectionVelocityFunction m_advFunc
 
FineInterp m_fineInterp
 
CoarseAverage m_coarseAverage
 
Real m_dtNew
 
int m_numGhost
 
LevelAdvect m_levelGodunov
 
LevelFluxRegister m_fluxRegister
 
bool m_hasCoarser
 
bool m_hasFiner
 
bool m_doImplicitReflux
 
bool m_hasDiffusion
 
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 RefCountedPtr< LevelTGAs_diffuseLevTGA
 
static RefCountedPtr
< AMRMultiGrid< LevelData
< FArrayBox > > > 
s_diffuseAMRMG
 
static RefCountedPtr
< AMRLevelOpFactory< LevelData
< FArrayBox > > > 
s_diffuseOpFact
 
static BiCGStabSolver
< LevelData< FArrayBox > > 
s_botSolver
 
- Static Protected Attributes inherited from AMRLevel
static int s_verbosity
 

Private Member Functions

void operator= (const AMRLevelAdvectDiffuse &)
 
 AMRLevelAdvectDiffuse (const AMRLevelAdvectDiffuse &)
 

Additional Inherited Members

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

Detailed Description

AMRLevel for advection-diffusion.

Constructor & Destructor Documentation

AMRLevelAdvectDiffuse::AMRLevelAdvectDiffuse ( )
inline

Default constructor.

References m_isDefined.

AMRLevelAdvectDiffuse::AMRLevelAdvectDiffuse ( const AdvectPhysics a_gphys,
AdvectionVelocityFunction  a_advFunc,
BCHolder  a_bcFunc,
const Real a_cfl,
const Real a_domainLength,
const Real a_refineThresh,
const int &  a_tagBufferSize,
const Real a_initialDtMultiplier,
const bool &  a_useLimiting,
const Real a_nu 
)
inline

Full constructor. Arguments are same as in define()

References define().

virtual AMRLevelAdvectDiffuse::~AMRLevelAdvectDiffuse ( )
virtual
AMRLevelAdvectDiffuse::AMRLevelAdvectDiffuse ( const AMRLevelAdvectDiffuse )
private

Member Function Documentation

void AMRLevelAdvectDiffuse::makeDiffusiveSource ( LevelData< FArrayBox > &  a_diffusiveSource)
void AMRLevelAdvectDiffuse::define ( const AdvectPhysics a_gphys,
AdvectionVelocityFunction  a_advFunc,
BCHolder  a_bcFunc,
const Real a_cfl,
const Real a_domainLength,
const Real a_refineThresh,
const int &  a_tagBufferSize,
const Real a_initialDtMultiplier,
const bool &  a_useLimiting,
const Real a_nu 
)

Defines this AMRLevelAdvectDiffuse.

Parameters
a_gphysadvection physics class
a_advFuncvelocity function providing the advection velocity
a_bcFuncboundary condition class for diffusion solve
a_cflCFL number
a_domainLengthphysical length of domain
a_refineThreshundivided gradient size over which a cell will be tagged for refinement
a_tagBufferSizenumber of buffer cells around each tagged cell that will also be tagged
a_initialDtMultiplierCFL number at beginning of calculation
a_useLimitingwhether to use van Leer limiting
a_nudiffusion coefficient

Referenced by AMRLevelAdvectDiffuse().

virtual void AMRLevelAdvectDiffuse::define ( AMRLevel a_coarserLevelPtr,
const Box a_problemDomain,
int  a_level,
int  a_refRatio 
)
inlinevirtual

Never called: historical.

Reimplemented from AMRLevel.

References MayDay::Error().

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

Define new AMRLevelAdvectDiffuse from coarser.

Reimplemented from AMRLevel.

virtual Real AMRLevelAdvectDiffuse::advance ( )
virtual

Advance by one timestep.

Implements AMRLevel.

virtual void AMRLevelAdvectDiffuse::postTimeStep ( )
virtual

Things to do after a timestep.

Implements AMRLevel.

virtual void AMRLevelAdvectDiffuse::tagCells ( IntVectSet a_tags)
virtual

Create tags for regridding.

Implements AMRLevel.

virtual void AMRLevelAdvectDiffuse::tagCellsInit ( IntVectSet a_tags)
virtual

Create tags at initialization.

Implements AMRLevel.

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

Set up data on this level after regridding.

Implements AMRLevel.

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

Initialize grids.

Implements AMRLevel.

virtual void AMRLevelAdvectDiffuse::initialData ( )
virtual

Initialize data.

Implements AMRLevel.

virtual void AMRLevelAdvectDiffuse::postInitialize ( )
virtual

Things to do after initialization.

Implements AMRLevel.

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

Write checkpoint header.

Implements AMRLevel.

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

Write checkpoint data for this level.

Implements AMRLevel.

virtual void AMRLevelAdvectDiffuse::readCheckpointHeader ( HDF5Handle a_handle)
virtual

Read checkpoint header.

Implements AMRLevel.

virtual void AMRLevelAdvectDiffuse::readCheckpointLevel ( HDF5Handle a_handle)
virtual

Read checkpoint data for this level.

Implements AMRLevel.

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

Write plotfile header.

Implements AMRLevel.

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

Write plotfile data for this level.

Implements AMRLevel.

virtual Real AMRLevelAdvectDiffuse::computeDt ( )
virtual

Returns the dt computed earlier for this level.

Implements AMRLevel.

virtual Real AMRLevelAdvectDiffuse::computeInitialDt ( )
virtual

Compute dt using initial data.

Implements AMRLevel.

LevelData<FArrayBox>& AMRLevelAdvectDiffuse::getStateNew ( )
inline

References m_UNew.

LevelData<FArrayBox>& AMRLevelAdvectDiffuse::getStateOld ( )
inline

References m_UOld.

void AMRLevelAdvectDiffuse::setSolverCoef ( Real  a_alpha,
Real  a_beta 
)
protected
void AMRLevelAdvectDiffuse::interpolateInTime ( LevelData< FArrayBox > &  a_interp,
const LevelData< FArrayBox > &  a_old,
const LevelData< FArrayBox > &  a_new,
Real  a_time,
Real  a_tOld,
Real  a_tNew 
)
protected
void AMRLevelAdvectDiffuse::getHierarchyAndGrids ( Vector< AMRLevelAdvectDiffuse * > &  a_hierarchy,
Vector< DisjointBoxLayout > &  a_grids,
Vector< int > &  a_refRat,
ProblemDomain a_lev0Dom,
Real a_lev0Dx 
)
protected
void AMRLevelAdvectDiffuse::doImplicitReflux ( )
protected
void AMRLevelAdvectDiffuse::printRefluxRHSMax ( const std::string &  a_preflix)
protected
Real AMRLevelAdvectDiffuse::diffusiveAdvance ( LevelData< FArrayBox > &  a_diffusiveSource)
protected
void AMRLevelAdvectDiffuse::defineSolvers ( )
protected
void AMRLevelAdvectDiffuse::getCoarseDataPointers ( LevelData< FArrayBox > **  a_coarserDataOldPtr,
LevelData< FArrayBox > **  a_coarserDataNewPtr,
LevelFluxRegister **  a_coarserFRPtr,
LevelFluxRegister **  a_finerFRPtr,
Real a_tCoarserOld,
Real a_tCoarserNew 
)
protected
void AMRLevelAdvectDiffuse::fillAdvectionVelocity ( )
protected
void AMRLevelAdvectDiffuse::levelSetup ( )
protected
AMRLevelAdvectDiffuse* AMRLevelAdvectDiffuse::getCoarserLevel ( ) const
protected
AMRLevelAdvectDiffuse* AMRLevelAdvectDiffuse::getFinerLevel ( ) const
protected
void AMRLevelAdvectDiffuse::operator= ( const AMRLevelAdvectDiffuse )
private

Member Data Documentation

BCHolder AMRLevelAdvectDiffuse::m_bcFunc
protected
RefCountedPtr<LevelTGA> AMRLevelAdvectDiffuse::s_diffuseLevTGA
staticprotected
RefCountedPtr<AMRMultiGrid<LevelData<FArrayBox> > > AMRLevelAdvectDiffuse::s_diffuseAMRMG
staticprotected
RefCountedPtr<AMRLevelOpFactory<LevelData<FArrayBox> > > AMRLevelAdvectDiffuse::s_diffuseOpFact
staticprotected
BiCGStabSolver<LevelData<FArrayBox> > AMRLevelAdvectDiffuse::s_botSolver
staticprotected
LevelData<FArrayBox> AMRLevelAdvectDiffuse::m_UOld
protected

Referenced by getStateOld().

LevelData<FArrayBox> AMRLevelAdvectDiffuse::m_UNew
protected

Referenced by getStateNew().

LevelData<FArrayBox> AMRLevelAdvectDiffuse::m_dU
protected
LevelData<FluxBox> AMRLevelAdvectDiffuse::m_advVel
protected
Vector<string> AMRLevelAdvectDiffuse::m_stateNames
protected
bool AMRLevelAdvectDiffuse::m_isDefined
protected

Referenced by AMRLevelAdvectDiffuse().

Real AMRLevelAdvectDiffuse::m_cfl
protected
Real AMRLevelAdvectDiffuse::m_domainLength
protected
Real AMRLevelAdvectDiffuse::m_refineThresh
protected
int AMRLevelAdvectDiffuse::m_tagBufferSize
protected
Real AMRLevelAdvectDiffuse::m_initialDtMultiplier
protected
bool AMRLevelAdvectDiffuse::m_useLimiting
protected
Real AMRLevelAdvectDiffuse::m_nu
protected
Real AMRLevelAdvectDiffuse::m_dx
protected
RefCountedPtr<AdvectPhysics> AMRLevelAdvectDiffuse::m_advPhys
protected
AdvectionVelocityFunction AMRLevelAdvectDiffuse::m_advFunc
protected
FineInterp AMRLevelAdvectDiffuse::m_fineInterp
protected
CoarseAverage AMRLevelAdvectDiffuse::m_coarseAverage
protected
Real AMRLevelAdvectDiffuse::m_dtNew
protected
int AMRLevelAdvectDiffuse::m_numGhost
protected
LevelAdvect AMRLevelAdvectDiffuse::m_levelGodunov
protected
LevelFluxRegister AMRLevelAdvectDiffuse::m_fluxRegister
protected
bool AMRLevelAdvectDiffuse::m_hasCoarser
protected
bool AMRLevelAdvectDiffuse::m_hasFiner
protected
bool AMRLevelAdvectDiffuse::m_doImplicitReflux
protected
bool AMRLevelAdvectDiffuse::m_hasDiffusion
protected
DisjointBoxLayout AMRLevelAdvectDiffuse::m_grids
protected

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