Chombo + EB + MF  3.2
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
AMRFASMultiGrid< T > Class Template Reference

#include <AMRFASMultiGrid.H>

Inheritance diagram for AMRFASMultiGrid< T >:
Inheritance graph
[legend]

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< Copierm_HOCopier
 
Vector< Copierm_revHOCopier
 
Vector< Copierm_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< Copierm_resCopier
 
Vector< Copierm_reverseCopier
 
NoOpSolver< T > m_nosolve
 
LinearSolver< T > * m_bottomSolver
 
Vector< char > m_hasInitBeenCalled
 

Detailed Description

template<class T>
class AMRFASMultiGrid< T >

Class to solve elliptic equations using the FAS multigrid

Constructor & Destructor Documentation

◆ AMRFASMultiGrid()

template<class T >
AMRFASMultiGrid< T >::AMRFASMultiGrid ( )

◆ ~AMRFASMultiGrid()

template<class T >
AMRFASMultiGrid< T >::~AMRFASMultiGrid ( )
virtual

Member Function Documentation

◆ define()

template<class T >
void AMRFASMultiGrid< T >::define ( const ProblemDomain a_coarseDomain,
AMRLevelOpFactory< T > &  a_factory,
LinearSolver< T > *  a_bottomSolver,
int  a_numLevels 
)
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().

◆ solveNoInit()

template<class T >
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 
)
virtual

◆ setCycleType()

template<class T >
void AMRFASMultiGrid< T >::setCycleType ( OLD_FASMG_type  a_type)
inline

◆ setAvoidNorms()

template<class T >
void AMRFASMultiGrid< T >::setAvoidNorms ( bool  b = true)
inline

◆ setNumVcycles()

template<class T >
void AMRFASMultiGrid< T >::setNumVcycles ( int  n)
inline

◆ FMG()

template<class T >
void AMRFASMultiGrid< T >::FMG ( Vector< T *> &  a_phi,
const Vector< T *> &  a_rhs,
int  l,
int  l_max,
int  l_base 
)
privatevirtual

◆ VCycle()

template<class T >
void AMRFASMultiGrid< T >::VCycle ( Vector< T *> &  a_phi,
const Vector< T *> &  a_rhs,
int  l,
int  l_max,
int  l_base 
)
privatevirtual

◆ init()

template<class T >
void AMRFASMultiGrid< T >::init ( const Vector< T *> &  a_phi,
const Vector< T *> &  a_rhs,
int  l_max,
int  l_base 
)
privatevirtual

◆ clear_private()

template<class T >
void AMRFASMultiGrid< T >::clear_private ( )
private

Member Data Documentation

◆ m_iter

template<class T >
int AMRFASMultiGrid< T >::m_iter

◆ m_initial_rnorm

template<class T >
Real AMRFASMultiGrid< T >::m_initial_rnorm

◆ m_rnorm

template<class T >
Real AMRFASMultiGrid< T >::m_rnorm

◆ m_type

template<class T >
OLD_FASMG_type AMRFASMultiGrid< T >::m_type
private

◆ m_avoid_norms

template<class T >
bool AMRFASMultiGrid< T >::m_avoid_norms
private

◆ m_numVcycles

template<class T >
int AMRFASMultiGrid< T >::m_numVcycles
private

◆ m_HOCopier

template<class T >
Vector<Copier> AMRFASMultiGrid< T >::m_HOCopier
private

◆ m_revHOCopier

template<class T >
Vector<Copier> AMRFASMultiGrid< T >::m_revHOCopier
private

◆ m_HOCornerCopier

template<class T >
Vector<Copier> AMRFASMultiGrid< T >::m_HOCornerCopier
private

◆ m_coarseDomain

template<class T >
ProblemDomain AMRFASMultiGrid< T >::m_coarseDomain
private

The documentation for this class was generated from the following file: