Chombo + EB + MF
3.2
|
#include <AMRFASMultiGrid.H>
Public Member Functions | |
AMRFASMultiGrid () | |
virtual | ~AMRFASMultiGrid () |
virtual void | define (const ProblemDomain &a_coarseDomain, AMRLevelOpFactory< T > &a_factory, LinearSolver< T > *a_bottomSolver, int a_numLevels) |
virtual void | solveNoInit (Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l_max, int l_base, bool a_zeroPhi=true, bool forceHomogeneous=false) |
void | setCycleType (OLD_FASMG_type a_type) |
void | setAvoidNorms (bool b=true) |
void | setNumVcycles (int n) |
Public Member Functions inherited from AMRMultiGrid< T > | |
AMRMultiGrid () | |
virtual | ~AMRMultiGrid () |
void | outputAMR (Vector< T *> &a_data, string &a_name, int a_lmax, int a_lbase) |
void | addInspector (RefCountedPtr< AMRMultiGridInspector< T > > &a_inspector) |
virtual void | solve (Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l_max, int l_base, bool a_zeroPhi=true, bool forceHomogeneous=false) |
virtual void | solveNoInitResid (Vector< T *> &a_phi, Vector< T *> &a_finalResid, const Vector< T *> &a_rhs, int l_max, int l_base, bool a_zeroPhi=true, bool forceHomogeneous=false) |
use if you want final residual More... | |
void | relaxOnlyHomogeneous (Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l_max, int l_base) |
virtual void | AMRVCycle (Vector< T *> &a_correction, Vector< T *> &a_residual, int l, int l_max, int l_base) |
void | setMGCycle (int a_numMG) |
void | revert (const Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l_max, int l_base) |
AMRLevelOp< T > & | levelOp (int level) |
Real | computeAMRResidual (Vector< T *> &a_resid, Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l_max, int l_base, bool a_homogeneousBC=false, bool a_computeNorm=true) |
Real | computeAMRResidual (Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l_max, int l_min) |
void | computeAMROperator (Vector< T *> &a_lph, Vector< T *> &a_phi, int l_max, int l_base, bool a_homogeneousBC=false) |
Vector< MGLevelOp< T > *> | getAllOperators () |
Vector< MGLevelOp< T > *> | getOperatorsOp () |
Vector< Vector< MGLevelOp< T > *> > | getOperatorsMG () |
Vector< AMRLevelOp< T > *> & | getAMROperators () |
void | setSolverParameters (const int &a_pre, const int &a_post, const int &a_bottom, const int &a_numMG, const int &a_iterMax, const Real &a_eps, const Real &a_hang, const Real &a_normThresh) |
void | setBottomSolver (int l_max, int l_base) |
set up bottom solver for internal MG solver More... | |
void | setBottomSolverEpsCushion (Real a_bottomSolverEpsCushion) |
void | getInfo () const |
Dump out the state of the solver. AMR levels, MG levels, bottom solver, box counts, etc. More... | |
Public Attributes | |
int | m_iter |
Real | m_initial_rnorm |
Real | m_rnorm |
Public Attributes inherited from AMRMultiGrid< T > | |
Real | m_eps |
Real | m_hang |
Real | m_normThresh |
bool | m_solverParamsSet |
int | m_imin |
int | m_iterMax |
int | m_iterMin |
int | m_verbosity |
int | m_exitStatus |
int | m_pre |
int | m_post |
int | m_bottom |
int | m_numMG |
int | m_maxDepth |
max no. of coarsenings – -1 (default) means coarsen as far as possible More... | |
Real | m_convergenceMetric |
Real | m_initial_rnorm |
initial residual from this solve More... | |
Real | m_bottomSolverEpsCushion |
Private Member Functions | |
virtual void | FMG (Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l, int l_max, int l_base) |
virtual void | VCycle (Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l, int l_max, int l_base) |
virtual void | init (const Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l_max, int l_base) |
void | clear_private () |
Private Attributes | |
OLD_FASMG_type | m_type |
bool | m_avoid_norms |
int | m_numVcycles |
Vector< Copier > | m_HOCopier |
Vector< Copier > | m_revHOCopier |
Vector< Copier > | m_HOCornerCopier |
ProblemDomain | m_coarseDomain |
Additional Inherited Members | |
Protected Member Functions inherited from AMRMultiGrid< T > | |
void | relax (T &phi, T &R, int depth, int nRelax=2) |
void | computeAMRResidualLevel (Vector< T *> &a_resid, Vector< T *> &a_phi, const Vector< T *> &a_rhs, int l_max, int l_base, int ilev, bool a_homogeneousBC) |
void | clear () |
Protected Attributes inherited from AMRMultiGrid< T > | |
Vector< AMRLevelOp< T > * > | m_op |
Vector< MultiGrid< T > * > | m_mg |
Vector< T * > | m_correction |
Vector< T * > | m_residual |
Vector< T * > | m_resC |
Vector< Copier > | m_resCopier |
Vector< Copier > | m_reverseCopier |
NoOpSolver< T > | m_nosolve |
LinearSolver< T > * | m_bottomSolver |
Vector< char > | m_hasInitBeenCalled |
Class to solve elliptic equations using the FAS multigrid
AMRFASMultiGrid< T >::AMRFASMultiGrid | ( | ) |
|
virtual |
References CH_TIME, and AMRFASMultiGrid< T >::clear_private().
|
virtual |
Define the solver. a_coarseDomain is the index space on the coarsest AMR level. a_factory is the operator factory through which all special information is conveyed. a_bottomSolver is the solver to be used at the termination of multigrid coarsening. It is the client's responsibility to free up the dynamically-allocated memory. a_numLevels is the number of AMR levels.
Reimplemented from AMRMultiGrid< T >.
References CH_TIME, AMRMultiGrid< T >::define(), AMRFASMultiGrid< T >::m_coarseDomain, AMRFASMultiGrid< T >::m_HOCopier, AMRFASMultiGrid< T >::m_HOCornerCopier, AMRMultiGrid< T >::m_maxDepth, AMRMultiGrid< T >::m_mg, AMRMultiGrid< T >::m_nosolve, AMRMultiGrid< T >::m_op, AMRFASMultiGrid< T >::m_revHOCopier, ProblemDomain::refine(), AMRLevelOpFactory< T >::refToFiner(), and Vector< T >::resize().
|
virtual |
same as "solve" except user has taken the reponsibility of having previously called "init" so solver can allocate temporary holders.
Reimplemented from AMRMultiGrid< T >.
References CH_assert, CH_START, CH_STOP, CH_TIME, CH_TIMER, CH_TIMERS, AMRMultiGrid< T >::computeAMRResidual(), MayDay::Error(), AMRFASMultiGrid< T >::FMG(), FULL, AMRFASMultiGrid< T >::m_avoid_norms, AMRMultiGrid< T >::m_bottomSolver, AMRMultiGrid< T >::m_bottomSolverEpsCushion, AMRMultiGrid< T >::m_convergenceMetric, AMRMultiGrid< T >::m_eps, AMRMultiGrid< T >::m_exitStatus, AMRMultiGrid< T >::m_hang, AMRMultiGrid< T >::m_imin, AMRFASMultiGrid< T >::m_initial_rnorm, AMRFASMultiGrid< T >::m_iter, AMRMultiGrid< T >::m_iterMax, AMRMultiGrid< T >::m_iterMin, AMRMultiGrid< T >::m_normThresh, AMRMultiGrid< T >::m_op, AMRMultiGrid< T >::m_residual, AMRFASMultiGrid< T >::m_rnorm, AMRFASMultiGrid< T >::m_type, AMRMultiGrid< T >::m_verbosity, AMRMultiGrid< T >::outputAMR(), pout(), AMRMultiGrid< T >::setBottomSolver(), Vector< T >::size(), VCYCLE, and AMRFASMultiGrid< T >::VCycle().
|
inline |
References AMRFASMultiGrid< T >::m_type.
|
inline |
References AMRFASMultiGrid< T >::m_avoid_norms.
|
inline |
References AMRFASMultiGrid< T >::m_numVcycles.
|
privatevirtual |
References AMRFASMultiGrid< T >::m_HOCornerCopier, AMRMultiGrid< T >::m_mg, AMRFASMultiGrid< T >::m_numVcycles, AMRMultiGrid< T >::m_op, AMRMultiGrid< T >::m_resC, AMRMultiGrid< T >::m_residual, AMRFASMultiGrid< T >::m_revHOCopier, and AMRFASMultiGrid< T >::VCycle().
Referenced by AMRFASMultiGrid< T >::solveNoInit().
|
privatevirtual |
References CH_TIME, Vector< T >::clear(), AMRMultiGrid< T >::computeAMRResidualLevel(), AMRMultiGrid< T >::m_correction, AMRMultiGrid< T >::m_mg, AMRMultiGrid< T >::m_numMG, AMRMultiGrid< T >::m_op, AMRMultiGrid< T >::m_post, AMRMultiGrid< T >::m_pre, AMRMultiGrid< T >::m_resC, AMRMultiGrid< T >::m_resCopier, AMRMultiGrid< T >::m_residual, AMRMultiGrid< T >::m_reverseCopier, and FASMultiGrid< T >::oneCycle().
Referenced by AMRFASMultiGrid< T >::FMG(), and AMRFASMultiGrid< T >::solveNoInit().
|
privatevirtual |
Reimplemented from AMRMultiGrid< T >.
References CH_TIME, AMRMultiGrid< T >::init(), AMRFASMultiGrid< T >::m_coarseDomain, AMRFASMultiGrid< T >::m_HOCopier, AMRFASMultiGrid< T >::m_HOCornerCopier, AMRMultiGrid< T >::m_op, AMRMultiGrid< T >::m_resC, AMRFASMultiGrid< T >::m_revHOCopier, ProblemDomain::refine(), and AMRLevelOp< T >::refToCoarser().
|
private |
References CH_TIME, AMRMultiGrid< T >::m_op, and Vector< T >::size().
Referenced by AMRFASMultiGrid< T >::~AMRFASMultiGrid().
int AMRFASMultiGrid< T >::m_iter |
Referenced by AMRFASMultiGrid< T >::solveNoInit().
Real AMRFASMultiGrid< T >::m_initial_rnorm |
Referenced by AMRFASMultiGrid< T >::solveNoInit().
Real AMRFASMultiGrid< T >::m_rnorm |
Referenced by AMRFASMultiGrid< T >::solveNoInit().
|
private |
|
private |
|
private |
|
private |
Referenced by AMRFASMultiGrid< T >::define(), and AMRFASMultiGrid< T >::init().
|
private |
Referenced by AMRFASMultiGrid< T >::define(), AMRFASMultiGrid< T >::FMG(), and AMRFASMultiGrid< T >::init().
|
private |
Referenced by AMRFASMultiGrid< T >::define(), AMRFASMultiGrid< T >::FMG(), and AMRFASMultiGrid< T >::init().
|
private |
Referenced by AMRFASMultiGrid< T >::define(), and AMRFASMultiGrid< T >::init().