#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 Attributes | |
int | m_iter |
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 |
AMRFASMultiGrid< T >::AMRFASMultiGrid | ( | ) | [inline] |
AMRFASMultiGrid< T >::~AMRFASMultiGrid | ( | ) | [inline, virtual] |
References CH_TIME, and AMRFASMultiGrid< T >::clear_private().
void AMRFASMultiGrid< T >::define | ( | const ProblemDomain & | a_coarseDomain, | |
AMRLevelOpFactory< T > & | a_factory, | |||
LinearSolver< T > * | a_bottomSolver, | |||
int | a_numLevels | |||
) | [inline, 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().
void AMRFASMultiGrid< T >::solveNoInit | ( | Vector< T * > & | a_phi, | |
const Vector< T * > & | a_rhs, | |||
int | l_max, | |||
int | l_base, | |||
bool | a_zeroPhi = true , |
|||
bool | forceHomogeneous = false | |||
) | [inline, 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_iter, AMRMultiGrid< T >::m_iterMax, AMRMultiGrid< T >::m_iterMin, AMRMultiGrid< T >::m_normThresh, AMRMultiGrid< T >::m_op, AMRMultiGrid< T >::m_residual, AMRFASMultiGrid< T >::m_type, AMRMultiGrid< T >::m_verbosity, AMRMultiGrid< T >::outputAMR(), pout(), AMRMultiGrid< T >::setBottomSolver(), Vector< T >::size(), AMRFASMultiGrid< T >::VCycle(), and VCYCLE.
void AMRFASMultiGrid< T >::setCycleType | ( | OLD_FASMG_type | a_type | ) | [inline] |
References AMRFASMultiGrid< T >::m_type.
void AMRFASMultiGrid< T >::setAvoidNorms | ( | bool | b = true |
) | [inline] |
References AMRFASMultiGrid< T >::m_avoid_norms.
void AMRFASMultiGrid< T >::setNumVcycles | ( | int | n | ) | [inline] |
References AMRFASMultiGrid< T >::m_numVcycles.
void AMRFASMultiGrid< T >::FMG | ( | Vector< T * > & | a_phi, | |
const Vector< T * > & | a_rhs, | |||
int | l, | |||
int | l_max, | |||
int | l_base | |||
) | [inline, private, virtual] |
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().
void AMRFASMultiGrid< T >::VCycle | ( | Vector< T * > & | a_phi, | |
const Vector< T * > & | a_rhs, | |||
int | l, | |||
int | l_max, | |||
int | l_base | |||
) | [inline, private, virtual] |
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().
void AMRFASMultiGrid< T >::init | ( | const Vector< T * > & | a_phi, | |
const Vector< T * > & | a_rhs, | |||
int | l_max, | |||
int | l_base | |||
) | [inline, private, virtual] |
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().
void AMRFASMultiGrid< T >::clear_private | ( | ) | [inline, 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().
OLD_FASMG_type AMRFASMultiGrid< T >::m_type [private] |
bool AMRFASMultiGrid< T >::m_avoid_norms [private] |
int AMRFASMultiGrid< T >::m_numVcycles [private] |
Vector<Copier> AMRFASMultiGrid< T >::m_HOCopier [private] |
Referenced by AMRFASMultiGrid< T >::define(), and AMRFASMultiGrid< T >::init().
Vector<Copier> AMRFASMultiGrid< T >::m_revHOCopier [private] |
Referenced by AMRFASMultiGrid< T >::define(), AMRFASMultiGrid< T >::FMG(), and AMRFASMultiGrid< T >::init().
Vector<Copier> AMRFASMultiGrid< T >::m_HOCornerCopier [private] |
Referenced by AMRFASMultiGrid< T >::define(), AMRFASMultiGrid< T >::FMG(), and AMRFASMultiGrid< T >::init().
ProblemDomain AMRFASMultiGrid< T >::m_coarseDomain [private] |
Referenced by AMRFASMultiGrid< T >::define(), and AMRFASMultiGrid< T >::init().