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() [1/3]

AMRLevelAdvectDiffuse::AMRLevelAdvectDiffuse ( )
inline

Default constructor.

References m_isDefined.

◆ AMRLevelAdvectDiffuse() [2/3]

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(), makeDiffusiveSource(), and ~AMRLevelAdvectDiffuse().

◆ ~AMRLevelAdvectDiffuse()

virtual AMRLevelAdvectDiffuse::~AMRLevelAdvectDiffuse ( )
virtual

Referenced by AMRLevelAdvectDiffuse().

◆ AMRLevelAdvectDiffuse() [3/3]

AMRLevelAdvectDiffuse::AMRLevelAdvectDiffuse ( const AMRLevelAdvectDiffuse )
private

Member Function Documentation

◆ makeDiffusiveSource()

void AMRLevelAdvectDiffuse::makeDiffusiveSource ( LevelData< FArrayBox > &  a_diffusiveSource)

Referenced by AMRLevelAdvectDiffuse().

◆ define() [1/3]

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(), and define().

◆ define() [2/3]

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

◆ define() [3/3]

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.

◆ advance()

virtual Real AMRLevelAdvectDiffuse::advance ( )
virtual

Advance by one timestep.

Implements AMRLevel.

Referenced by define().

◆ postTimeStep()

virtual void AMRLevelAdvectDiffuse::postTimeStep ( )
virtual

Things to do after a timestep.

Implements AMRLevel.

Referenced by define().

◆ tagCells()

virtual void AMRLevelAdvectDiffuse::tagCells ( IntVectSet a_tags)
virtual

Create tags for regridding.

Implements AMRLevel.

Referenced by define().

◆ tagCellsInit()

virtual void AMRLevelAdvectDiffuse::tagCellsInit ( IntVectSet a_tags)
virtual

Create tags at initialization.

Implements AMRLevel.

Referenced by define().

◆ regrid()

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

Set up data on this level after regridding.

Implements AMRLevel.

Referenced by define().

◆ initialGrid()

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

Initialize grids.

Implements AMRLevel.

Referenced by define().

◆ initialData()

virtual void AMRLevelAdvectDiffuse::initialData ( )
virtual

Initialize data.

Implements AMRLevel.

Referenced by define().

◆ postInitialize()

virtual void AMRLevelAdvectDiffuse::postInitialize ( )
virtual

Things to do after initialization.

Implements AMRLevel.

Referenced by define().

◆ writeCheckpointHeader()

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

Write checkpoint header.

Implements AMRLevel.

Referenced by define().

◆ writeCheckpointLevel()

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

Write checkpoint data for this level.

Implements AMRLevel.

Referenced by define().

◆ readCheckpointHeader()

virtual void AMRLevelAdvectDiffuse::readCheckpointHeader ( HDF5Handle a_handle)
virtual

Read checkpoint header.

Implements AMRLevel.

Referenced by define().

◆ readCheckpointLevel()

virtual void AMRLevelAdvectDiffuse::readCheckpointLevel ( HDF5Handle a_handle)
virtual

Read checkpoint data for this level.

Implements AMRLevel.

Referenced by define().

◆ writePlotHeader()

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

Write plotfile header.

Implements AMRLevel.

Referenced by define().

◆ writePlotLevel()

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

Write plotfile data for this level.

Implements AMRLevel.

Referenced by define().

◆ computeDt()

virtual Real AMRLevelAdvectDiffuse::computeDt ( )
virtual

Returns the dt computed earlier for this level.

Implements AMRLevel.

Referenced by define().

◆ computeInitialDt()

virtual Real AMRLevelAdvectDiffuse::computeInitialDt ( )
virtual

Compute dt using initial data.

Implements AMRLevel.

Referenced by define().

◆ getStateNew()

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

References m_UNew.

◆ getStateOld()

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

◆ setSolverCoef()

void AMRLevelAdvectDiffuse::setSolverCoef ( Real  a_alpha,
Real  a_beta 
)
protected

Referenced by getStateOld().

◆ interpolateInTime()

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

Referenced by getStateOld().

◆ getHierarchyAndGrids()

void AMRLevelAdvectDiffuse::getHierarchyAndGrids ( Vector< AMRLevelAdvectDiffuse *> &  a_hierarchy,
Vector< DisjointBoxLayout > &  a_grids,
Vector< int > &  a_refRat,
ProblemDomain a_lev0Dom,
Real a_lev0Dx 
)
protected

Referenced by getStateOld().

◆ doImplicitReflux()

void AMRLevelAdvectDiffuse::doImplicitReflux ( )
protected

Referenced by getStateOld().

◆ printRefluxRHSMax()

void AMRLevelAdvectDiffuse::printRefluxRHSMax ( const std::string &  a_preflix)
protected

Referenced by getStateOld().

◆ diffusiveAdvance()

Real AMRLevelAdvectDiffuse::diffusiveAdvance ( LevelData< FArrayBox > &  a_diffusiveSource)
protected

Referenced by getStateOld().

◆ defineSolvers()

void AMRLevelAdvectDiffuse::defineSolvers ( )
protected

Referenced by getStateOld().

◆ getCoarseDataPointers()

void AMRLevelAdvectDiffuse::getCoarseDataPointers ( LevelData< FArrayBox > **  a_coarserDataOldPtr,
LevelData< FArrayBox > **  a_coarserDataNewPtr,
LevelFluxRegister **  a_coarserFRPtr,
LevelFluxRegister **  a_finerFRPtr,
Real a_tCoarserOld,
Real a_tCoarserNew 
)
protected

◆ fillAdvectionVelocity()

void AMRLevelAdvectDiffuse::fillAdvectionVelocity ( )
protected

◆ levelSetup()

void AMRLevelAdvectDiffuse::levelSetup ( )
protected

◆ getCoarserLevel()

AMRLevelAdvectDiffuse* AMRLevelAdvectDiffuse::getCoarserLevel ( ) const
protected

◆ getFinerLevel()

AMRLevelAdvectDiffuse* AMRLevelAdvectDiffuse::getFinerLevel ( ) const
protected

◆ operator=()

void AMRLevelAdvectDiffuse::operator= ( const AMRLevelAdvectDiffuse )
private

Member Data Documentation

◆ m_bcFunc

BCHolder AMRLevelAdvectDiffuse::m_bcFunc
protected

◆ s_diffuseLevTGA

RefCountedPtr<LevelTGA> AMRLevelAdvectDiffuse::s_diffuseLevTGA
staticprotected

◆ s_diffuseAMRMG

RefCountedPtr<AMRMultiGrid<LevelData<FArrayBox> > > AMRLevelAdvectDiffuse::s_diffuseAMRMG
staticprotected

◆ s_diffuseOpFact

RefCountedPtr<AMRLevelOpFactory<LevelData<FArrayBox> > > AMRLevelAdvectDiffuse::s_diffuseOpFact
staticprotected

◆ s_botSolver

BiCGStabSolver<LevelData<FArrayBox> > AMRLevelAdvectDiffuse::s_botSolver
staticprotected

◆ m_UOld

LevelData<FArrayBox> AMRLevelAdvectDiffuse::m_UOld
protected

Referenced by getStateOld().

◆ m_UNew

LevelData<FArrayBox> AMRLevelAdvectDiffuse::m_UNew
protected

Referenced by getStateNew().

◆ m_dU

LevelData<FArrayBox> AMRLevelAdvectDiffuse::m_dU
protected

◆ m_advVel

LevelData<FluxBox> AMRLevelAdvectDiffuse::m_advVel
protected

◆ m_stateNames

Vector<string> AMRLevelAdvectDiffuse::m_stateNames
protected

◆ m_isDefined

bool AMRLevelAdvectDiffuse::m_isDefined
protected

Referenced by AMRLevelAdvectDiffuse().

◆ m_cfl

Real AMRLevelAdvectDiffuse::m_cfl
protected

◆ m_domainLength

Real AMRLevelAdvectDiffuse::m_domainLength
protected

◆ m_refineThresh

Real AMRLevelAdvectDiffuse::m_refineThresh
protected

◆ m_tagBufferSize

int AMRLevelAdvectDiffuse::m_tagBufferSize
protected

◆ m_initialDtMultiplier

Real AMRLevelAdvectDiffuse::m_initialDtMultiplier
protected

◆ m_useLimiting

bool AMRLevelAdvectDiffuse::m_useLimiting
protected

◆ m_nu

Real AMRLevelAdvectDiffuse::m_nu
protected

◆ m_dx

Real AMRLevelAdvectDiffuse::m_dx
protected

◆ m_advPhys

RefCountedPtr<AdvectPhysics> AMRLevelAdvectDiffuse::m_advPhys
protected

◆ m_advFunc

AdvectionVelocityFunction AMRLevelAdvectDiffuse::m_advFunc
protected

◆ m_fineInterp

FineInterp AMRLevelAdvectDiffuse::m_fineInterp
protected

◆ m_coarseAverage

CoarseAverage AMRLevelAdvectDiffuse::m_coarseAverage
protected

◆ m_dtNew

Real AMRLevelAdvectDiffuse::m_dtNew
protected

◆ m_numGhost

int AMRLevelAdvectDiffuse::m_numGhost
protected

◆ m_levelGodunov

LevelAdvect AMRLevelAdvectDiffuse::m_levelGodunov
protected

◆ m_fluxRegister

LevelFluxRegister AMRLevelAdvectDiffuse::m_fluxRegister
protected

◆ m_hasCoarser

bool AMRLevelAdvectDiffuse::m_hasCoarser
protected

◆ m_hasFiner

bool AMRLevelAdvectDiffuse::m_hasFiner
protected

◆ m_doImplicitReflux

bool AMRLevelAdvectDiffuse::m_doImplicitReflux
protected

◆ m_hasDiffusion

bool AMRLevelAdvectDiffuse::m_hasDiffusion
protected

◆ m_grids

DisjointBoxLayout AMRLevelAdvectDiffuse::m_grids
protected

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