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

LevelNodeSolver Class Reference

Solves elliptic equations on a level. More...

#include <LevelNodeSolver.H>

Collaboration diagram for LevelNodeSolver:

Collaboration graph
[legend]
List of all members.

Public Methods

 LevelNodeSolver ()
 {\bf constructors, destructor and defines}

 LevelNodeSolver (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_gridsCoarsePtr, const ProblemDomain &a_domain, Real a_dx, int a_refToCoarse, const NodeMaskLevelOp *const a_opin, int a_minLength=1)
 LevelNodeSolver (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_gridsCoarsePtr, const Box &a_domain, Real a_dx, int a_refToCoarse, const NodeMaskLevelOp *const a_opin, int a_minLength=1)
virtual ~LevelNodeSolver ()
virtual void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_gridsCoarsePtr, const ProblemDomain &a_domain, Real a_dx, int a_refToCoarse, const NodeMaskLevelOp *const a_opin, int a_minLength=1)
virtual void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_gridsCoarsePtr, const Box &a_domain, Real a_dx, int a_refToCoarse, const NodeMaskLevelOp *const a_opin, int a_minLength=1)
bool isDefined () const
 {\bf access functions}

void setnumBottomGSRB (int a_numBottomGSRB)
 {\bf parameter-setting functions}

void setnumSmoothUp (int a_numSmoothUp)
void setnumSmoothDown (int a_numSmoothDown)
void setBottomSmoothing (bool a_bottomSolveFlag)
void setTolerance (Real a_tolerance)
void setOperatorTolerance (Real a_operatorTolerance)
void setVerbose (bool a_verbose)
void setMaxIter (int a_maxIter)
void setMinIter (int a_minIter)
void clearMemory ()
 {\bf data modification functions}

void setDefaultValues ()
void levelSolveH (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs, bool a_initializePhiToZero=true)
void levelSolve (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > *a_phiCoarse, const LevelData< NodeFArrayBox > &a_rhs, bool a_initializePhiToZero=true)

Protected Attributes

NodeLevelMG m_levelMG
NodeMaskLevelOpm_levelOpPtr
bool m_isDefined
DisjointBoxLayout m_grids
ProblemDomain m_domain
LevelData< NodeFArrayBoxm_resid
LevelData< NodeFArrayBoxm_scratch
LevelData< NodeFArrayBoxm_corr
int m_refToCoarse
Real m_dx
int m_maxIter
int m_minIter
Real m_tolerance
Real m_operatorTolerance
bool m_bottomSolveFlag
bool m_verbose
LayoutData< Vector< IntVectSet > > m_IVSV
LayoutData< Vector< IntVectSet > > m_IVSVext

Detailed Description

Solves elliptic equations on a level.

LevelNodeSolver solves elliptic equations on a level using multigrid.


Constructor & Destructor Documentation

LevelNodeSolver::LevelNodeSolver  
 

{\bf constructors, destructor and defines}

Default constructor leaves LevelNodeSolver undefined.

LevelNodeSolver::LevelNodeSolver const DisjointBoxLayout &    a_grids,
const DisjointBoxLayout *    a_gridsCoarsePtr,
const ProblemDomain &    a_domain,
Real    a_dx,
int    a_refToCoarse,
const NodeMaskLevelOp *const    a_opin,
int    a_minLength = 1
 

Full constructor. Calls full {\bf define} function with identical arguments.

LevelNodeSolver::LevelNodeSolver const DisjointBoxLayout &    a_grids,
const DisjointBoxLayout *    a_gridsCoarsePtr,
const Box &    a_domain,
Real    a_dx,
int    a_refToCoarse,
const NodeMaskLevelOp *const    a_opin,
int    a_minLength = 1
 

virtual LevelNodeSolver::~LevelNodeSolver   [virtual]
 

Destructor.


Member Function Documentation

void LevelNodeSolver::clearMemory  
 

{\bf data modification functions}

virtual void LevelNodeSolver::define const DisjointBoxLayout &    a_grids,
const DisjointBoxLayout *    a_gridsCoarsePtr,
const Box &    a_domain,
Real    a_dx,
int    a_refToCoarse,
const NodeMaskLevelOp *const    a_opin,
int    a_minLength = 1
[virtual]
 

virtual void LevelNodeSolver::define const DisjointBoxLayout &    a_grids,
const DisjointBoxLayout *    a_gridsCoarsePtr,
const ProblemDomain &    a_domain,
Real    a_dx,
int    a_refToCoarse,
const NodeMaskLevelOp *const    a_opin,
int    a_minLength = 1
[virtual]
 

Full define function.

{\bf Arguments:}\ a_grids: Grids on which solution will be computed.\ a_gridsCoarsePtr: pointer to next coarser grids, or NULL if there is no coarser level.\ a_domain: domain of solution level.\ a_dx: grid spacing at solution level.\ a_refToCoarse: refinement ratio to next coarser level. Not used if there is no coarser level.\ a_opin: operator L used in solution of L(phi)=rho.\ a_minLength: minimum side length of maximally coarsened box, or 0 if no coarsening. Set to 1 for max coarsening.\

bool LevelNodeSolver::isDefined   const
 

{\bf access functions}

Returns true if this object was created with the defining constructor or if define() has been called.

void LevelNodeSolver::levelSolve LevelData< NodeFArrayBox > &    a_phi,
const LevelData< NodeFArrayBox > *    a_phiCoarse,
const LevelData< NodeFArrayBox > &    a_rhs,
bool    a_initializePhiToZero = true
 

Does a level solve on this level using multigrid and inhomogeneous bcs at interfaces.

{\bf Arguments:} \ a_phi (modified): input initial guess at solution, output solution.\ a_phiCoarse (not modified): pointer to solution at next coarser level, or NULL if there is no coarser level.\ a_rhs (not modified): right-hand side.\ a_initializePhiToZero: whether to initialize guess of phi to zero.\

void LevelNodeSolver::levelSolveH LevelData< NodeFArrayBox > &    a_phi,
const LevelData< NodeFArrayBox > &    a_rhs,
bool    a_initializePhiToZero = true
 

Does a level solve on this level using multigrid and homogeneous bcs at coarse/fine interfaces.

{\bf Arguments:} \ a_phi (modified): input initial guess at solution, output solution.\ a_rhs (not modified): right-hand side.\ a_initializePhiToZero: whether to initialize guess of phi to zero.\

void LevelNodeSolver::setBottomSmoothing bool    a_bottomSolveFlag
 

Sets whether smoothing is done at bottom level. Default is true.

void LevelNodeSolver::setDefaultValues  
 

void LevelNodeSolver::setMaxIter int    a_maxIter
 

Sets max number of multigrid V-cycles to use in solution; Default is 33.

void LevelNodeSolver::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.

void LevelNodeSolver::setnumBottomGSRB int    a_numBottomGSRB
 

{\bf parameter-setting functions}

Set number of smoothings on the bottom level; Default == 16. Passed to NodeLevelMG.

void LevelNodeSolver::setnumSmoothDown int    a_numSmoothDown
 

Set number of smoothings on way down V-cycle; Default == 4. Passed to NodeLevelMG.

void LevelNodeSolver::setnumSmoothUp int    a_numSmoothUp
 

Set number of smoothings on way up V-cycle; Default == 4. Passed to NodeLevelMG.

void LevelNodeSolver::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-4.

void LevelNodeSolver::setTolerance Real    a_tolerance
 

Sets solution tolerance. Default is 1.0e-10.

void LevelNodeSolver::setVerbose bool    a_verbose
 

Sets whether the solver gives output while solving. Default is false.


Member Data Documentation

bool LevelNodeSolver::m_bottomSolveFlag [protected]
 

LevelData<NodeFArrayBox> LevelNodeSolver::m_corr [protected]
 

ProblemDomain LevelNodeSolver::m_domain [protected]
 

Real LevelNodeSolver::m_dx [protected]
 

DisjointBoxLayout LevelNodeSolver::m_grids [protected]
 

bool LevelNodeSolver::m_isDefined [protected]
 

LayoutData< Vector<IntVectSet> > LevelNodeSolver::m_IVSV [protected]
 

LayoutData< Vector<IntVectSet> > LevelNodeSolver::m_IVSVext [protected]
 

NodeLevelMG LevelNodeSolver::m_levelMG [protected]
 

NodeMaskLevelOp* LevelNodeSolver::m_levelOpPtr [protected]
 

int LevelNodeSolver::m_maxIter [protected]
 

int LevelNodeSolver::m_minIter [protected]
 

Real LevelNodeSolver::m_operatorTolerance [protected]
 

int LevelNodeSolver::m_refToCoarse [protected]
 

LevelData<NodeFArrayBox> LevelNodeSolver::m_resid [protected]
 

LevelData<NodeFArrayBox> LevelNodeSolver::m_scratch [protected]
 

Real LevelNodeSolver::m_tolerance [protected]
 

bool LevelNodeSolver::m_verbose [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Apr 15 18:32:09 2003 for AMRNodeElliptic by doxygen1.2.16