Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

GenLevelSolver< T > Class Template Reference

Solves elliptic equations on a level. More...

#include <GenLevelSolver.H>

Collaboration diagram for GenLevelSolver< T >:

Collaboration graph
[legend]
List of all members.

Public Methods

 GenLevelSolver ()
 GenLevelSolver (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_baseGrids, const Box &a_domain, Real a_dxLevel, int a_nRefCrse, const GenLevelMGOp< T > *const a_opin, int a_ncomp=1)
 GenLevelSolver (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_baseGrids, const ProblemDomain &a_domain, Real a_dxLevel, int a_nRefCrse, const GenLevelMGOp< T > *const a_opin, int a_ncomp)
virtual ~GenLevelSolver ()
bool isDefined () const
virtual void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_baseGrids, const Box &a_domain, Real a_dxLevel, int a_nRefCrse, const GenLevelMGOp< T > *const a_opin, int a_ncomp=1)
 Full define function.

virtual void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_baseGrids, const ProblemDomain &a_domain, Real a_dxLevel, int a_nRefCrse, const GenLevelMGOp< T > *const a_opin, int a_ncomp=1)
 Full define function.

void clearMemory ()
void setDefaultValues ()
void levelSolveH (T &a_phi, const T &a_rhs, bool a_initializePhiToZero=true)
void levelSolve (T &a_phi, const T *a_phic, const T &a_rhs, bool a_initializePhiToZero=true)
void setTolerance (Real a_tolerance)
 set solution tolerance

void setOperatorTolerance (Real a_operatorTolerance)
void setVerbose (bool a_verbose)
void setMaxIter (int a_maxIter)
 set max number multigrid vcycles to use in solution

void setMinIter (int a_minIter)

Protected Attributes

GenLevelMG< T > m_levelMG
GenLevelMGOp< T > * m_levelOpPtr
bool m_isDefined
DisjointBoxLayout m_grids
ProblemDomain m_domain
m_resid
m_scratch
m_corr
int m_nRefCrse
Real m_dxLevel
int m_maxIter
int m_minIter
Real m_tolerance
Real m_operatorTolerance
bool m_verbose

Private Methods

 GenLevelSolver (const GenLevelSolver< T > &)
void operator= (const GenLevelSolver< T > &)

Detailed Description

template<class T>
class GenLevelSolver< T >

Solves elliptic equations on a level.

GenLevelSolver Solves elliptic equations on a level using multigrid.


Constructor & Destructor Documentation

template<class T>
GenLevelSolver< T >::GenLevelSolver  
 

Default constructor leaves GenLevelSolver undefined.

template<class T>
GenLevelSolver< T >::GenLevelSolver const DisjointBoxLayout   a_grids,
const DisjointBoxLayout   a_baseGrids,
const Box   a_domain,
Real    a_dxLevel,
int    a_nRefCrse,
const GenLevelMGOp< T > *const    a_opin,
int    a_ncomp = 1
 

Full constructor. Calls full define function.\ {\bf Inputs:} \ a_grids: Grid on which solution will be computed. \ a_baseGrids: pointer to next coarser grids. Should be == NULL if there is no coarser level. \ a_domain: domain of solution level \ a_dxLevel: grid spacing at solution level \ a_nRefCrse: refinement ratio between two levels. Not used if there is no finer level \ a_opin: operator L used in solution of Lphi = rho

template<class T>
GenLevelSolver< T >::GenLevelSolver const DisjointBoxLayout   a_grids,
const DisjointBoxLayout   a_baseGrids,
const ProblemDomain   a_domain,
Real    a_dxLevel,
int    a_nRefCrse,
const GenLevelMGOp< T > *const    a_opin,
int    a_ncomp
 

Full constructor. Calls full define function.\ {\bf Inputs:} \ a_grids: Grid on which solution will be computed. \ a_baseGrids: pointer to next coarser grids. Should be == NULL if there is no coarser level. \ a_domain: domain of solution level \ a_dxLevel: grid spacing at solution level \ a_nRefCrse: refinement ratio between two levels. Not used if there is no finer level \ a_opin: operator L used in solution of Lphi = rho

template<class T>
GenLevelSolver< T >::~GenLevelSolver   [virtual]
 

template<class T>
GenLevelSolver< T >::GenLevelSolver const GenLevelSolver< T > &    [inline, private]
 


Member Function Documentation

template<class T>
void GenLevelSolver< T >::clearMemory  
 

template<class T>
void GenLevelSolver< T >::define const DisjointBoxLayout   a_grids,
const DisjointBoxLayout   a_baseGrids,
const ProblemDomain   a_domain,
Real    a_dxLevel,
int    a_nRefCrse,
const GenLevelMGOp< T > *const    a_opin,
int    a_ncomp = 1
[virtual]
 

Full define function.

Full define function.\ {\bf Inputs:} \ a_grids: Grid on which solution will be computed. \ a_baseGrids: pointer to next coarser grids. Should be == NULL if there is no coarser level. \ a_domain: domain of solution level \ a_dxLevel: grid spacing at solution level \ a_nRefCrse: refinement ratio between two levels. Not used if there is no finer level \ a_opin: operator L used in solution of Lphi = rho

template<class T>
void GenLevelSolver< T >::define const DisjointBoxLayout   a_grids,
const DisjointBoxLayout   a_baseGrids,
const Box   a_domain,
Real    a_dxLevel,
int    a_nRefCrse,
const GenLevelMGOp< T > *const    a_opin,
int    a_ncomp = 1
[virtual]
 

Full define function.

Full define function.\ {\bf Inputs:} \ a_grids: Grid on which solution will be computed. \ a_baseGrids: pointer to next coarser grids. Should be == NULL if there is no coarser level. \ a_domain: domain of solution level \ a_dxLevel: grid spacing at solution level \ a_nRefCrse: refinement ratio between two levels. Not used if there is no finer level \ a_opin: operator L used in solution of Lphi = rho

template<class T>
bool GenLevelSolver< T >::isDefined   const
 

template<class T>
void GenLevelSolver< T >::levelSolve T &    a_phi,
const T *    a_phic,
const T &    a_rhs,
bool    a_initializePhiToZero = true
 

do a level solve on this level using multigrid uses inhomogeneous bcs at interfaces\ {\bf Inputs:} \ phi: initial guess at solution. phic: solution at next coarser level. should be == NULL if there is no coarser level. rhs: right-hand side. \ {\bf Outputs:} \ phi: solution.

template<class T>
void GenLevelSolver< T >::levelSolveH T &    a_phi,
const T &    a_rhs,
bool    a_initializePhiToZero = true
 

do a level solve on this level using multigrid uses homogeneous bcs at coarse/fine interfaces \ {\bf Inputs:} \ phi: initial guess at solution. rhs: right-hand side. \ {\bf Outputs:} \ phi: solution.

template<class T>
void GenLevelSolver< T >::operator= const GenLevelSolver< T > &    [inline, private]
 

template<class T>
void GenLevelSolver< T >::setDefaultValues  
 

template<class T>
void GenLevelSolver< T >::setMaxIter int    a_maxIter
 

set max number multigrid vcycles to use in solution

template<class T>
void GenLevelSolver< T >::setMinIter int    a_minIter
 

Set min number of iterations. Only relevant when residual is not decreasing fast enough to satisfy the "operator tolerance". Default is 4.

template<class T>
void GenLevelSolver< T >::setOperatorTolerance Real    a_operatorTolerance
 

Set "operator tolerance" of iterative solution. Iteration will stop if (new_residual/old_residual) > 1-operatorTolerance (and at least minIter iterations have been performed). Default is 1.0e-5.

template<class T>
void GenLevelSolver< T >::setTolerance Real    a_tolerance
 

set solution tolerance

template<class T>
void GenLevelSolver< T >::setVerbose bool    a_verbose
 


Member Data Documentation

template<class T>
T GenLevelSolver< T >::m_corr [protected]
 

template<class T>
ProblemDomain GenLevelSolver< T >::m_domain [protected]
 

template<class T>
Real GenLevelSolver< T >::m_dxLevel [protected]
 

template<class T>
DisjointBoxLayout GenLevelSolver< T >::m_grids [protected]
 

template<class T>
bool GenLevelSolver< T >::m_isDefined [protected]
 

template<class T>
GenLevelMG<T> GenLevelSolver< T >::m_levelMG [protected]
 

template<class T>
GenLevelMGOp<T>* GenLevelSolver< T >::m_levelOpPtr [protected]
 

template<class T>
int GenLevelSolver< T >::m_maxIter [protected]
 

template<class T>
int GenLevelSolver< T >::m_minIter [protected]
 

template<class T>
int GenLevelSolver< T >::m_nRefCrse [protected]
 

template<class T>
Real GenLevelSolver< T >::m_operatorTolerance [protected]
 

template<class T>
T GenLevelSolver< T >::m_resid [protected]
 

template<class T>
T GenLevelSolver< T >::m_scratch [protected]
 

template<class T>
Real GenLevelSolver< T >::m_tolerance [protected]
 

template<class T>
bool GenLevelSolver< T >::m_verbose [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Apr 16 14:35:20 2003 for EBChombo by doxygen1.2.16