Chombo + EB
3.0
|
#include <EBLevelTGA.H>
Public Member Functions | |
EBLevelCrankNicolson (const Vector< DisjointBoxLayout > &a_grids, const Vector< int > &a_refRat, const ProblemDomain &a_level0Domain, RefCountedPtr< AMRLevelOpFactory< LevelData< EBCellFAB > > > &a_opFact, const RefCountedPtr< AMRMultiGrid< LevelData< EBCellFAB > > > &a_solver) | |
virtual | ~EBLevelCrankNicolson () |
Destructor. More... | |
void | computeDiffusion (LevelData< EBCellFAB > &a_DiffusiveTerm, LevelData< EBCellFAB > &a_phiOld, LevelData< EBCellFAB > &a_src, EBFluxRegister *a_FineFluxRegPtr, EBFluxRegister *a_crseFluxRegPtr, const LevelData< EBCellFAB > *a_crsePhiOldPtr, const LevelData< EBCellFAB > *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level, bool a_zeroPhi=true, bool a_rhsAlreadyKappaWeighted=false) |
void | updateSoln (LevelData< EBCellFAB > &a_phiNew, LevelData< EBCellFAB > &a_phiOld, LevelData< EBCellFAB > &a_src, EBFluxRegister *a_fineFluxRegPtr, EBFluxRegister *a_crseFluxRegPtr, const LevelData< EBCellFAB > *a_crsePhiOldPtr, const LevelData< EBCellFAB > *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level, bool a_zeroPhi=true, bool a_rhsAlreadyKappaWeighted=false, int a_fluxStartComponent=0) |
void | setEBLG (Vector< EBLevelGrid > &a_eblg) |
Public Member Functions inherited from BaseLevelCrankNicolson< LevelData< EBCellFAB >, EBFluxFAB, EBFluxRegister > | |
BaseLevelCrankNicolson (const Vector< DisjointBoxLayout > &a_grids, const Vector< int > &a_refRat, const ProblemDomain &a_level0Domain, RefCountedPtr< AMRLevelOpFactory< LevelData< EBCellFAB > > > &a_opFact, const RefCountedPtr< AMRMultiGrid< LevelData< EBCellFAB > > > &a_solver) | |
virtual | ~BaseLevelCrankNicolson () |
Destructor, called after destructors of BaseLevelCrankNicolson subclasses. More... | |
void | updateSoln (LevelData< EBCellFAB > &a_phiNew, LevelData< EBCellFAB > &a_phiOld, LevelData< EBCellFAB > &a_src, LevelData< EBFluxFAB > &a_flux, EBFluxRegister *a_fineFluxRegPtr, EBFluxRegister *a_crseFluxRegPtr, const LevelData< EBCellFAB > *a_crsePhiOldPtr, const LevelData< EBCellFAB > *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level, bool a_zeroPhi=true, bool a_rhsAlreadyKappaWeighted=false, int a_fluxStartComponent=0) |
Public Member Functions inherited from BaseLevelHeatSolver< LevelData< EBCellFAB >, EBFluxFAB, EBFluxRegister > | |
BaseLevelHeatSolver (const Vector< DisjointBoxLayout > &a_grids, const Vector< int > &a_refRat, const ProblemDomain &a_level0Domain, RefCountedPtr< AMRLevelOpFactory< LevelData< EBCellFAB > > > &a_opFact, const RefCountedPtr< AMRMultiGrid< LevelData< EBCellFAB > > > &a_solver) | |
virtual | ~BaseLevelHeatSolver () |
Destructor, called after destructors of BaseLevelHeatSolver subclasses. More... | |
virtual void | computeDiffusion (LevelData< EBCellFAB > &a_diffusiveTerm, LevelData< EBCellFAB > &a_phiOld, LevelData< EBCellFAB > &a_src, LevelData< EBFluxFAB > &a_flux, EBFluxRegister *a_fineFluxRegPtr, EBFluxRegister *a_crseFluxRegPtr, const LevelData< EBCellFAB > *a_crsePhiOldPtr, const LevelData< EBCellFAB > *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level, bool a_zeroPhi=true, bool a_rhsAlreadyKappaWeighted=false) |
virtual void | applyOperator (LevelData< EBCellFAB > &a_ans, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > *a_phiC, int a_level, Real a_alpha, Real a_beta, bool a_applyBC) |
void | applyHelm (LevelData< EBCellFAB > &a_ans, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > *a_phiC, int a_level, Real a_mu, Real a_dt, bool a_homogeneousBC) |
void | incrementFlux (LevelData< EBFluxFAB > &a_diffusiveFlux, LevelData< EBCellFAB > &a_phi, int a_level, Real a_mu, Real a_dt, Real a_sign, bool a_setToZero) |
void | solveHelm (LevelData< EBCellFAB > &a_phi, LevelData< EBCellFAB > &a_phiC, LevelData< EBCellFAB > &a_rhs, int a_level, Real a_mu, Real a_dt, bool a_zeroPhi=true) |
void | resetSolverAlphaAndBeta (const Real &a_alpha, const Real &a_beta) |
virtual LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * | newOp (const ProblemDomain &a_indexSpace, RefCountedPtr< AMRLevelOpFactory< LevelData< EBCellFAB > > > &a_opFact) |
int | size () const |
Returns the number of grid levels on which this integrator operates. More... | |
Protected Attributes | |
bool | m_isEBLGSet |
Vector< EBLevelGrid > | m_eblg |
Protected Attributes inherited from BaseLevelHeatSolver< LevelData< EBCellFAB >, EBFluxFAB, EBFluxRegister > | |
Vector< DisjointBoxLayout > | m_grids |
The disjoint box layouts at every AMR grid level. More... | |
Vector< int > | m_refRat |
The refinement ratios between AMR grid levels. More... | |
ProblemDomain | m_level0Domain |
The coarsest domain on which the Helmholtz equation is integrated. More... | |
Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * > | m_ops |
RefCountedPtr< AMRMultiGrid< LevelData< EBCellFAB > > > | m_solver |
The multigrid solver used to solve the Helmholtz equation. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from BaseLevelHeatSolver< LevelData< EBCellFAB >, EBFluxFAB, EBFluxRegister > | |
void | timeInterp (LevelData< EBCellFAB > &a_data, const LevelData< EBCellFAB > &a_oldData, const LevelData< EBCellFAB > &a_newData, Real a_time, Real a_oldTime, Real a_newTime, int a_level) |
This class implements an imlplicit integrator for a diffusion equation using an approach devised by Twizzell, Gumel, and Arigu.
|
inline |
Create a new CrankNicolson level integrator.
a_grids | The disjoint box layout on which the level integrator is defined. |
a_refRat | The refinement ratios for the boxes. |
a_level0Domain | The coarsest grid level defining the problem domain. |
a_opFact | A factory that generates level diffusion operators. |
a_solver | A multigrid solver. |
References EBLevelTGA::m_isEBLGSet.
|
inlinevirtual |
Destructor.
References EBLevelTGA::computeDiffusion(), and EBLevelTGA::updateSoln().
void EBLevelCrankNicolson::computeDiffusion | ( | LevelData< EBCellFAB > & | a_DiffusiveTerm, |
LevelData< EBCellFAB > & | a_phiOld, | ||
LevelData< EBCellFAB > & | a_src, | ||
EBFluxRegister * | a_FineFluxRegPtr, | ||
EBFluxRegister * | a_crseFluxRegPtr, | ||
const LevelData< EBCellFAB > * | a_crsePhiOldPtr, | ||
const LevelData< EBCellFAB > * | a_crsePhiNewPtr, | ||
Real | a_oldTime, | ||
Real | a_crseOldTime, | ||
Real | a_crseNewTime, | ||
Real | a_dt, | ||
int | a_level, | ||
bool | a_zeroPhi = true , |
||
bool | a_rhsAlreadyKappaWeighted = false |
||
) |
Computes the time-centered diffusive term for explicit updating. This integrates the diffusion equation for a new value of a quantity phi and then computes the diffusion term using a finite difference stencil in time.
a_diffusionTerm | The term computed by this method. |
a_phiOld | The value of phi at the beginning of the time step, at the current grid level. |
a_src | The source term in the diffusion equation at the current grid level. |
a_fineFluxRegPtr | A pointer to the flux register at the finer adjacent grid level (or NULL if there is none). |
a_crseFluxRegPtr | A pointer to the flux register at the coarser adjacent grid level (or NULL if there is none). |
a_crsePhiOldPtr | A pointer to the LevelData object holding the old value of phi on the coarser adjacent grid level (or NULL if there is none). |
a_crsePhiNewPtr | A pointer to the LevelData object holding the updated value of phi on the coarser adjacent grid level (or NULL if there is none). |
a_oldTime | The time at the beginning of the integration step on the current grid level. |
a_crseOldTime | The time at the beginning of the integration step on the coarser adjacent grid level. |
a_crseNewTime | The time at the end of the integration step on the coarser adjacent grid level. |
a_dt | The time step on the current grid level. |
a_level | The current grid level. |
a_zeroPhi | If this flag is true, the initial estimate of phi will be set to zero. Otherwise, a_phiOld will be used. |
|
virtual |
Integrates the diffusion equation, storing the result in a_phiNew.
a_phiNew | The new value of phi at the current grid level. |
a_phiOld | The value of phi at the beginning of the time step, at the current grid level. |
a_src | The source term in the diffusion equation at the current grid level. |
a_fineFluxRegPtr | A pointer to the flux register at the finer adjacent grid level (or NULL if there is none). |
a_crseFluxRegPtr | A pointer to the flux register at the coarser adjacent grid level (or NULL if there is none). |
a_crsePhiOldPtr | A pointer to the LevelData object holding the old value of phi on the coarser adjacent grid level (or NULL if there is none). |
a_crsePhiNewPtr | A pointer to the LevelData object holding the updated value of phi on the coarser adjacent grid level (or NULL if there is none). |
a_oldTime | The time at the beginning of the integration step on the current grid level. |
a_crseOldTime | The time at the beginning of the integration step on the coarser adjacent grid level. |
a_crseNewTime | The time at the end of the integration step on the coarser adjacent grid level. |
a_dt | The time step on the current grid level. |
a_level | The current grid level. |
a_zeroPhi | If this flag is true, the initial estimate of phi will be set to zero. Otherwise, a_phiOld will be used. |
Reimplemented from BaseLevelHeatSolver< LevelData< EBCellFAB >, EBFluxFAB, EBFluxRegister >.
|
inline |
References EBLevelTGA::m_eblg, and EBLevelTGA::m_isEBLGSet.
|
protected |
|
protected |