#include <BaseLevelTGA.H>
The ResistivitySolver class implements the Runge-Kutta-based approach to solving the heat equation due to Twizell, Gumel, and Arigu.
Public Member Functions | |
LevelTGAHelmOp< T, TFlux > * | newOp (const ProblemDomain &a_indexSpace, RefCountedPtr< AMRLevelOpFactory< T > > &a_opFact) |
BaseLevelTGA (const Vector< DisjointBoxLayout > &a_grids, const Vector< int > &a_refRat, const ProblemDomain &a_level0Domain, RefCountedPtr< AMRLevelOpFactory< T > > &a_opFact, const RefCountedPtr< AMRMultiGrid< T > > &a_solver) | |
full constructor | |
virtual | ~BaseLevelTGA () |
destructor | |
void | updateSoln (T &a_phiNew, T &a_phiOld, T &a_src, LevelData< TFlux > &a_flux, TFR *a_FineFluxRegPtr, TFR *a_CrseFluxRegPtr, const T *a_crsePhiOldPtr, const T *a_crsePhiNewPtr, Real oldTime, Real crseOldTime, Real crseNewTime, Real dt, int a_level, bool a_zeroPhi=true, int a_fluxStartComponent=0) |
do solve | |
void | computeDiffusion (T &a_DiffusiveTerm, T &a_phiOld, T &a_src, LevelData< TFlux > &a_flux, TFR *a_FineFluxRegPtr, TFR *a_crseFluxRegPtr, const T *a_crsePhiOldPtr, const T *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 | |
Protected Member Functions | |
void | incrementFlux (LevelData< TFlux > &a_diffusiveFlux, T &a_phi, int a_level, Real a_mu, Real a_dt, Real a_sign, bool a_setToZero) |
void | solveHelm (T &a_phi, T &a_phiC, T &a_rhs, int a_level, Real a_mu, Real a_dt, bool a_zeroPhi=true) |
void | applyHelm (T &a_ans, const T &a_phi, const T *a_phiC, int a_level, Real a_mu, Real a_dt, bool a_applyBC) |
void | resetSolverAlphaAndBeta (const Real &a_alpha, const Real &a_beta) |
void | timeInterp (T &a_data, const T &a_oldData, const T &a_newData, Real a_time, Real a_oldTime, Real a_newTime, int a_Lev) |
virtual void | setSourceGhostCells (T &a_src, const DisjointBoxLayout &a_dbl)=0 |
Protected Attributes | |
Vector< DisjointBoxLayout > | m_grids |
Vector< int > | m_refRat |
ProblemDomain | m_level0Domain |
Vector< RefCountedPtr < LevelTGAHelmOp< T, TFlux > > > | m_ops |
RefCountedPtr< AMRMultiGrid< T > > | m_solver |
Real | m_mu1 |
Real | m_mu2 |
Real | m_mu3 |
Real | m_mu4 |
Real | m_r1 |
Private Member Functions | |
void | operator= (const BaseLevelTGA &a_opin) |
BaseLevelTGA (BaseLevelTGA &a_opin) | |
BaseLevelTGA () | |
default constructor |
BaseLevelTGA< T, TFlux, TFR >::BaseLevelTGA | ( | const Vector< DisjointBoxLayout > & | a_grids, | |
const Vector< int > & | a_refRat, | |||
const ProblemDomain & | a_level0Domain, | |||
RefCountedPtr< AMRLevelOpFactory< T > > & | a_opFact, | |||
const RefCountedPtr< AMRMultiGrid< T > > & | a_solver | |||
) | [inline] |
full constructor
References BaseLevelTGA< T, TFlux, TFR >::m_grids, BaseLevelTGA< T, TFlux, TFR >::m_level0Domain, BaseLevelTGA< T, TFlux, TFR >::m_mu1, BaseLevelTGA< T, TFlux, TFR >::m_mu2, BaseLevelTGA< T, TFlux, TFR >::m_mu3, BaseLevelTGA< T, TFlux, TFR >::m_mu4, BaseLevelTGA< T, TFlux, TFR >::m_ops, BaseLevelTGA< T, TFlux, TFR >::m_r1, BaseLevelTGA< T, TFlux, TFR >::m_refRat, BaseLevelTGA< T, TFlux, TFR >::m_solver, BaseLevelTGA< T, TFlux, TFR >::newOp(), ProblemDomain::refine(), Vector< T >::resize(), and Vector< T >::size().
virtual BaseLevelTGA< T, TFlux, TFR >::~BaseLevelTGA | ( | ) | [inline, virtual] |
destructor
BaseLevelTGA< T, TFlux, TFR >::BaseLevelTGA | ( | BaseLevelTGA< T, TFlux, TFR > & | a_opin | ) | [inline, private] |
BaseLevelTGA< T, TFlux, TFR >::BaseLevelTGA | ( | ) | [inline, private] |
default constructor
LevelTGAHelmOp<T, TFlux>* BaseLevelTGA< T, TFlux, TFR >::newOp | ( | const ProblemDomain & | a_indexSpace, | |
RefCountedPtr< AMRLevelOpFactory< T > > & | a_opFact | |||
) | [inline] |
Referenced by BaseLevelTGA< T, TFlux, TFR >::BaseLevelTGA().
void BaseLevelTGA< T, TFlux, TFR >::updateSoln | ( | T & | a_phiNew, | |
T & | a_phiOld, | |||
T & | a_src, | |||
LevelData< TFlux > & | a_flux, | |||
TFR * | a_FineFluxRegPtr, | |||
TFR * | a_CrseFluxRegPtr, | |||
const T * | a_crsePhiOldPtr, | |||
const T * | a_crsePhiNewPtr, | |||
Real | oldTime, | |||
Real | crseOldTime, | |||
Real | crseNewTime, | |||
Real | dt, | |||
int | a_level, | |||
bool | a_zeroPhi = true , |
|||
int | a_fluxStartComponent = 0 | |||
) | [inline] |
do solve
update ALL components of phi
References BaseLevelTGA< T, TFlux, TFR >::applyHelm(), Vector< T >::assign(), BaseLevelTGA< T, TFlux, TFR >::incrementFlux(), BaseLevelTGA< T, TFlux, TFR >::m_grids, BaseLevelTGA< T, TFlux, TFR >::m_mu1, BaseLevelTGA< T, TFlux, TFR >::m_mu2, BaseLevelTGA< T, TFlux, TFR >::m_mu3, BaseLevelTGA< T, TFlux, TFR >::m_mu4, BaseLevelTGA< T, TFlux, TFR >::m_ops, BaseLevelTGA< T, TFlux, TFR >::m_r1, BaseLevelTGA< T, TFlux, TFR >::setSourceGhostCells(), Vector< T >::size(), BaseLevelTGA< T, TFlux, TFR >::solveHelm(), SpaceDim, and BaseLevelTGA< T, TFlux, TFR >::timeInterp().
Referenced by BaseLevelTGA< T, TFlux, TFR >::computeDiffusion().
void BaseLevelTGA< T, TFlux, TFR >::computeDiffusion | ( | T & | a_DiffusiveTerm, | |
T & | a_phiOld, | |||
T & | a_src, | |||
LevelData< TFlux > & | a_flux, | |||
TFR * | a_FineFluxRegPtr, | |||
TFR * | a_crseFluxRegPtr, | |||
const T * | a_crsePhiOldPtr, | |||
const T * | a_crsePhiNewPtr, | |||
Real | a_oldTime, | |||
Real | a_crseOldTime, | |||
Real | a_crseNewTime, | |||
Real | a_dt, | |||
int | a_level | |||
) | [inline] |
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).
References Vector< T >::assign(), BaseLevelTGA< T, TFlux, TFR >::m_ops, and BaseLevelTGA< T, TFlux, TFR >::updateSoln().
void BaseLevelTGA< T, TFlux, TFR >::incrementFlux | ( | LevelData< TFlux > & | a_diffusiveFlux, | |
T & | a_phi, | |||
int | a_level, | |||
Real | a_mu, | |||
Real | a_dt, | |||
Real | a_sign, | |||
bool | a_setToZero | |||
) | [inline, protected] |
References BaseLevelTGA< T, TFlux, TFR >::m_grids, and BaseLevelTGA< T, TFlux, TFR >::m_ops.
Referenced by BaseLevelTGA< T, TFlux, TFR >::updateSoln().
void BaseLevelTGA< T, TFlux, TFR >::solveHelm | ( | T & | a_phi, | |
T & | a_phiC, | |||
T & | a_rhs, | |||
int | a_level, | |||
Real | a_mu, | |||
Real | a_dt, | |||
bool | a_zeroPhi = true | |||
) | [inline, protected] |
solves helm(a_phi) = a_rhs, with a_phiC on coarser level; (I - a_mu*a_dt*laplacian)(a_phi) = a_rhs
References BaseLevelTGA< T, TFlux, TFR >::m_grids, BaseLevelTGA< T, TFlux, TFR >::m_ops, BaseLevelTGA< T, TFlux, TFR >::m_solver, pout(), BaseLevelTGA< T, TFlux, TFR >::resetSolverAlphaAndBeta(), and Vector< T >::size().
Referenced by BaseLevelTGA< T, TFlux, TFR >::updateSoln().
void BaseLevelTGA< T, TFlux, TFR >::applyHelm | ( | T & | a_ans, | |
const T & | a_phi, | |||
const T * | a_phiC, | |||
int | a_level, | |||
Real | a_mu, | |||
Real | a_dt, | |||
bool | a_applyBC | |||
) | [inline, protected] |
returns a_ans = helm(a_phi) with a_phiC pointer to coarser level = (I + a_mu*a_dt*laplacian)(a_phi)
the a_applyBC argument specifies both coarse-fine inhomogeneous BCs and domain boundary inhomogeneous BCs. Do them all, inhomogeneously, or do none of them.
References BaseLevelTGA< T, TFlux, TFR >::m_ops.
Referenced by BaseLevelTGA< T, TFlux, TFR >::updateSoln().
void BaseLevelTGA< T, TFlux, TFR >::resetSolverAlphaAndBeta | ( | const Real & | a_alpha, | |
const Real & | a_beta | |||
) | [inline, protected] |
sets alpha and beta in helmholtz operator
References BaseLevelTGA< T, TFlux, TFR >::m_ops, BaseLevelTGA< T, TFlux, TFR >::m_solver, TGAHelmOp< T >::setAlphaAndBeta(), and Vector< T >::size().
Referenced by BaseLevelTGA< T, TFlux, TFR >::solveHelm().
void BaseLevelTGA< T, TFlux, TFR >::timeInterp | ( | T & | a_data, | |
const T & | a_oldData, | |||
const T & | a_newData, | |||
Real | a_time, | |||
Real | a_oldTime, | |||
Real | a_newTime, | |||
int | a_Lev | |||
) | [inline, protected] |
returns a_data at time a_time, by interpolating from a_oldData at time a_oldTime, and a_newData at time a_newTime.
References BaseLevelTGA< T, TFlux, TFR >::m_ops.
Referenced by BaseLevelTGA< T, TFlux, TFR >::updateSoln().
virtual void BaseLevelTGA< T, TFlux, TFR >::setSourceGhostCells | ( | T & | a_src, | |
const DisjointBoxLayout & | a_dbl | |||
) | [protected, pure virtual] |
void BaseLevelTGA< T, TFlux, TFR >::operator= | ( | const BaseLevelTGA< T, TFlux, TFR > & | a_opin | ) | [inline, private] |
Vector<DisjointBoxLayout> BaseLevelTGA< T, TFlux, TFR >::m_grids [protected] |
Vector<int> BaseLevelTGA< T, TFlux, TFR >::m_refRat [protected] |
Referenced by BaseLevelTGA< T, TFlux, TFR >::BaseLevelTGA().
ProblemDomain BaseLevelTGA< T, TFlux, TFR >::m_level0Domain [protected] |
Referenced by BaseLevelTGA< T, TFlux, TFR >::BaseLevelTGA().
Vector<RefCountedPtr<LevelTGAHelmOp<T,TFlux> > > BaseLevelTGA< T, TFlux, TFR >::m_ops [protected] |
Referenced by BaseLevelTGA< T, TFlux, TFR >::applyHelm(), BaseLevelTGA< T, TFlux, TFR >::BaseLevelTGA(), BaseLevelTGA< T, TFlux, TFR >::computeDiffusion(), BaseLevelTGA< T, TFlux, TFR >::incrementFlux(), BaseLevelTGA< T, TFlux, TFR >::resetSolverAlphaAndBeta(), BaseLevelTGA< T, TFlux, TFR >::solveHelm(), BaseLevelTGA< T, TFlux, TFR >::timeInterp(), and BaseLevelTGA< T, TFlux, TFR >::updateSoln().
RefCountedPtr<AMRMultiGrid<T > > BaseLevelTGA< T, TFlux, TFR >::m_solver [protected] |
Real BaseLevelTGA< T, TFlux, TFR >::m_mu1 [protected] |
Real BaseLevelTGA< T, TFlux, TFR >::m_mu2 [protected] |
Real BaseLevelTGA< T, TFlux, TFR >::m_mu3 [protected] |
Real BaseLevelTGA< T, TFlux, TFR >::m_mu4 [protected] |
Real BaseLevelTGA< T, TFlux, TFR >::m_r1 [protected] |