#include <LevelWaveOperator.H>
Public Member Functions | |
LevelWaveOperator () | |
Default constructor. | |
~LevelWaveOperator () | |
Destructor. | |
void | define (const DisjointBoxLayout &a_thisDisjointBoxLayout, const DisjointBoxLayout &a_coarserDisjointBoxLayout, const ProblemDomain &a_domain, const int &a_refineCoarse, const int &a_numStates, const Real &a_dx, const bool &a_hasCoarser, const bool &a_hasFiner) |
Actual constructor. | |
void | eval (LevelData< FArrayBox > &a_Phi, LevelData< FArrayBox > &a_LOfPhi, LevelFluxRegister &a_finerFluxRegister, LevelFluxRegister &a_coarserFluxRegister, const LevelData< FArrayBox > &a_phiCoarseOld, const Real &a_TCoarseOld, const LevelData< FArrayBox > &a_phiCoarseNew, const Real &a_TCoarseNew, Real a_time, Real a_fluxweight) |
Evaluate the operator at a given time. | |
void | avgdown (LevelData< FArrayBox > &a_Phi, LevelData< FArrayBox > &a_phiCoarse) |
Average down from the fine grid to the coarse grid. | |
Protected Attributes | |
bool | m_defined |
DisjointBoxLayout | m_grids |
QuadCFInterp | m_patcher |
Real | m_dx |
ProblemDomain | m_domain |
int | m_refineCoarse |
int | m_numFluxes |
int | m_numGhost |
int | m_numFields |
bool | m_hasCoarser |
bool | m_hasFiner |
Private Member Functions | |
void | operator= (const LevelWaveOperator &a_input) |
LevelWaveOperator (const LevelWaveOperator &a_input) |
LevelWaveOperator::LevelWaveOperator | ( | ) |
Default constructor.
Object requires define() to be called before all other functions.
LevelWaveOperator::~LevelWaveOperator | ( | ) |
LevelWaveOperator::LevelWaveOperator | ( | const LevelWaveOperator & | a_input | ) | [inline, private] |
References MayDay::Error().
void LevelWaveOperator::define | ( | const DisjointBoxLayout & | a_thisDisjointBoxLayout, | |
const DisjointBoxLayout & | a_coarserDisjointBoxLayout, | |||
const ProblemDomain & | a_domain, | |||
const int & | a_refineCoarse, | |||
const int & | a_numStates, | |||
const Real & | a_dx, | |||
const bool & | a_hasCoarser, | |||
const bool & | a_hasFiner | |||
) |
Actual constructor.
Inside the routine, we cast away const-ness on the data members for the assignment. The arguments passed in are maintained const (coding standards). a_refine is the refinement ratio between this level and the next coarser level. For the coarsest level, an empty DisjointBoxLayout is passed in for coarserDisjointBoxLayout.
void LevelWaveOperator::eval | ( | LevelData< FArrayBox > & | a_Phi, | |
LevelData< FArrayBox > & | a_LOfPhi, | |||
LevelFluxRegister & | a_finerFluxRegister, | |||
LevelFluxRegister & | a_coarserFluxRegister, | |||
const LevelData< FArrayBox > & | a_phiCoarseOld, | |||
const Real & | a_TCoarseOld, | |||
const LevelData< FArrayBox > & | a_phiCoarseNew, | |||
const Real & | a_TCoarseNew, | |||
Real | a_time, | |||
Real | a_fluxweight | |||
) |
Evaluate the operator at a given time.
For the coarsest level, phiCoarseOld and phiCoarseNew are empty LevelData<FArrayBox> objects. Also, either phiCoarseOld or phiCoarseNew might be empty to indicate that t(nf) = t(nc) the one grid is at the current time and interpolation is not required for boundary condition generation. phi must be defined on the same DisjointBoxLayouts as were used in define(). Coarse flux register is flux register with the next coarser level. Fine flux register is the flux register with the next finer level. To the finer level FR, this level is the coarse level. To the coarser level FR, this level is the fine level.
void LevelWaveOperator::avgdown | ( | LevelData< FArrayBox > & | a_Phi, | |
LevelData< FArrayBox > & | a_phiCoarse | |||
) |
Average down from the fine grid to the coarse grid.
This operator averages the solution from the fine grid onto the grid at the next coarser AMR level. Our averaging operator given as
phiCoarse = <phi> - h^2 <L(phi)>_2 / 24 .
Here <.> denotes the arithmetic average over the fine cells covered by each coarse cell, L(phi) is the (2*SpaceDim + 1)-point discretization of the Laplacian, with ghost cells set by QuadCFInterp, and <.>_2 is the average over the fine subblock of size 2 located in the center of the coarse cell.
void LevelWaveOperator::operator= | ( | const LevelWaveOperator & | a_input | ) | [inline, private] |
References MayDay::Error().
bool LevelWaveOperator::m_defined [protected] |
DisjointBoxLayout LevelWaveOperator::m_grids [protected] |
QuadCFInterp LevelWaveOperator::m_patcher [protected] |
Real LevelWaveOperator::m_dx [protected] |
ProblemDomain LevelWaveOperator::m_domain [protected] |
int LevelWaveOperator::m_refineCoarse [protected] |
int LevelWaveOperator::m_numFluxes [protected] |
int LevelWaveOperator::m_numGhost [protected] |
int LevelWaveOperator::m_numFields [protected] |
bool LevelWaveOperator::m_hasCoarser [protected] |
bool LevelWaveOperator::m_hasFiner [protected] |