LevelNodeSolver Class Reference

#include <LevelNodeSolver.H>

Collaboration diagram for LevelNodeSolver:

Collaboration graph
[legend]

List of all members.


Detailed Description

Solves elliptic equations on a level.

LevelNodeSolver solves elliptic equations on a level using multigrid.

Public Member Functions

Constructors, destructor and defines
 LevelNodeSolver ()
 LevelNodeSolver (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_gridsCoarsePtr, const ProblemDomain &a_domain, Real a_dx, int a_refToCoarse, const NodeLevelOp *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 NodeLevelOp *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 NodeLevelOp *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 NodeLevelOp *const a_opin, int a_minLength=1)
Access functions
bool isDefined () const
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)
Data modification functions
void clearMemory ()
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
NodeLevelOpm_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

Private Member Functions

int countCoarserLevels (int a_minLength)
void operator= (const LevelNodeSolver &)
 LevelNodeSolver (const LevelNodeSolver &)


Constructor & Destructor Documentation

LevelNodeSolver::LevelNodeSolver (  ) 

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 NodeLevelOp *const   a_opin,
int  a_minLength = 1 
)

Full constructor. Calls full 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 NodeLevelOp *const   a_opin,
int  a_minLength = 1 
)

Full constructor. Calls full define() function with identical arguments.

virtual LevelNodeSolver::~LevelNodeSolver (  )  [virtual]

Destructor.

LevelNodeSolver::LevelNodeSolver ( const LevelNodeSolver  )  [inline, private]


Member Function Documentation

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

Full define function.

Parameters:
a_grids  grids on which solution will be computed
a_gridsCoarsePtr  pointer to next coarser AMR level's 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 (if any)
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

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

Full define function.

Parameters:
a_grids  grids on which solution will be computed
a_gridsCoarsePtr  pointer to next coarser AMR level's 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 (if any)
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

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

void LevelNodeSolver::setnumSmoothUp ( int  a_numSmoothUp  ) 

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

void LevelNodeSolver::setnumSmoothDown ( int  a_numSmoothDown  ) 

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

void LevelNodeSolver::setBottomSmoothing ( bool  a_bottomSolveFlag  ) 

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

void LevelNodeSolver::setTolerance ( Real  a_tolerance  ) 

Sets solution tolerance. Default is 1.0e-10.

void LevelNodeSolver::setOperatorTolerance ( Real  a_operatorTolerance  ) 

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

void LevelNodeSolver::setVerbose ( bool  a_verbose  ) 

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

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::clearMemory (  ) 

Delete internal memory and set pointers to NULL.

void LevelNodeSolver::setDefaultValues (  ) 

Set default values. Does not deal with memory.

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.

Parameters:
a_phi  input initial guess at solution, output solution
a_rhs  right-hand side
a_initializePhiToZero  whether to initialize guess of phi to zero

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 coarse/fine interfaces.

Parameters:
a_phi  input initial guess at solution, output solution
a_phiCoarse  pointer to solution at next coarser level, or NULL if there is no coarser level
a_rhs  right-hand side
a_initializePhiToZero  whether to initialize guess of phi to zero

int LevelNodeSolver::countCoarserLevels ( int  a_minLength  )  [private]

void LevelNodeSolver::operator= ( const LevelNodeSolver  )  [inline, private]


Member Data Documentation

level solver object to relax on this level

pointer to operator

bool LevelNodeSolver::m_isDefined [protected]

has this LevelNodeSolver been defined yet?

CELL-centered grids at this level

CELL-centered physical domain at this level

residual

useful scratch space

correction

refinement ratio to next coarser level

mesh spacing at this level

int LevelNodeSolver::m_maxIter [protected]

maximum number of iterations

int LevelNodeSolver::m_minIter [protected]

minimum number of iterations

solver tolerance

operator tolerance: iteration will stop if (new_residual/old_residual) > 1-m_operatorTolerance

whether to do smoothing at bottom level

bool LevelNodeSolver::m_verbose [protected]

whether to write verbose output; default is true

interior boundary nodes of grids at this level

exterior boundary nodes of grids at this level


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

Generated on Tue Apr 14 14:23:42 2009 for Chombo + EB by  doxygen 1.5.5