Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

AMRLevelMG Class Reference

#include <AMRLevelMG.H>

Collaboration diagram for AMRLevelMG:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

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


Public Member Functions

 AMRLevelMG ()
 Null constructor.

 ~AMRLevelMG ()
 Destructor.

 AMRLevelMG (const AMRSolver *const a_parent, int a_level, const LevelOp *const a_opin, int a_ncomp=1)
 Define AMRLevelMG from the inputs.

void define (const AMRSolver *const a_parent, int a_level, const LevelOp *const a_opin, int a_ncomp=1)
 Define AMRLevelMG from the inputs.

void setNumSmoothUp (int a_numSmoothUp)
 Set number of multigrid smoothings on way up V-cycle; Default == 4.

void setNumSmoothDown (int a_numSmoothDown)
 Set number of multigrid smoothings on way down V-cycle; Default == 4.

void applyAMROperator (Vector< LevelData< FArrayBox > * > &a_phiLevel, LevelData< FArrayBox > &a_Lofphi)
 Complete, 3-level operator.

void applyAMROperatorHphys (Vector< LevelData< FArrayBox > * > &a_phiLevel, LevelData< FArrayBox > &a_LofPhi)
 Complete, 3-level operator with homogeneous physicalboundary conditions.

void computeAMRResidual (Vector< LevelData< FArrayBox > * > &a_phiLevel, const Vector< LevelData< FArrayBox > * > &a_rhsLevel)
 Compute complete, 3-level residual and put it into local data m_resid.

void computeAMRResidualHphys (Vector< LevelData< FArrayBox > * > &a_phiLevel, const Vector< LevelData< FArrayBox > * > &a_rhsLevel)
 Compute complete, 3-level residual with homogeneous physical BCs.

void computeAMRResidual (LevelData< FArrayBox > &a_resid, Vector< LevelData< FArrayBox > * > &a_phiLevel, const Vector< LevelData< FArrayBox > * > &a_rhsLevel)
 Compute complete, 3-level residual and return it in a_resid.

void upSweep (Vector< LevelData< FArrayBox > * > &a_phiLevel, const Vector< LevelData< FArrayBox > * > &a_rhsLevel)
 Sweep up multigrid v-cycle.

void downSweep (Vector< LevelData< FArrayBox > * > &a_phiLevel, const Vector< LevelData< FArrayBox > * > &a_rhsLevel)
 Sweep down v-cycle.

Vector< RealcomputeResidualNorm (int normType) const
 Compute and return norm of internal data m_resid.

LevelOplevelOpPtr () const
 Return pointer to the LevelOp used to define this AMRLevelMG.

bool isDefined () const
 Returns true if this object has been defined.

Vector< RealcomputeNorm (const LevelData< FArrayBox > &a_mfinput, int a_normType) const
 Returns normType norm of mfab.

void setConvergenceMetric (Real a_metric, int a_comp)
 sets convergences metrics (if appropriate) for this problem.


Protected Member Functions

void smooth (LevelData< FArrayBox > &a_soln, const LevelData< FArrayBox > &a_rhs)
void clearMemory ()
void setDefaultValues ()
void reflux (Vector< LevelData< FArrayBox > * > &a_phiLevel, LevelData< FArrayBox > &a_Lofphi)
void initFRCoarse (Vector< LevelData< FArrayBox > * > &a_phiLevel)
void incrementFRFine (Vector< LevelData< FArrayBox > * > &a_phiLevel)

Protected Attributes

const AMRSolverm_parent
LevelMG m_levelMG
MGInterp m_mginterp
LevelFluxRegister m_levfluxreg
bool m_isDefined
DisjointBoxLayout m_coarsenedGrids
LevelData< FArrayBoxm_resid
LevelData< FArrayBoxm_corr
LevelData< FArrayBoxm_dcorr
LevelData< FArrayBoxm_lofPhi
LevelData< FArrayBoxm_phiSave
LevelData< FArrayBoxm_resC
Copier m_residualCopier
Copier m_fineExchangeCopier
int m_level
LevelOpm_levelopPtr
CoarseAverage m_averageOp
bool m_arrayViewVerbose

Private Member Functions

void setArrayViewVerbose (bool a_verbosity)
AMRLevelMGoperator= (const AMRLevelMG &)
 AMRLevelMG (const AMRLevelMG &)

Friends

class AMRSolver


Constructor & Destructor Documentation

AMRLevelMG::AMRLevelMG  ) 
 

Null constructor.

AMRLevelMG::~AMRLevelMG  ) 
 

Destructor.

AMRLevelMG::AMRLevelMG const AMRSolver *const  a_parent,
int  a_level,
const LevelOp *const  a_opin,
int  a_ncomp = 1
 

Define AMRLevelMG from the inputs.

AMRLevelMG::AMRLevelMG const AMRLevelMG  )  [private]
 


Member Function Documentation

void AMRLevelMG::define const AMRSolver *const  a_parent,
int  a_level,
const LevelOp *const  a_opin,
int  a_ncomp = 1
 

Define AMRLevelMG from the inputs.

The AMRLevelMG will only work for the input AMRSolver. A LevelMG is created.

void AMRLevelMG::setNumSmoothUp int  a_numSmoothUp  ) 
 

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

void AMRLevelMG::setNumSmoothDown int  a_numSmoothDown  ) 
 

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

void AMRLevelMG::applyAMROperator Vector< LevelData< FArrayBox > * > &  a_phiLevel,
LevelData< FArrayBox > &  a_Lofphi
 

Complete, 3-level operator.

Applies multilevel operator with inhomogeneous coarse-fine boundary conditions (and inhomogeneous domain boundary conditions. Refluxing is used to compute the operator at coarse-fine boundaries.

void AMRLevelMG::applyAMROperatorHphys Vector< LevelData< FArrayBox > * > &  a_phiLevel,
LevelData< FArrayBox > &  a_LofPhi
 

Complete, 3-level operator with homogeneous physicalboundary conditions.

Applies multilevel operator with inhomogeneous physical boundary conditions. Refluxing is used to compute the operator at coarse-fine boundaries.

void AMRLevelMG::computeAMRResidual Vector< LevelData< FArrayBox > * > &  a_phiLevel,
const Vector< LevelData< FArrayBox > * > &  a_rhsLevel
 

Compute complete, 3-level residual and put it into local data m_resid.

void AMRLevelMG::computeAMRResidualHphys Vector< LevelData< FArrayBox > * > &  a_phiLevel,
const Vector< LevelData< FArrayBox > * > &  a_rhsLevel
 

Compute complete, 3-level residual with homogeneous physical BCs.

Compute complete, 3-level residual with homogeneous physical BCs and inhomogeneous C/F BCs and put it into local data m_resid

void AMRLevelMG::computeAMRResidual LevelData< FArrayBox > &  a_resid,
Vector< LevelData< FArrayBox > * > &  a_phiLevel,
const Vector< LevelData< FArrayBox > * > &  a_rhsLevel
 

Compute complete, 3-level residual and return it in a_resid.

void AMRLevelMG::upSweep Vector< LevelData< FArrayBox > * > &  a_phiLevel,
const Vector< LevelData< FArrayBox > * > &  a_rhsLevel
 

Sweep up multigrid v-cycle.

void AMRLevelMG::downSweep Vector< LevelData< FArrayBox > * > &  a_phiLevel,
const Vector< LevelData< FArrayBox > * > &  a_rhsLevel
 

Sweep down v-cycle.

Vector<Real> AMRLevelMG::computeResidualNorm int  normType  )  const
 

Compute and return norm of internal data m_resid.

LevelOp* AMRLevelMG::levelOpPtr  )  const
 

Return pointer to the LevelOp used to define this AMRLevelMG.

bool AMRLevelMG::isDefined  )  const
 

Returns true if this object has been defined.

Vector<Real> AMRLevelMG::computeNorm const LevelData< FArrayBox > &  a_mfinput,
int  a_normType
const
 

Returns normType norm of mfab.

void AMRLevelMG::setConvergenceMetric Real  a_metric,
int  a_comp
 

sets convergences metrics (if appropriate) for this problem.

If we're using this class in the context of a solve, we may wish to set a metric against which to definte convergence (for example, the norm of the RHS). As currently implemented, this is simply a pass-through to the LevelOp classes from this class.

void AMRLevelMG::smooth LevelData< FArrayBox > &  a_soln,
const LevelData< FArrayBox > &  a_rhs
[protected]
 

Use short v-cycle or levelmg's smoother to reduce high wave numbers of residual

void AMRLevelMG::clearMemory  )  [protected]
 

Delete internal memory and set pointers to null

void AMRLevelMG::setDefaultValues  )  [protected]
 

Set default values. does not deal with memory

void AMRLevelMG::reflux Vector< LevelData< FArrayBox > * > &  a_phiLevel,
LevelData< FArrayBox > &  a_Lofphi
[protected]
 

Reflux enforces flux-matching from finer levels. Steps involved:

  • a) Initialize flux register with coarse flux
  • b) Increment flux register with sum of fine fluxes
  • b) Modify solution with flux diffrence

void AMRLevelMG::initFRCoarse Vector< LevelData< FArrayBox > * > &  a_phiLevel  )  [protected]
 

Fill fluxregisters with coarse flux

void AMRLevelMG::incrementFRFine Vector< LevelData< FArrayBox > * > &  a_phiLevel  )  [protected]
 

Increment fluxregisters with fine flux

void AMRLevelMG::setArrayViewVerbose bool  a_verbosity  )  [private]
 

AMRLevelMG& AMRLevelMG::operator= const AMRLevelMG  )  [private]
 


Friends And Related Function Documentation

friend class AMRSolver [friend]
 


Member Data Documentation

const AMRSolver* AMRLevelMG::m_parent [protected]
 

The parent AMRSolver which manages the overall multilevel solve

LevelMG AMRLevelMG::m_levelMG [protected]
 

LevelMG level solver object to relax on this level

MGInterp AMRLevelMG::m_mginterp [protected]
 

For interpolation

LevelFluxRegister AMRLevelMG::m_levfluxreg [protected]
 

Flux register with next coarser level

bool AMRLevelMG::m_isDefined [protected]
 

Has this AMRLevelMG been defined yet?

DisjointBoxLayout AMRLevelMG::m_coarsenedGrids [protected]
 

Coarsened version of the grids at this level

LevelData<FArrayBox> AMRLevelMG::m_resid [protected]
 

Residual

LevelData<FArrayBox> AMRLevelMG::m_corr [protected]
 

Correction

LevelData<FArrayBox> AMRLevelMG::m_dcorr [protected]
 

The infamous correction to the correction

LevelData<FArrayBox> AMRLevelMG::m_lofPhi [protected]
 

Storage for L(phi)

LevelData<FArrayBox> AMRLevelMG::m_phiSave [protected]
 

Extra copy of solution

LevelData<FArrayBox> AMRLevelMG::m_resC [protected]
 

Storage for coarsened residual

Copier AMRLevelMG::m_residualCopier [protected]
 

Copier that operates for moving coarsened residual to coarse level grid space.

Copier AMRLevelMG::m_fineExchangeCopier [protected]
 

Copier that's used for exchange on the fine grid data before fine flux register data is incremented.

int AMRLevelMG::m_level [protected]
 

Which AMR Level we are on

LevelOp* AMRLevelMG::m_levelopPtr [protected]
 

The LevelOp which encapsulates which operator we're using in this solve.

CoarseAverage AMRLevelMG::m_averageOp [protected]
 

Used for averaging residual to coarser level

bool AMRLevelMG::m_arrayViewVerbose [protected]
 

Debugging option to use ArrayView to examine what happens


The documentation for this class was generated from the following file:
Generated on Fri Jul 2 17:55:37 2004 for Chombo by doxygen 1.3.2