11 #ifndef _AMRLEVELADVECTDIFFUSE_H_ 12 #define _AMRLEVELADVECTDIFFUSE_H_ 36 #include "NamespaceHeader.H" 56 const Real& a_domainLength,
57 const Real& a_refineThresh,
58 const int& a_tagBufferSize,
59 const Real& a_initialDtMultiplier,
60 const bool& a_useLimiting,
63 define(a_gphys, a_advFunc, a_bcFunc, a_cfl, a_domainLength, a_refineThresh,
64 a_tagBufferSize, a_initialDtMultiplier, a_useLimiting, a_nu);
79 const Real& a_domainLength,
81 const Real& a_refineThresh,
83 const int& a_tagBufferSize,
85 const Real& a_initialDtMultiplier,
87 const bool& a_useLimiting,
96 const Box& a_problemDomain,
209 Real& a_tCoarserNew);
259 #include "NamespaceFooter.H" 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)
bool m_isDefined
Definition: AMRLevelAdvectDiffuse.H:226
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()
Definition: AMRLevelAdvectDiffuse.H:52
replaces coarse level data with an average of fine level data.
Definition: CoarseAverage.H:30
bool m_doImplicitReflux
Definition: AMRLevelAdvectDiffuse.H:247
AMRLevel for advection-diffusion.
Definition: AMRLevelAdvectDiffuse.H:41
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.
Real(* AdvectionVelocityFunction)(const RealVect &a_point, const int &a_velComp)
Velocity function interface.
Definition: AdvectionFunctions.H:23
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
LevelData< FArrayBox > & getStateNew()
Definition: AMRLevelAdvectDiffuse.H:163
LevelData< FArrayBox > m_dU
Definition: AMRLevelAdvectDiffuse.H:222
Real m_dtNew
Definition: AMRLevelAdvectDiffuse.H:240
LevelData< FArrayBox > & getStateOld()
Definition: AMRLevelAdvectDiffuse.H:169
void getHierarchyAndGrids(Vector< AMRLevelAdvectDiffuse *> &a_hierarchy, Vector< DisjointBoxLayout > &a_grids, Vector< int > &a_refRat, ProblemDomain &a_lev0Dom, Real &a_lev0Dx)
Abstract base class for time-dependent data at a level of refinement.
Definition: AMRLevel.H:47
virtual void regrid(const Vector< Box > &a_newGrids)
Set up data on this level after regridding.
virtual ~AMRLevelAdvectDiffuse()
Real m_initialDtMultiplier
Definition: AMRLevelAdvectDiffuse.H:231
static RefCountedPtr< AMRLevelOpFactory< LevelData< FArrayBox > > > s_diffuseOpFact
Definition: AMRLevelAdvectDiffuse.H:198
Advection integrator on a level.
Definition: LevelAdvect.H:30
Real m_domainLength
Definition: AMRLevelAdvectDiffuse.H:228
virtual void writeCheckpointHeader(HDF5Handle &a_handle) const
Write checkpoint header.
replaces fine level data with interpolation of coarse level data.
Definition: FineInterp.H:32
LevelFluxRegister m_fluxRegister
Definition: AMRLevelAdvectDiffuse.H:243
virtual void initialGrid(const Vector< Box > &a_newGrids)
Initialize grids.
static RefCountedPtr< AMRMultiGrid< LevelData< FArrayBox > > > s_diffuseAMRMG
Definition: AMRLevelAdvectDiffuse.H:196
bool m_hasFiner
Definition: AMRLevelAdvectDiffuse.H:246
virtual void initialData()
Initialize data.
Real m_dx
Definition: AMRLevelAdvectDiffuse.H:234
Vector< string > m_stateNames
Definition: AMRLevelAdvectDiffuse.H:225
double Real
Definition: REAL.H:33
void setSolverCoef(Real a_alpha, Real a_beta)
Real diffusiveAdvance(LevelData< FArrayBox > &a_diffusiveSource)
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
LevelData< FArrayBox > m_UNew
Definition: AMRLevelAdvectDiffuse.H:222
virtual Real advance()
Advance by one timestep.
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
virtual void writeCheckpointLevel(HDF5Handle &a_handle) const
Write checkpoint data for this level.
AdvectionVelocityFunction m_advFunc
Definition: AMRLevelAdvectDiffuse.H:236
AMRLevelAdvectDiffuse * getFinerLevel() const
LevelFluxRegister-A class to encapsulate a levels worth of flux registers.
Definition: LevelFluxRegister.H:29
RefCountedPtr< AdvectPhysics > m_advPhys
Definition: AMRLevelAdvectDiffuse.H:235
A class derived from GodunovPhysics for simple advection-diffusion problems.
Definition: AdvectPhysics.H:22
void printRefluxRHSMax(const std::string &a_preflix)
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
virtual void postTimeStep()
Things to do after a timestep.
virtual void writePlotHeader(HDF5Handle &a_handle) const
Write plotfile header.
virtual Real computeInitialDt()
Compute dt using initial data.
void fillAdvectionVelocity()
int m_tagBufferSize
Definition: AMRLevelAdvectDiffuse.H:230
Real m_refineThresh
Definition: AMRLevelAdvectDiffuse.H:229
BCHolder m_bcFunc
Definition: AMRLevelAdvectDiffuse.H:192
virtual void define(AMRLevel *a_coarserLevelPtr, const Box &a_problemDomain, int a_level, int a_refRatio)
Never called: historical.
Definition: AMRLevelAdvectDiffuse.H:95
virtual void tagCells(IntVectSet &a_tags)
Create tags for regridding.
virtual void writePlotLevel(HDF5Handle &a_handle) const
Write plotfile data for this level.
Real m_nu
Definition: AMRLevelAdvectDiffuse.H:233
Handle to a particular group in an HDF file.
Definition: CH_HDF5.H:294
AMRLevelAdvectDiffuse * getCoarserLevel() const
int m_numGhost
Definition: AMRLevelAdvectDiffuse.H:241
FineInterp m_fineInterp
Definition: AMRLevelAdvectDiffuse.H:238
virtual void postInitialize()
Things to do after initialization.
virtual void readCheckpointLevel(HDF5Handle &a_handle)
Read checkpoint data for this level.
AMRLevelAdvectDiffuse()
Default constructor.
Definition: AMRLevelAdvectDiffuse.H:46
virtual void tagCellsInit(IntVectSet &a_tags)
Create tags at initialization.
virtual void readCheckpointHeader(HDF5Handle &a_handle)
Read checkpoint header.
static RefCountedPtr< LevelTGA > s_diffuseLevTGA
Definition: AMRLevelAdvectDiffuse.H:194
CoarseAverage m_coarseAverage
Definition: AMRLevelAdvectDiffuse.H:239
LevelData< FArrayBox > m_UOld
Definition: AMRLevelAdvectDiffuse.H:222
void operator=(const AMRLevelAdvectDiffuse &)
virtual Real computeDt()
Returns the dt computed earlier for this level.
void getCoarseDataPointers(LevelData< FArrayBox > **a_coarserDataOldPtr, LevelData< FArrayBox > **a_coarserDataNewPtr, LevelFluxRegister **a_coarserFRPtr, LevelFluxRegister **a_finerFRPtr, Real &a_tCoarserOld, Real &a_tCoarserNew)
LevelData< FluxBox > m_advVel
Definition: AMRLevelAdvectDiffuse.H:223
bool m_hasDiffusion
Definition: AMRLevelAdvectDiffuse.H:248
static BiCGStabSolver< LevelData< FArrayBox > > s_botSolver
Definition: AMRLevelAdvectDiffuse.H:200
bool m_hasCoarser
Definition: AMRLevelAdvectDiffuse.H:245
LevelAdvect m_levelGodunov
Definition: AMRLevelAdvectDiffuse.H:242
Real m_cfl
Definition: AMRLevelAdvectDiffuse.H:227
void makeDiffusiveSource(LevelData< FArrayBox > &a_diffusiveSource)
bool m_useLimiting
Definition: AMRLevelAdvectDiffuse.H:232
Definition: BiCGStabSolver.H:26
DisjointBoxLayout m_grids
Definition: AMRLevelAdvectDiffuse.H:250