Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

AMRLevelSelfGravity Class Reference

AMRLevel-derived class for AMR self gravity code. More...

#include <AMRLevelSelfGravity.H>

Inheritance diagram for AMRLevelSelfGravity:

Inheritance graph
[legend]
Collaboration diagram for AMRLevelSelfGravity:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AMRLevelSelfGravity ()
 Constructor.
virtual ~AMRLevelSelfGravity ()
 Destructor.
virtual void define (AMRLevel *a_coarserLevelPtr, const Box &a_problemDomain, int a_level, int a_refRatio)
 This instance should never get called - historical.
virtual void define (AMRLevel *a_coarserLevelPtr, const ProblemDomain &a_problemDomain, int a_level, int a_refRatio)
 Define new AMR level.
void defineParams (const Real &a_cfl, const Real &a_domainLength, const int &a_verbosity, const int &a_tagBufferSize, const int &a_maxInitRefLevel, const Real &a_initialDtMultiplier, const GodunovPhysics *const a_godunovPhysics, const int &a_normalPredOrder, const bool &a_useFourthOrderSlopes, const bool &a_usePrimLimiting, const bool &a_useCharLimiting, const bool &a_useFlattening, const bool &a_useArtificialViscosity, const Real &a_artificialViscosity, const RefCellTagger *const a_refCellTagger, const LevelOp *const a_poissonOp, const bool &a_useDeltaPhiCorr, const StencilType &a_stencil, const CodeUnits &a_codeUnits)
 Define the parameters the object needs.
virtual Real advance ()
 Advance by one timestep.
virtual void postTimeStep ()
 Things to do after a timestep.
virtual void tagCells (IntVectSet &a_tags)
 Create tags for regridding.
virtual void tagCellsInit (IntVectSet &a_tags)
 Create tags at initialization.
virtual void regrid (const Vector< Box > &a_newGrids)
 Set up data on this level after regridding.
virtual void postRegrid (int a_base_level)
 postRegridding ops
virtual void initialGrid (const Vector< Box > &a_newGrids)
 Initialize grids.
virtual void initialData ()
 Initialize data.
virtual void postInitialize ()
 Things to do after initialization.
virtual Real computeDt ()
 Returns the dt computed earlier for this level.
virtual Real computeInitialDt ()
 Compute dt using initial data.
const LevelData< FArrayBox > & getStateNew () const
const LevelData< FArrayBox > & getStateOld () const
virtual LevelData< FArrayBox > * getPoissonRhs (const Real &a_time)
 get the RHS to Poisson eq., interpolated to a_time
virtual LevelData< FArrayBox > * getPhi (const Real &a_time)
 get the Phi, the gravitational potential
virtual void gravity (const int a_baseLevel, const bool a_srceCorr=true)
 Solves Poisson eq. on the hierarchy of this and higher levels.
virtual void computeForce ()
 Overloaded version (see below) to be called by gravity().
virtual void postElliptic (const int a_baseLevel)
virtual void secondOrderCorrection ()
 compute 2nd order corrections for gravity source term
virtual void isThisFinestLev (const bool a_isThisFinestLev)
 set boolean stating whether or not this is the finest lev.
virtual bool isThisFinestLev () const
 return bool stating whether or not this is the finest level.
bool allDefined () const

Protected Member Functions

DisjointBoxLayout loadBalance (const Vector< Box > &a_grids)
void levelSetup ()
AMRLevelSelfGravitygetCoarserLevel () const
AMRLevelSelfGravitygetFinerLevel () const
void makePoissonRhs (LevelData< FArrayBox > &a_rhs, const LevelData< FArrayBox > &a_U, const Real &a_time)
void computeForce (LevelData< ForceBox > &a_force, LevelData< FArrayBox > &a_phi, const Real &a_time)
void setupSourceTerm (LevelData< FArrayBox > &a_source, const LevelData< FArrayBox > &a_U, const LevelData< ForceBox > &a_force, const Real &a_time, const Real &a_dt)

Protected Attributes

LevelData< FArrayBoxm_UOld
LevelData< FArrayBoxm_UNew
LevelData< FArrayBoxm_phiOld
LevelData< FArrayBoxm_phiNew
LevelData< FArrayBoxm_deltaPhi
LevelData< ForceBox > m_forceOld
LevelData< ForceBox > m_forceNew
LevelData< FArrayBoxm_rhs
LevelData< FArrayBoxm_rhsCrseNew
LevelData< FArrayBoxm_rhsCrseOld
Real m_rhsOffset
Real m_cfl
Real m_dx
Real m_dtNew
Real m_dtOld
int m_numStates
Vector< string > m_stateNames
Vector< string > m_plotNames
int m_numGhost
int m_numRhsGhost
int m_numPhiGhost
int m_numForceGhost
int m_nLevForceComp
Real m_domainLength
CodeUnits m_units
bool m_useDeltaPhiCorr
FineInterp m_fineInterp
CoarseAverage m_coarseAverage
FineInterp m_fineInterpPhi
CoarseAverage m_coarseAveragePhi
PiecewiseLinearFillPatch m_patcher
QuadCFInterp m_quadCFInterp
PiecewiseLinearFillPatch m_forcePatcher
LevelGodunov m_levelGodunov
LevelSolver m_levelSolver
LevelFluxRegister m_fluxRegister
Gradientm_gradient
SelfGravityPhysicsm_gdnvPhysics
LevelOpm_poissonOp
RefCellTaggerm_refCellTagger
int m_maxInitRefLevel
int m_tagBufferSize
bool m_hasCoarser
bool m_hasFiner
bool m_isThisFinestLev
int m_normalPredOrder
bool m_useFourthOrderSlopes
bool m_usePrimLimiting
bool m_useCharLimiting
bool m_useFlattening
bool m_useArtificialViscosity
Real m_artificialViscosity
DisjointBoxLayout m_grids
bool m_paramsDefined

Detailed Description

AMRLevel-derived class for AMR self gravity code.


Constructor & Destructor Documentation

AMRLevelSelfGravity::AMRLevelSelfGravity  ) 
 

Constructor.

virtual AMRLevelSelfGravity::~AMRLevelSelfGravity  )  [virtual]
 

Destructor.


Member Function Documentation

virtual Real AMRLevelSelfGravity::advance  )  [virtual]
 

Advance by one timestep.

Implements AMRLevel< TTYPE >.

bool AMRLevelSelfGravity::allDefined  )  const
 

virtual Real AMRLevelSelfGravity::computeDt  )  [virtual]
 

Returns the dt computed earlier for this level.

Implements AMRLevel< TTYPE >.

void AMRLevelSelfGravity::computeForce LevelData< ForceBox > &  a_force,
LevelData< FArrayBox > &  a_phi,
const Real a_time
[protected]
 

virtual void AMRLevelSelfGravity::computeForce  )  [virtual]
 

Overloaded version (see below) to be called by gravity().

virtual Real AMRLevelSelfGravity::computeInitialDt  )  [virtual]
 

Compute dt using initial data.

Implements AMRLevel< TTYPE >.

virtual void AMRLevelSelfGravity::define AMRLevel a_coarserLevelPtr,
const ProblemDomain a_problemDomain,
int  a_level,
int  a_refRatio
[virtual]
 

Define new AMR level.

Reimplemented from AMRLevel< TTYPE >.

virtual void AMRLevelSelfGravity::define AMRLevel a_coarserLevelPtr,
const Box a_problemDomain,
int  a_level,
int  a_refRatio
[virtual]
 

This instance should never get called - historical.

Reimplemented from AMRLevel< TTYPE >.

void AMRLevelSelfGravity::defineParams const Real a_cfl,
const Real a_domainLength,
const int &  a_verbosity,
const int &  a_tagBufferSize,
const int &  a_maxInitRefLevel,
const Real a_initialDtMultiplier,
const GodunovPhysics *const   a_godunovPhysics,
const int &  a_normalPredOrder,
const bool &  a_useFourthOrderSlopes,
const bool &  a_usePrimLimiting,
const bool &  a_useCharLimiting,
const bool &  a_useFlattening,
const bool &  a_useArtificialViscosity,
const Real a_artificialViscosity,
const RefCellTagger *const   a_refCellTagger,
const LevelOp *const   a_poissonOp,
const bool &  a_useDeltaPhiCorr,
const StencilType a_stencil,
const CodeUnits a_codeUnits
 

Define the parameters the object needs.

AMRLevelSelfGravity* AMRLevelSelfGravity::getCoarserLevel  )  const [protected]
 

AMRLevelSelfGravity* AMRLevelSelfGravity::getFinerLevel  )  const [protected]
 

virtual LevelData<FArrayBox>* AMRLevelSelfGravity::getPhi const Real a_time  )  [virtual]
 

get the Phi, the gravitational potential

virtual LevelData<FArrayBox>* AMRLevelSelfGravity::getPoissonRhs const Real a_time  )  [virtual]
 

get the RHS to Poisson eq., interpolated to a_time

const LevelData<FArrayBox>& AMRLevelSelfGravity::getStateNew  )  const
 

const LevelData<FArrayBox>& AMRLevelSelfGravity::getStateOld  )  const
 

virtual void AMRLevelSelfGravity::gravity const int  a_baseLevel,
const bool  a_srceCorr = true
[virtual]
 

Solves Poisson eq. on the hierarchy of this and higher levels.

virtual void AMRLevelSelfGravity::initialData  )  [virtual]
 

Initialize data.

Implements AMRLevel< TTYPE >.

virtual void AMRLevelSelfGravity::initialGrid const Vector< Box > &  a_newGrids  )  [virtual]
 

Initialize grids.

Implements AMRLevel< TTYPE >.

virtual bool AMRLevelSelfGravity::isThisFinestLev  )  const [virtual]
 

return bool stating whether or not this is the finest level.

virtual void AMRLevelSelfGravity::isThisFinestLev const bool  a_isThisFinestLev  )  [virtual]
 

set boolean stating whether or not this is the finest lev.

void AMRLevelSelfGravity::levelSetup  )  [protected]
 

DisjointBoxLayout AMRLevelSelfGravity::loadBalance const Vector< Box > &  a_grids  )  [protected]
 

void AMRLevelSelfGravity::makePoissonRhs LevelData< FArrayBox > &  a_rhs,
const LevelData< FArrayBox > &  a_U,
const Real a_time
[protected]
 

virtual void AMRLevelSelfGravity::postElliptic const int  a_baseLevel  )  [virtual]
 

virtual void AMRLevelSelfGravity::postInitialize  )  [virtual]
 

Things to do after initialization.

Implements AMRLevel< TTYPE >.

virtual void AMRLevelSelfGravity::postRegrid int  a_base_level  )  [virtual]
 

postRegridding ops

Reimplemented from AMRLevel< TTYPE >.

virtual void AMRLevelSelfGravity::postTimeStep  )  [virtual]
 

Things to do after a timestep.

Implements AMRLevel< TTYPE >.

virtual void AMRLevelSelfGravity::regrid const Vector< Box > &  a_newGrids  )  [virtual]
 

Set up data on this level after regridding.

Implements AMRLevel< TTYPE >.

virtual void AMRLevelSelfGravity::secondOrderCorrection  )  [virtual]
 

compute 2nd order corrections for gravity source term

void AMRLevelSelfGravity::setupSourceTerm LevelData< FArrayBox > &  a_source,
const LevelData< FArrayBox > &  a_U,
const LevelData< ForceBox > &  a_force,
const Real a_time,
const Real a_dt
[protected]
 

virtual void AMRLevelSelfGravity::tagCells IntVectSet a_tags  )  [virtual]
 

Create tags for regridding.

Implements AMRLevel< TTYPE >.

virtual void AMRLevelSelfGravity::tagCellsInit IntVectSet a_tags  )  [virtual]
 

Create tags at initialization.

Implements AMRLevel< TTYPE >.


Member Data Documentation

Real AMRLevelSelfGravity::m_artificialViscosity [protected]
 

Real AMRLevelSelfGravity::m_cfl [protected]
 

CoarseAverage AMRLevelSelfGravity::m_coarseAverage [protected]
 

CoarseAverage AMRLevelSelfGravity::m_coarseAveragePhi [protected]
 

LevelData<FArrayBox> AMRLevelSelfGravity::m_deltaPhi [protected]
 

Real AMRLevelSelfGravity::m_domainLength [protected]
 

Real AMRLevelSelfGravity::m_dtNew [protected]
 

Real AMRLevelSelfGravity::m_dtOld [protected]
 

Real AMRLevelSelfGravity::m_dx [protected]
 

FineInterp AMRLevelSelfGravity::m_fineInterp [protected]
 

FineInterp AMRLevelSelfGravity::m_fineInterpPhi [protected]
 

LevelFluxRegister AMRLevelSelfGravity::m_fluxRegister [protected]
 

LevelData<ForceBox> AMRLevelSelfGravity::m_forceNew [protected]
 

LevelData<ForceBox> AMRLevelSelfGravity::m_forceOld [protected]
 

PiecewiseLinearFillPatch AMRLevelSelfGravity::m_forcePatcher [protected]
 

SelfGravityPhysics* AMRLevelSelfGravity::m_gdnvPhysics [protected]
 

Gradient* AMRLevelSelfGravity::m_gradient [protected]
 

DisjointBoxLayout AMRLevelSelfGravity::m_grids [protected]
 

bool AMRLevelSelfGravity::m_hasCoarser [protected]
 

bool AMRLevelSelfGravity::m_hasFiner [protected]
 

bool AMRLevelSelfGravity::m_isThisFinestLev [protected]
 

LevelGodunov AMRLevelSelfGravity::m_levelGodunov [protected]
 

LevelSolver AMRLevelSelfGravity::m_levelSolver [protected]
 

int AMRLevelSelfGravity::m_maxInitRefLevel [protected]
 

int AMRLevelSelfGravity::m_nLevForceComp [protected]
 

int AMRLevelSelfGravity::m_normalPredOrder [protected]
 

int AMRLevelSelfGravity::m_numForceGhost [protected]
 

int AMRLevelSelfGravity::m_numGhost [protected]
 

int AMRLevelSelfGravity::m_numPhiGhost [protected]
 

int AMRLevelSelfGravity::m_numRhsGhost [protected]
 

int AMRLevelSelfGravity::m_numStates [protected]
 

bool AMRLevelSelfGravity::m_paramsDefined [protected]
 

PiecewiseLinearFillPatch AMRLevelSelfGravity::m_patcher [protected]
 

LevelData<FArrayBox> AMRLevelSelfGravity::m_phiNew [protected]
 

LevelData<FArrayBox> AMRLevelSelfGravity::m_phiOld [protected]
 

Vector<string> AMRLevelSelfGravity::m_plotNames [protected]
 

LevelOp* AMRLevelSelfGravity::m_poissonOp [protected]
 

QuadCFInterp AMRLevelSelfGravity::m_quadCFInterp [protected]
 

RefCellTagger* AMRLevelSelfGravity::m_refCellTagger [protected]
 

LevelData<FArrayBox> AMRLevelSelfGravity::m_rhs [protected]
 

LevelData<FArrayBox> AMRLevelSelfGravity::m_rhsCrseNew [protected]
 

LevelData<FArrayBox> AMRLevelSelfGravity::m_rhsCrseOld [protected]
 

Real AMRLevelSelfGravity::m_rhsOffset [protected]
 

Vector<string> AMRLevelSelfGravity::m_stateNames [protected]
 

int AMRLevelSelfGravity::m_tagBufferSize [protected]
 

LevelData<FArrayBox> AMRLevelSelfGravity::m_UNew [protected]
 

CodeUnits AMRLevelSelfGravity::m_units [protected]
 

LevelData<FArrayBox> AMRLevelSelfGravity::m_UOld [protected]
 

bool AMRLevelSelfGravity::m_useArtificialViscosity [protected]
 

bool AMRLevelSelfGravity::m_useCharLimiting [protected]
 

bool AMRLevelSelfGravity::m_useDeltaPhiCorr [protected]
 

bool AMRLevelSelfGravity::m_useFlattening [protected]
 

bool AMRLevelSelfGravity::m_useFourthOrderSlopes [protected]
 

bool AMRLevelSelfGravity::m_usePrimLimiting [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Oct 5 13:59:46 2005 for Chombo&AMRSelfGravity by  doxygen 1.4.1