#include <AMRNodeLevelMG.H>
Collaboration diagram for AMRNodeLevelMG:
Public Methods | |
AMRNodeLevelMG () | |
{\bf constructors, destructor and defines} | |
AMRNodeLevelMG (const AMRNodeSolver *const a_parent, int a_level, const NodeLevelOp *const a_opin) | |
~AMRNodeLevelMG () | |
void | define (const AMRNodeSolver *const a_parent, int a_level, const NodeLevelOp *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 AMRNodeSolver * | m_parent |
NodeLevelMG | m_levelMG |
NodeMGInterp | m_mginterp |
bool | m_isDefined |
bool | m_verbose |
DisjointBoxLayout | m_coarsenedGrids |
LevelData< NodeFArrayBox > | m_resid |
LevelData< NodeFArrayBox > | m_residInterior |
LevelData< NodeFArrayBox > | m_corr |
LevelData< NodeFArrayBox > | m_dcorr |
LevelData< NodeFArrayBox > | m_LofPhi |
LevelData< NodeFArrayBox > | m_phiSave |
LevelData< NodeFArrayBox > | m_residCoarsened |
int | m_level |
Real | m_dx |
NodeLevelOp * | m_levelOpPtr |
NodeCoarseAverage | m_averageOp |
ProblemDomain | m_domain |
DisjointBoxLayout | m_finerGrids |
DisjointBoxLayout | m_coarsenedFineGrids |
LayoutData< Vector< IntVectSet > > | m_IVSV |
LayoutData< Vector< IntVectSet > > | m_IVSVext |
LayoutData< Vector< IntVectSet > > | m_IVSVcoarsened |
LayoutData< Vector< IntVectSet > > | m_IVSVcoarsenedFine |
Friends | |
class | 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.
|
{\bf constructors, destructor and defines} Default constructor. User must subsequently call define(). |
|
Constructor to define AMRNodeLevelMG from the inputs. Calls {\bf define} function with identical arguments. |
|
Destructor. |
|
{\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. |
|
|
|
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. |
|
|
|
Compute and return norm of internal data m_resid. {\bf This:}\ This object is not modified. |
|
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.\ |
|
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). |
|
Returns true if this object was created with the defining constructor or if define() has been called. |
|
|
|
|
|
Set number of multigrid smoothings at bottom of V-cycle; Default == 16. |
|
Set number of multigrid smoothings on way down V-cycle; Default == 4. |
|
{\bf parameter-setting functions} Set number of multigrid smoothings on way up V-cycle; Default == 4. |
|
Set whether the solver gives output while solving. Default is true. |
|
|
|
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. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|