#include <FASMultiGrid.H>

Public Member Functions | |
| FASMultiGrid () | |
| virtual | ~FASMultiGrid () |
| virtual void | define (MGLevelOpFactory< T > &a_factory, LinearSolver< T > *a_bottomSolver, const ProblemDomain &a_domain, int a_maxDepth=-1, MGLevelOp< T > *a_finestLevelOp=NULL) |
| Function to define a FASMultiGrid object. | |
| virtual void | solve (T &a_phi, const T &a_rhs, Real a_tolerance, int a_maxIterations, int verbosity=0) |
| virtual void | oneCycle (T &a_e, const T &a_res) |
| Execute ONE v-cycle of multigrid. | |
| void | oneCycle (T &a_e, const T &a_res, T *a_phiCoarse) |
| virtual void | cycle (int a_depth, T &a_correction, const T &a_residual) |
Protected Attributes | |
| Vector< T * > | m_phiCoarse |
| FASMultiGrid< T >::FASMultiGrid | ( | ) | [inline] |
| FASMultiGrid< T >::~FASMultiGrid | ( | ) | [inline, virtual] |
References CH_TIME.
| void FASMultiGrid< T >::define | ( | MGLevelOpFactory< T > & | a_factory, | |
| LinearSolver< T > * | a_bottomSolver, | |||
| const ProblemDomain & | a_domain, | |||
| int | a_maxDepth = -1, |
|||
| MGLevelOp< T > * | a_finestLevelOp = NULL | |||
| ) | [inline, virtual] |
Function to define a FASMultiGrid object.
a_factory is the factory for generating operators. a_bottomSolver is called at the bottom of v-cycle. a_domain is the problem domain at the top of the vcycle. maxDepth defines the location of the bottom of the v-cycle. The vycle will terminate (hit bottom) when the factory returns NULL for a paticular depth if maxdepth = -1. Otherwise the vycle terminates at maxdepth.
Reimplemented from MultiGrid< T >.
References MultiGrid< T >::define(), and MultiGrid< T >::m_homogeneous.
| void FASMultiGrid< T >::solve | ( | T & | a_phi, | |
| const T & | a_rhs, | |||
| Real | a_tolerance, | |||
| int | a_maxIterations, | |||
| int | verbosity = 0 | |||
| ) | [inline, virtual] |
solve L(a_phi) = a_rhs. Tolerance is how much you want the norm of the error reduced. verbosity is how chatty you want the function to be. maxIterations is the maximum number of v-cycles. This does the whole residual correction switcharoo and calls oneCycle up to maxIterations times, evaluating the residual as it goes.
Reimplemented from MultiGrid< T >.
References CH_TIME, Vector< T >::clear(), FASMultiGrid< T >::cycle(), MultiGrid< T >::init(), MultiGrid< T >::m_op, Max(), and pout().
| void FASMultiGrid< T >::oneCycle | ( | T & | a_e, | |
| const T & | a_res | |||
| ) | [inline, virtual] |
Execute ONE v-cycle of multigrid.
If you want the solution to converge, you need to iterate this. See solve() or AMRFASMultiGrid::solve for a more automatic solve() function.
Reimplemented from MultiGrid< T >.
References CH_assert.
Referenced by AMRFASMultiGrid< T >::VCycle().
| void FASMultiGrid< T >::oneCycle | ( | T & | a_e, | |
| const T & | a_res, | |||
| T * | a_phiCoarse | |||
| ) | [inline] |
| void FASMultiGrid< T >::cycle | ( | int | a_depth, | |
| T & | a_correction, | |||
| const T & | a_residual | |||
| ) | [inline, virtual] |
Reimplemented from MultiGrid< T >.
References CH_TIME, Vector< T >::clear(), MayDay::Error(), MultiGrid< T >::m_bottom, MultiGrid< T >::m_correction, MultiGrid< T >::m_cycle, MultiGrid< T >::m_depth, MultiGrid< T >::m_op, FASMultiGrid< T >::m_phiCoarse, MultiGrid< T >::m_post, MultiGrid< T >::m_pre, and MultiGrid< T >::m_residual.
Referenced by FASMultiGrid< T >::oneCycle(), and FASMultiGrid< T >::solve().
Vector< T* > FASMultiGrid< T >::m_phiCoarse [protected] |
Referenced by FASMultiGrid< T >::cycle(), and FASMultiGrid< T >::oneCycle().
1.5.5