NodeLevelMG Class Reference

#include <NodeLevelMG.H>

Collaboration diagram for NodeLevelMG:

Collaboration graph
[legend]

List of all members.


Detailed Description

Multigrid solver on a level.

Multigrid solver on a level. This class is to be considered internal to LevelNodeSolver and not a part of the Chombo API.

Public Member Functions

NodeLevelOplevelOpPtr ()
NodeLevelMGlCoarsePtr ()
Constructors, destructor and defines
 NodeLevelMG ()
 NodeLevelMG (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_nCoarserLevels)
 NodeLevelMG (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_nCoarserLevels)
 ~NodeLevelMG ()
 NodeLevelMG (NodeLevelMG &a_L, int a_refToCoarse, const NodeLevelOp *a_opin)
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_nCoarserLevels)
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_nCoarserLevels)
void define (const NodeLevelMG &a_L, int a_refToCoarse, const NodeLevelOp *a_opin)
Access functions
bool isDefined () const
Parameter-setting functions
void setnumSmoothUp (int a_numSmoothUp)
void setnumSmoothDown (int a_numSmoothDown)
void setVerbose (bool a_verbose)
Data modification functions
void mgRelax (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs, bool a_bottomsolveflag)

Protected Member Functions

void setDefaultValues ()
void clearMemory ()

Protected Attributes

bool m_isDefined
bool m_verbose
LevelData< NodeFArrayBoxm_resid
LevelData< NodeFArrayBoxm_crseResid
LevelData< NodeFArrayBoxm_crseCorr
DisjointBoxLayout m_grids
DisjointBoxLayout m_coarsenedGrids
const DisjointBoxLayoutm_gridsCoarsePtr
Real m_dx
ProblemDomain m_domain
int m_nCoarserLevels
NodeLevelMGm_lCoarsePtr
NodeLevelOpm_levelopPtr
int m_numBottomPoints
int m_numSmoothUp
int m_numSmoothDown
int m_refToCoarsened
NodeCoarseAverage m_averageOp
Box m_boxRef
FArrayBox m_weights

Private Member Functions

void crseCorrect (LevelData< NodeFArrayBox > &a_phi)
void operator= (const NodeLevelMG &a_levmgin)
 NodeLevelMG (const NodeLevelMG &a_levmgin)


Constructor & Destructor Documentation

NodeLevelMG::NodeLevelMG (  ) 

Default constructor. User must subsequently call define().

NodeLevelMG::NodeLevelMG ( 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_nCoarserLevels 
)

Constructor to define NodeLevelMG from the inputs. Calls full define() function with identical arguments.

NodeLevelMG::NodeLevelMG ( 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_nCoarserLevels 
)

Constructor to define NodeLevelMG from the inputs. Calls full define() function with identical arguments.

NodeLevelMG::~NodeLevelMG (  ) 

Destructor.

NodeLevelMG::NodeLevelMG ( NodeLevelMG a_L,
int  a_refToCoarse,
const NodeLevelOp a_opin 
)

Constructor for coarsened version of object. Calls define() function with identical arguments.

NodeLevelMG::NodeLevelMG ( const NodeLevelMG a_levmgin  )  [inline, private]


Member Function Documentation

void NodeLevelMG::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_nCoarserLevels 
)

Full define function.

Parameters:
a_grids  CELL-centered grids on which solution will be computed
a_gridsCoarsePtr  pointer to next coarser AMR level's CELL-centered grids, or NULL if there is no coarser AMR level
a_domain  CELL-centered physical domain at this level
a_dx  mesh spacing
a_opin  operator L used in solution of L(phi) = rho
a_nCoarserLevels  number of coarser multigrid levels

void NodeLevelMG::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_nCoarserLevels 
)

Full define function.

Parameters:
a_grids  CELL-centered grids on which solution will be computed
a_gridsCoarsePtr  pointer to next coarser AMR level's CELL-centered grids, or NULL if there is no coarser AMR level
a_domain  CELL-centered physical domain at this level
a_dx  mesh spacing
a_opin  operator L used in solution of L(phi) = rho
a_nCoarserLevels  number of coarser multigrid levels

void NodeLevelMG::define ( const NodeLevelMG a_L,
int  a_refToCoarse,
const NodeLevelOp a_opin 
)

Function to define coarsened version of this NodeLevelMG.

Parameters:
a_L  original object
a_refToCoarse  refinement ratio between a_L and this object
a_opin  operator L used in solution of L(phi) = rho at same level as a_L

bool NodeLevelMG::isDefined (  )  const

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

void NodeLevelMG::setnumSmoothUp ( int  a_numSmoothUp  ) 

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

void NodeLevelMG::setnumSmoothDown ( int  a_numSmoothDown  ) 

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

void NodeLevelMG::setVerbose ( bool  a_verbose  ) 

Set whether the solver gives output while solving. Default is true.

void NodeLevelMG::mgRelax ( LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_rhs,
bool  a_bottomsolveflag 
)

Invoke relaxation step. Default is pure multigrid V-cycle, suitable for use in multilevel solver application; otherwise, use approximate solver such as CG at bottom level. It is assumed that the problem has already been put in residual-correction form. In particular, only the homogeneous form of the physical and coarse/fine boundary conditions need be invoked.

Modified are m_resid, m_crseResid, and m_crseCorr.

Parameters:
a_phi  solution on this level
a_rhs  right-hand side on this level
a_bottomsolveflag  whether to use bottom solver at coarsest level

NodeLevelOp* NodeLevelMG::levelOpPtr (  ) 

this is a dangerous access function that should not generally be used.

NodeLevelMG* NodeLevelMG::lCoarsePtr (  ) 

this is another access function that is kinda bad

void NodeLevelMG::setDefaultValues (  )  [protected]

Set default values. Does not deal with memory.

void NodeLevelMG::clearMemory (  )  [protected]

Delete internal memory and set pointers to NULL.

void NodeLevelMG::crseCorrect ( LevelData< NodeFArrayBox > &  a_phi  )  [private]

Correct a_phi on intersection with m_crseCorr. Should only be called internally because this is not written for general LevelData<NodeFArrayBox>es

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


Member Data Documentation

bool NodeLevelMG::m_isDefined [protected]

has this NodeLevelMG been defined yet?

bool NodeLevelMG::m_verbose [protected]

flag for verbose output

residual at this level

residual at next coarser level

correction at next coarser level

grids at this level

coarsened version of CELL-centered grids at this level

pointer to CELL-centered grids at next coarser AMR level, or NULL if no coarser level

Real NodeLevelMG::m_dx [protected]

mesh spacing at this level

CELL-centered physical domain at this level

number of coarser multigrid levels

pointer to coarser level

the operator

number of CELLs in physical domain

int NodeLevelMG::m_numSmoothUp [protected]

number of smoother iterations on sweep up

number of smoother iterations on sweep down

refinement ratio to next coarser multigrid level

operator for averaging from this level to next coarser multigrid level

reference box used in interpolation from next coarser multigrid level

weights of corners in interpolation from next coarser multigrid level


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

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