Chombo + EB
3.0
|
Implements BackwardEuler algorithm to update solution to heat equation. More...
#include <LevelTGA.H>
Public Member Functions | |
LevelBackwardEuler (const Vector< DisjointBoxLayout > &a_grids, const Vector< int > &a_refRat, const ProblemDomain &a_level0Domain, RefCountedPtr< AMRLevelOpFactory< LevelData< FArrayBox > > > &a_opFact, const RefCountedPtr< AMRMultiGrid< LevelData< FArrayBox > > > &a_solver) | |
full constructor More... | |
virtual | ~LevelBackwardEuler () |
destructor More... | |
void | computeDiffusion (LevelData< FArrayBox > &a_DiffusiveTerm, LevelData< FArrayBox > &a_phiOld, LevelData< FArrayBox > &a_src, LevelFluxRegister *a_FineFluxRegPtr, LevelFluxRegister *a_crseFluxRegPtr, const LevelData< FArrayBox > *a_crsePhiOldPtr, const LevelData< FArrayBox > *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level) |
computes time-centered diffusive term for explicit updating More... | |
void | updateSoln (LevelData< FArrayBox > &a_phiNew, LevelData< FArrayBox > &a_phiOld, LevelData< FArrayBox > &a_src, LevelFluxRegister *a_fineFluxRegPtr, LevelFluxRegister *a_crseFluxRegPtr, const LevelData< FArrayBox > *a_crsePhiOldPtr, const LevelData< FArrayBox > *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level, bool a_zeroPhi=true, int a_fluxStartComponent=0) |
do solve More... | |
void | setSourceGhostCells (LevelData< FArrayBox > &a_src, const DisjointBoxLayout &a_grids, int a_level) |
Public Member Functions inherited from BaseLevelBackwardEuler< LevelData< FArrayBox >, FluxBox, LevelFluxRegister > | |
BaseLevelBackwardEuler (const Vector< DisjointBoxLayout > &a_grids, const Vector< int > &a_refRat, const ProblemDomain &a_level0Domain, RefCountedPtr< AMRLevelOpFactory< LevelData< FArrayBox > > > &a_opFact, const RefCountedPtr< AMRMultiGrid< LevelData< FArrayBox > > > &a_solver) | |
virtual | ~BaseLevelBackwardEuler () |
Destructor, called after destructors of BaseLevelBackwardEuler subclasses. More... | |
void | updateSoln (LevelData< FArrayBox > &a_phiNew, LevelData< FArrayBox > &a_phiOld, LevelData< FArrayBox > &a_src, LevelData< FluxBox > &a_flux, LevelFluxRegister *a_fineFluxRegPtr, LevelFluxRegister *a_crseFluxRegPtr, const LevelData< FArrayBox > *a_crsePhiOldPtr, const LevelData< FArrayBox > *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< FArrayBox >, FluxBox, LevelFluxRegister > | |
BaseLevelHeatSolver (const Vector< DisjointBoxLayout > &a_grids, const Vector< int > &a_refRat, const ProblemDomain &a_level0Domain, RefCountedPtr< AMRLevelOpFactory< LevelData< FArrayBox > > > &a_opFact, const RefCountedPtr< AMRMultiGrid< LevelData< FArrayBox > > > &a_solver) | |
virtual | ~BaseLevelHeatSolver () |
Destructor, called after destructors of BaseLevelHeatSolver subclasses. More... | |
virtual void | updateSoln (LevelData< FArrayBox > &a_phiNew, LevelData< FArrayBox > &a_phiOld, LevelData< FArrayBox > &a_src, LevelFluxRegister *a_fineFluxRegPtr, LevelFluxRegister *a_crseFluxRegPtr, const LevelData< FArrayBox > *a_crsePhiOldPtr, const LevelData< FArrayBox > *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) |
virtual void | computeDiffusion (LevelData< FArrayBox > &a_diffusiveTerm, LevelData< FArrayBox > &a_phiOld, LevelData< FArrayBox > &a_src, LevelData< FluxBox > &a_flux, LevelFluxRegister *a_fineFluxRegPtr, LevelFluxRegister *a_crseFluxRegPtr, const LevelData< FArrayBox > *a_crsePhiOldPtr, const LevelData< FArrayBox > *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< FArrayBox > &a_ans, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > *a_phiC, int a_level, Real a_alpha, Real a_beta, bool a_applyBC) |
void | applyHelm (LevelData< FArrayBox > &a_ans, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > *a_phiC, int a_level, Real a_mu, Real a_dt, bool a_homogeneousBC) |
void | incrementFlux (LevelData< FluxBox > &a_diffusiveFlux, LevelData< FArrayBox > &a_phi, int a_level, Real a_mu, Real a_dt, Real a_sign, bool a_setToZero) |
void | solveHelm (LevelData< FArrayBox > &a_phi, LevelData< FArrayBox > &a_phiC, LevelData< FArrayBox > &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< FArrayBox >, FluxBox > * | newOp (const ProblemDomain &a_indexSpace, RefCountedPtr< AMRLevelOpFactory< LevelData< FArrayBox > > > &a_opFact) |
int | size () const |
Returns the number of grid levels on which this integrator operates. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister > | |
void | timeInterp (LevelData< FArrayBox > &a_data, const LevelData< FArrayBox > &a_oldData, const LevelData< FArrayBox > &a_newData, Real a_time, Real a_oldTime, Real a_newTime, int a_level) |
Protected Attributes inherited from BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister > | |
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< FArrayBox >, FluxBox > * > | m_ops |
RefCountedPtr< AMRMultiGrid< LevelData< FArrayBox > > > | m_solver |
The multigrid solver used to solve the Helmholtz equation. More... | |
Implements BackwardEuler algorithm to update solution to heat equation.
The LevelBackwardEuler class implements the Runge-Kutta-based approach to solving the heat equation due to Twizell, Gumel, and Arigu.
|
inline |
full constructor
|
inlinevirtual |
destructor
References LevelTGA::computeDiffusion(), LevelTGA::setSourceGhostCells(), and LevelTGA::updateSoln().
void LevelBackwardEuler::computeDiffusion | ( | LevelData< FArrayBox > & | a_DiffusiveTerm, |
LevelData< FArrayBox > & | a_phiOld, | ||
LevelData< FArrayBox > & | a_src, | ||
LevelFluxRegister * | a_FineFluxRegPtr, | ||
LevelFluxRegister * | a_crseFluxRegPtr, | ||
const LevelData< FArrayBox > * | a_crsePhiOldPtr, | ||
const LevelData< FArrayBox > * | a_crsePhiNewPtr, | ||
Real | a_oldTime, | ||
Real | a_crseOldTime, | ||
Real | a_crseNewTime, | ||
Real | a_dt, | ||
int | a_level | ||
) |
computes time-centered diffusive term for explicit updating
compute time-centered L(phi) for use in subsequent update operations. In this case, we do solve for phiNew, then subtract source and old phi back out to get L(phi).
void LevelBackwardEuler::updateSoln | ( | LevelData< FArrayBox > & | a_phiNew, |
LevelData< FArrayBox > & | a_phiOld, | ||
LevelData< FArrayBox > & | a_src, | ||
LevelFluxRegister * | a_fineFluxRegPtr, | ||
LevelFluxRegister * | a_crseFluxRegPtr, | ||
const LevelData< FArrayBox > * | a_crsePhiOldPtr, | ||
const LevelData< FArrayBox > * | a_crsePhiNewPtr, | ||
Real | a_oldTime, | ||
Real | a_crseOldTime, | ||
Real | a_crseNewTime, | ||
Real | a_dt, | ||
int | a_level, | ||
bool | a_zeroPhi = true , |
||
int | a_fluxStartComponent = 0 |
||
) |
do solve
update phi to a_phiNew
void LevelBackwardEuler::setSourceGhostCells | ( | LevelData< FArrayBox > & | a_src, |
const DisjointBoxLayout & | a_grids, | ||
int | a_level | ||
) |