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

AMRNodeLevelMG Class Reference

Class which manages data and operations on a level for AMRNodeSolver. More...

#include <AMRNodeLevelMG.H>

Collaboration diagram for AMRNodeLevelMG:

Collaboration graph
[legend]
List of all members.

Public Methods

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

 AMRNodeLevelMG (const AMRNodeSolver *const a_parent, int a_level, const NodeMaskLevelOp *const a_opin)
 ~AMRNodeLevelMG ()
void define (const AMRNodeSolver *const a_parent, int a_level, const NodeMaskLevelOp *const a_opin)
bool isDefined () const
Real computeResidualNorm (int a_normType) const
void setnumSmoothUp (int a_numSmoothUp)
 {\bf parameter-setting functions}

void setnumSmoothDown (int a_numSmoothDown)
void setnumBottomGSRB (int a_numBottomGSRB)
void setVerbose (bool a_verbose)
void applyAMROperator (LevelData< NodeFArrayBox > &a_Lofphi, Vector< LevelData< NodeFArrayBox > * > &a_phiLevel)
 {\bf data modification functions}

void computeAMRResidual (Vector< LevelData< NodeFArrayBox > * > &a_phiLevel, const Vector< LevelData< NodeFArrayBox > * > &a_rhsLevel)
void upSweep (Vector< LevelData< NodeFArrayBox > * > &a_phiLevel, const Vector< LevelData< NodeFArrayBox > * > &a_rhsLevel)
void downSweep (Vector< LevelData< NodeFArrayBox > * > &a_phiLevel, const Vector< LevelData< NodeFArrayBox > * > &a_rhsLevel)

Protected Methods

Real computeNorm (const LevelData< NodeFArrayBox > &a_mfinput, int a_normType) const
void smooth (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs)
void projectFineInterior (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_phiFine)
void clearMemory ()
void setDefaultValues ()

Protected Attributes

const AMRNodeSolverm_parent
NodeLevelMG m_levelMG
NodeMGInterp m_mginterp
bool m_isDefined
bool m_verbose
DisjointBoxLayout m_coarsenedGrids
LevelData< NodeFArrayBoxm_resid
LevelData< NodeFArrayBoxm_residInterior
LevelData< NodeFArrayBoxm_corr
LevelData< NodeFArrayBoxm_dcorr
LevelData< NodeFArrayBoxm_LofPhi
LevelData< NodeFArrayBoxm_phiSave
LevelData< NodeFArrayBoxm_residCoarsened
int m_level
Real m_dx
NodeMaskLevelOpm_levelOpPtr
NodeMaskAverage m_averageOp
ProblemDomain m_domain
DisjointBoxLayout m_finerGrids
DisjointBoxLayout m_coarsenedFineGrids
LevelData< NodeFArrayBoxm_zeroCoarsenedFiner
LayoutData< Vector< IntVectSet > > m_IVSV
LayoutData< Vector< IntVectSet > > m_IVSVext
LayoutData< Vector< IntVectSet > > m_IVSVcoarsened
LayoutData< Vector< IntVectSet > > m_IVSVcoarsenedFine

Friends

class AMRNodeSolver

Detailed Description

Class which manages data and operations on a level for AMRNodeSolver.

AMRNodeLevelMG manages the operations on a level for AMRNodeSolver. AMRNodeSolver contains a vector of AMRNodeLevelMG's (one for each level). This class should be considered internal to AMRNodeSolver and should not be considered part of the Chombo API.


Constructor & Destructor Documentation

AMRNodeLevelMG::AMRNodeLevelMG  
 

{\bf constructors, destructor and defines}

Default constructor. User must subsequently call define().

AMRNodeLevelMG::AMRNodeLevelMG const AMRNodeSolver *const    a_parent,
int    a_level,
const NodeMaskLevelOp *const    a_opin
 

Constructor to define AMRNodeLevelMG from the inputs. Calls {\bf define} function with identical arguments.

AMRNodeLevelMG::~AMRNodeLevelMG  
 

Destructor.


Member Function Documentation

void AMRNodeLevelMG::applyAMROperator LevelData< NodeFArrayBox > &    a_Lofphi,
Vector< LevelData< NodeFArrayBox > * > &    a_phiLevel
 

{\bf data modification functions}

Complete, 3-level operator. Applies operator with inhomogeneous coarse-fine boundary conditions and homogeneous domain boundary conditions.

{\bf Arguments:}\ a_LofPhi (modified): L(phi) result of evaluation at level a_ilev.\ a_phiLevel (modified): Vector of pointers to phi, indexed by level. We modify a_phiLevel[m_level] by (a) projecting down from interior coarse nodes of a_phiLevel[m_level+1], if this finer level exists; (b) interpolating from a_phiLevel[m_level-1] at the coarse/fine boundary, if this coarser level exists; (c) applying the physical boundary conditions.\

{\bf This:}\ This object is not modified.

void AMRNodeLevelMG::clearMemory   [protected]
 

void AMRNodeLevelMG::computeAMRResidual Vector< LevelData< NodeFArrayBox > * > &    a_phiLevel,
const Vector< LevelData< NodeFArrayBox > * > &    a_rhsLevel
 

Compute complete, 3-level residual (rhs - operator(phi)) and put it into local data m_resid.

{\bf Arguments:}\ a_LofPhi (modified): L(phi) result of evaluation at level a_ilev.\ a_phiLevel (modified): Vector of pointers to phi, indexed by level. We modify a_phiLevel[m_level] by (a) projecting down from interior coarse nodes of a_phiLevel[m_level+1], if this finer level exists; (b) interpolating from a_phiLevel[m_level-1] at the coarse/fine boundary, if this coarser level exists; (c) applying the physical boundary conditions.\ a_rhsLevel (not modified): Vector of pointers to right-hand sides, indexed by level.\

{\bf This:}\ m_resid is zeroed out and its interior nodes filled with the residual.

Real AMRNodeLevelMG::computeNorm const LevelData< NodeFArrayBox > &    a_mfinput,
int    a_normType
const [protected]
 

Real AMRNodeLevelMG::computeResidualNorm int    a_normType const
 

Compute and return norm of internal data m_resid.

{\bf This:}\ This object is not modified.

void AMRNodeLevelMG::define const AMRNodeSolver *const    a_parent,
int    a_level,
const NodeMaskLevelOp *const    a_opin
 

Define AMRNodeLevelMG from the inputs. \ The AMRNodeLevelMG will only work for the input AMRNodeSolver. A NodeLevelMG is created.

{\bf Arguments:}\ a_parent: parent AMRNodeSolver.\ a_level: level in the grid hierarchy.\ a_opin: pointer to operator.\

void AMRNodeLevelMG::downSweep Vector< LevelData< NodeFArrayBox > * > &    a_phiLevel,
const Vector< LevelData< NodeFArrayBox > * > &    a_rhsLevel
 

Sweep down V-cycle.

{\bf Arguments:}\ a_phiLevel (modified): Vector of pointers to phi, indexed by level. We modify a_phiLevel[m_level] by incrementing it by a correction. Then we modify a_phiLevel[m_level-1] by (a) projecting down from interior coarse nodes of a_phiLevel[m_level]; (b) interpolating from a_phiLevel[m_level-2] at the coarse/fine boundary, if this coarser level exists; (c) applying the physical boundary conditions.\ a_rhsLevel (not modified): Vector of pointers to right-hand sides, indexed by level.\

{\bf This:}\ In succession,\ m_phiSave is set to the original input a_phiLevel[m_level].\ m_corr is set to zero and smoothed with m_resid as right-hand side.\ Next coarser level's m_corr is initialized to zero.\ Next coarser level's m_resid is set to the residual at the coarser level, and then at the coarse interior nodes is overwritten with average of this level's m_resid - operator(m_corr).

bool AMRNodeLevelMG::isDefined   const
 

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

void AMRNodeLevelMG::projectFineInterior LevelData< NodeFArrayBox > &    a_phi,
const LevelData< NodeFArrayBox > &    a_phiFine
[protected]
 

void AMRNodeLevelMG::setDefaultValues   [protected]
 

void AMRNodeLevelMG::setnumBottomGSRB int    a_numBottomGSRB
 

Set number of multigrid smoothings at bottom of V-cycle; Default == 16.

void AMRNodeLevelMG::setnumSmoothDown int    a_numSmoothDown
 

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

void AMRNodeLevelMG::setnumSmoothUp int    a_numSmoothUp
 

{\bf parameter-setting functions}

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

void AMRNodeLevelMG::setVerbose bool    a_verbose
 

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

void AMRNodeLevelMG::smooth LevelData< NodeFArrayBox > &    a_phi,
const LevelData< NodeFArrayBox > &    a_rhs
[protected]
 

void AMRNodeLevelMG::upSweep Vector< LevelData< NodeFArrayBox > * > &    a_phiLevel,
const Vector< LevelData< NodeFArrayBox > * > &    a_rhsLevel
 

Sweep up multigrid V-cycle. Computes residual.

{\bf Arguments:}\ a_phiLevel (modified): Vector of pointers to phi, indexed by level. We modify a_phiLevel[m_level] by replacing it with m_phiSave plus a correction.\ a_rhsLevel (not modified): Vector of pointers to right-hand sides, indexed by level.\

{\bf This:}\ In succession,\ m_corr is interpolated from next coarser level's m_corr.\ m_resid is decremented by operator on m_corr.\ m_dcorr is set to zero and smoothed with m_resid as right-hand side.\ m_corr is incremented by m_dcorr.\ m_phiSave is incremented by m_corr.


Friends And Related Function Documentation

friend class AMRNodeSolver [friend]
 


Member Data Documentation

NodeMaskAverage AMRNodeLevelMG::m_averageOp [protected]
 

DisjointBoxLayout AMRNodeLevelMG::m_coarsenedFineGrids [protected]
 

DisjointBoxLayout AMRNodeLevelMG::m_coarsenedGrids [protected]
 

LevelData<NodeFArrayBox> AMRNodeLevelMG::m_corr [protected]
 

LevelData<NodeFArrayBox> AMRNodeLevelMG::m_dcorr [protected]
 

ProblemDomain AMRNodeLevelMG::m_domain [protected]
 

Real AMRNodeLevelMG::m_dx [protected]
 

DisjointBoxLayout AMRNodeLevelMG::m_finerGrids [protected]
 

bool AMRNodeLevelMG::m_isDefined [protected]
 

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

LayoutData< Vector<IntVectSet> > AMRNodeLevelMG::m_IVSVcoarsened [protected]
 

LayoutData< Vector<IntVectSet> > AMRNodeLevelMG::m_IVSVcoarsenedFine [protected]
 

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

int AMRNodeLevelMG::m_level [protected]
 

NodeLevelMG AMRNodeLevelMG::m_levelMG [protected]
 

NodeMaskLevelOp* AMRNodeLevelMG::m_levelOpPtr [protected]
 

LevelData<NodeFArrayBox> AMRNodeLevelMG::m_LofPhi [protected]
 

NodeMGInterp AMRNodeLevelMG::m_mginterp [protected]
 

const AMRNodeSolver* AMRNodeLevelMG::m_parent [protected]
 

LevelData<NodeFArrayBox> AMRNodeLevelMG::m_phiSave [protected]
 

LevelData<NodeFArrayBox> AMRNodeLevelMG::m_resid [protected]
 

LevelData<NodeFArrayBox> AMRNodeLevelMG::m_residCoarsened [protected]
 

LevelData<NodeFArrayBox> AMRNodeLevelMG::m_residInterior [protected]
 

bool AMRNodeLevelMG::m_verbose [protected]
 

LevelData<NodeFArrayBox> AMRNodeLevelMG::m_zeroCoarsenedFiner [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