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

AMRNodeOp Class Reference

#include <AMRNodeOp.H>

Inheritance diagram for AMRNodeOp:

Inheritance graph
[legend]
Collaboration diagram for AMRNodeOp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AMRNodeOp ()
virtual ~AMRNodeOp ()
LinearOp functions
void define (const DisjointBoxLayout &a_grids, const Real &a_dx, const ProblemDomain &a_domain, NodeBCFunc a_bc)
void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout &a_baseBAPtr, const Real &a_dxLevel, int a_refRatio, const ProblemDomain &a_domain, NodeBCFunc a_bc)
void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout &a_gridsFiner, const DisjointBoxLayout &a_gridsCoarser, const Real &a_dxLevel, int a_refRatio, int a_refRatioFiner, const ProblemDomain &a_domain, NodeBCFunc a_bc)
void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout &a_gridsFiner, const Real &a_dxLevel, int a_refRatio, int a_refRatioFiner, const ProblemDomain &a_domain, NodeBCFunc a_bc)
void projectFineInterior (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_phiFine)
virtual void residual (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs, bool a_homogeneous=false)
virtual void preCond (LevelData< NodeFArrayBox > &a_correction, const LevelData< NodeFArrayBox > &a_residual)
virtual void applyOpOnly (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_phi)
virtual void applyOp (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_phi, bool a_homogeneous=false)
virtual void create (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_rhs)
virtual void createCoarsened (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_rhs, const int &a_refRat)
virtual void assign (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_rhs)
virtual Real dotProduct (const LevelData< NodeFArrayBox > &a_1, const LevelData< NodeFArrayBox > &a_2)
virtual void incr (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_x, Real a_scale)
virtual void axby (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_x, const LevelData< NodeFArrayBox > &a_y, Real a, Real b)
virtual void scale (LevelData< NodeFArrayBox > &a_lhs, const Real &a_scale)
virtual Real norm (const LevelData< NodeFArrayBox > &a_x, int a_ord)
virtual void setToZero (LevelData< NodeFArrayBox > &a_x)
virtual void relax (LevelData< NodeFArrayBox > &a_e, const LevelData< NodeFArrayBox > &a_residual, int iterations)
virtual void createCoarser (LevelData< NodeFArrayBox > &a_coarse, const LevelData< NodeFArrayBox > &a_fine, bool ghosted)
virtual void restrictResidual (LevelData< NodeFArrayBox > &a_resCoarse, LevelData< NodeFArrayBox > &a_phiFine, const LevelData< NodeFArrayBox > &a_rhsFine)
virtual void prolongIncrement (LevelData< NodeFArrayBox > &a_phiThisLevel, const LevelData< NodeFArrayBox > &a_correctCoarse)
virtual int refToCoarser ()
virtual void AMRResidual (LevelData< NodeFArrayBox > &a_residual, const LevelData< NodeFArrayBox > &a_phiFine, const LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_phiCoarse, const LevelData< NodeFArrayBox > &a_rhs, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< NodeFArrayBox > > *a_finerOp)
virtual void AMRResidualNC (LevelData< NodeFArrayBox > &a_residual, const LevelData< NodeFArrayBox > &a_phiFine, const LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< NodeFArrayBox > > *a_finerOp)
virtual void AMRResidualNF (LevelData< NodeFArrayBox > &a_residual, const LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_phiCoarse, const LevelData< NodeFArrayBox > &a_rhs, bool a_homogeneousPhysBC)
virtual void AMROperator (LevelData< NodeFArrayBox > &a_LofPhi, const LevelData< NodeFArrayBox > &a_phiFine, const LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_phiCoarse, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< NodeFArrayBox > > *a_finerOp)
virtual void AMROperatorNC (LevelData< NodeFArrayBox > &a_LofPhi, const LevelData< NodeFArrayBox > &a_phiFine, const LevelData< NodeFArrayBox > &a_phi, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< NodeFArrayBox > > *a_finerOp)
virtual void AMROperatorNF (LevelData< NodeFArrayBox > &a_LofPhi, const LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_phiCoarse, bool a_homogeneousPhysBC)
virtual void AMRRestrict (LevelData< NodeFArrayBox > &a_resCoarse, const LevelData< NodeFArrayBox > &a_residual, const LevelData< NodeFArrayBox > &a_correction, const LevelData< NodeFArrayBox > &a_coarseCorrection)
virtual void AMRProlong (LevelData< NodeFArrayBox > &a_correction, const LevelData< NodeFArrayBox > &a_coarseCorrection)
virtual void AMRUpdateResidual (LevelData< NodeFArrayBox > &a_residual, const LevelData< NodeFArrayBox > &a_correction, const LevelData< NodeFArrayBox > &a_coarseCorrection)
virtual Real AMRNorm (const LevelData< NodeFArrayBox > &a_coarseResid, const LevelData< NodeFArrayBox > &a_fineResid, const int &a_refRat, const int &a_ord)

Public Attributes

Real m_alpha
Real m_beta

Protected Member Functions

void prolongIncrement (LevelData< NodeFArrayBox > &a_phiThisLevel, const LevelData< NodeFArrayBox > &a_correctCoarse, int a_refRat)
void levelGSRB (LevelData< NodeFArrayBox > &a_e, const LevelData< NodeFArrayBox > &a_residual)
void homogeneousCFInterp (LevelData< NodeFArrayBox > &a_phif)
void homogeneousCFInterp (LevelData< NodeFArrayBox > &a_phif, const DataIndex &a_datInd, int a_idir, Side::LoHiSide a_hiorlo)
void setCFIVS (const DisjointBoxLayout &a_grids)

Protected Attributes

ProblemDomain m_domainInteriorNodes
Real m_dx
Real m_dxCrse
ProblemDomain m_domain
NodeLevelDataOps m_levelOps
NodeBCFunc m_bc
LayoutData< NodeCFIVSm_loCFIVS [SpaceDim]
LayoutData< NodeCFIVSm_hiCFIVS [SpaceDim]
Copier m_exchangeCopier
NodeQCFI m_interpWithCoarser
NodeCoarseAverage m_averageOpMG
int m_refToCoarser
int m_refToFiner
DisjointBoxLayout m_coarsenedFineGrids
bool m_hasFiner
LayoutData< Vector< IntVectSet > > m_IVSV
LayoutData< BitSetm_IVSVfull
LayoutData< Vector< IntVectSet > > m_IVSVext
LayoutData< Vector< IntVectSet > > m_IVSVcoarsened
LayoutData< Vector< IntVectSet > > m_IVSVcoarsenedFine

Constructor & Destructor Documentation

AMRNodeOp::AMRNodeOp  ) 
 

virtual AMRNodeOp::~AMRNodeOp  )  [inline, virtual]
 


Member Function Documentation

void AMRNodeOp::define const DisjointBoxLayout a_grids,
const Real a_dx,
const ProblemDomain a_domain,
NodeBCFunc  a_bc
 

void AMRNodeOp::define const DisjointBoxLayout a_grids,
const DisjointBoxLayout a_baseBAPtr,
const Real a_dxLevel,
int  a_refRatio,
const ProblemDomain a_domain,
NodeBCFunc  a_bc
 

define function for AMRLevelOp which has no finer AMR level

void AMRNodeOp::define const DisjointBoxLayout a_grids,
const DisjointBoxLayout a_gridsFiner,
const DisjointBoxLayout a_gridsCoarser,
const Real a_dxLevel,
int  a_refRatio,
int  a_refRatioFiner,
const ProblemDomain a_domain,
NodeBCFunc  a_bc
 

full define function for AMRLevelOp with both coarser and finer levels

void AMRNodeOp::define const DisjointBoxLayout a_grids,
const DisjointBoxLayout a_gridsFiner,
const Real a_dxLevel,
int  a_refRatio,
int  a_refRatioFiner,
const ProblemDomain a_domain,
NodeBCFunc  a_bc
 

full define function for AMRLevelOp with finer levels, but no coarser

void AMRNodeOp::projectFineInterior LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_phiFine
 

virtual void AMRNodeOp::residual LevelData< NodeFArrayBox > &  a_lhs,
const LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_rhs,
bool  a_homogeneous = false
[virtual]
 

Say you are solving L(phi) = rhs. Make a_lhs = L(a_phi) - a_rhs. If a_homogeneous is true, evaluate the operator using homogeneous boundary conditions.

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::preCond LevelData< NodeFArrayBox > &  a_correction,
const LevelData< NodeFArrayBox > &  a_residual
[virtual]
 

Given the current state of the residual the correction, apply your preconditioner to a_cor.

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::applyOpOnly LevelData< NodeFArrayBox > &  a_lhs,
const LevelData< NodeFArrayBox > &  a_phi
[virtual]
 

virtual void AMRNodeOp::applyOp LevelData< NodeFArrayBox > &  a_lhs,
const LevelData< NodeFArrayBox > &  a_phi,
bool  a_homogeneous = false
[virtual]
 

In the context of solving L(phi) = rhs, set a_lhs = L(a_phi). If a_homogeneous is true, evaluate the operator using homogeneous boundary conditions.

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::create LevelData< NodeFArrayBox > &  a_lhs,
const LevelData< NodeFArrayBox > &  a_rhs
[virtual]
 

Creat data holder a_lhs that mirrors a_rhs. You do not need to copy the data of a_rhs, just make a holder the same size.

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::createCoarsened LevelData< NodeFArrayBox > &  a_lhs,
const LevelData< NodeFArrayBox > &  a_rhs,
const int &  a_refRat
[virtual]
 

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::assign LevelData< NodeFArrayBox > &  a_lhs,
const LevelData< NodeFArrayBox > &  a_rhs
[virtual]
 

Set a_lhs equal to a_rhs.

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual Real AMRNodeOp::dotProduct const LevelData< NodeFArrayBox > &  a_1,
const LevelData< NodeFArrayBox > &  a_2
[virtual]
 

Compute and return the dot product of a_1 and a_2. In most contexts, this means return the sum over all data points of a_1*a_2.

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::incr LevelData< NodeFArrayBox > &  a_lhs,
const LevelData< NodeFArrayBox > &  a_x,
Real  a_scale
[virtual]
 

Increment by scaled amount (a_lhs += a_scale*a_x).

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::axby LevelData< NodeFArrayBox > &  a_lhs,
const LevelData< NodeFArrayBox > &  a_x,
const LevelData< NodeFArrayBox > &  a_y,
Real  a,
Real  b
[virtual]
 

Set input to a scaled sum (a_lhs = a_a*a_x + a_b*a_y).

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::scale LevelData< NodeFArrayBox > &  a_lhs,
const Real a_scale
[virtual]
 

Multiply the input by a given scale (a_lhs *= a_scale).

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual Real AMRNodeOp::norm const LevelData< NodeFArrayBox > &  a_x,
int  a_ord
[virtual]
 

Return the norm of a_rhs. a_ord == 0 max norm, a_ord == 1 sum(abs(a_rhs)), else, L(a_ord) norm.

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::setToZero LevelData< NodeFArrayBox > &  a_x  )  [virtual]
 

Set a_lhs to zero.

Implements LinearOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::relax LevelData< NodeFArrayBox > &  a_e,
const LevelData< NodeFArrayBox > &  a_residual,
int  iterations
[virtual]
 

Use your relaxtion operator to remove the high frequency wave numbers from the correction so that it may be averaged to a coarser refinement. A point relaxtion scheme, for example takes the form a_correction -= lambda*(L(a_correction) - a_residual).

Implements MGLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::createCoarser LevelData< NodeFArrayBox > &  a_coarse,
const LevelData< NodeFArrayBox > &  a_fine,
bool  ghosted
[virtual]
 

Create a coarsened (by two) version of the input data. This does not include averaging the data. So if a_fine is over a Box of (0, 0, 0) (63, 63, 63), a_fine should be over a Box (0, 0, 0) (31, 31, 31).

Implements MGLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::restrictResidual LevelData< NodeFArrayBox > &  a_resCoarse,
LevelData< NodeFArrayBox > &  a_phiFine,
const LevelData< NodeFArrayBox > &  a_rhsFine
[virtual]
 

calculate restricted residual a_resCoarse[2h] = I[h->2h] (rhsFine[h] - L[h](phiFine[h])

Implements MGLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::prolongIncrement LevelData< NodeFArrayBox > &  a_phiThisLevel,
const LevelData< NodeFArrayBox > &  a_correctCoarse
[virtual]
 

correct the fine solution based on coarse correction a_phiThisLevel += I[2h->h](a_correctCoarse)

Implements MGLevelOp< LevelData< NodeFArrayBox > >.

virtual int AMRNodeOp::refToCoarser  )  [inline, virtual]
 

return the refinement ratio to next coarser level. return 1 when there are no coarser AMRLevelOp objects.

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::AMRResidual LevelData< NodeFArrayBox > &  a_residual,
const LevelData< NodeFArrayBox > &  a_phiFine,
const LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_phiCoarse,
const LevelData< NodeFArrayBox > &  a_rhs,
bool  a_homogeneousPhysBC,
AMRLevelOp< LevelData< NodeFArrayBox > > *  a_finerOp
[virtual]
 

a_residual = a_rhs - L(a_phi, a_phiFine, a_phiCoarse)

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::AMRResidualNC LevelData< NodeFArrayBox > &  a_residual,
const LevelData< NodeFArrayBox > &  a_phiFine,
const LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_rhs,
bool  a_homogeneousPhysBC,
AMRLevelOp< LevelData< NodeFArrayBox > > *  a_finerOp
[virtual]
 

residual assuming no more coarser AMR levels

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::AMRResidualNF LevelData< NodeFArrayBox > &  a_residual,
const LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_phiCoarse,
const LevelData< NodeFArrayBox > &  a_rhs,
bool  a_homogeneousPhysBC
[virtual]
 

a_residual = a_rhs - L(a_phi, a_phiCoarse)

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::AMROperator LevelData< NodeFArrayBox > &  a_LofPhi,
const LevelData< NodeFArrayBox > &  a_phiFine,
const LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_phiCoarse,
bool  a_homogeneousPhysBC,
AMRLevelOp< LevelData< NodeFArrayBox > > *  a_finerOp
[virtual]
 

apply AMR operator

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::AMROperatorNC LevelData< NodeFArrayBox > &  a_LofPhi,
const LevelData< NodeFArrayBox > &  a_phiFine,
const LevelData< NodeFArrayBox > &  a_phi,
bool  a_homogeneousPhysBC,
AMRLevelOp< LevelData< NodeFArrayBox > > *  a_finerOp
[virtual]
 

apply AMR operator, assuming no more coarser AMR levels

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::AMROperatorNF LevelData< NodeFArrayBox > &  a_LofPhi,
const LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_phiCoarse,
bool  a_homogeneousPhysBC
[virtual]
 

AMR operator, assuming no finer AMR levels

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::AMRRestrict LevelData< NodeFArrayBox > &  a_resCoarse,
const LevelData< NodeFArrayBox > &  a_residual,
const LevelData< NodeFArrayBox > &  a_correction,
const LevelData< NodeFArrayBox > &  a_coarseCorrection
[virtual]
 

a_resCoarse = I[h-2h]( a_residual - L(a_correction, a_coarseCorrection)) it is assumed that a_resCoarse has already been filled in with the coarse version of AMRResidualNF and that this operation is free to overwrite in the overlap regions.

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::AMRProlong LevelData< NodeFArrayBox > &  a_correction,
const LevelData< NodeFArrayBox > &  a_coarseCorrection
[virtual]
 

a_correction += I[h->h](a_coarseCorrection)

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual void AMRNodeOp::AMRUpdateResidual LevelData< NodeFArrayBox > &  a_residual,
const LevelData< NodeFArrayBox > &  a_correction,
const LevelData< NodeFArrayBox > &  a_coarseCorrection
[virtual]
 

a_residual = a_residual - L(a_correction, a_coarseCorrection)

Implements AMRLevelOp< LevelData< NodeFArrayBox > >.

virtual Real AMRNodeOp::AMRNorm const LevelData< NodeFArrayBox > &  a_coarseResid,
const LevelData< NodeFArrayBox > &  a_fineResid,
const int &  a_refRat,
const int &  a_ord
[virtual]
 

compute norm over all cells on coarse not covered by finer

Reimplemented from AMRLevelOp< LevelData< NodeFArrayBox > >.

void AMRNodeOp::prolongIncrement LevelData< NodeFArrayBox > &  a_phiThisLevel,
const LevelData< NodeFArrayBox > &  a_correctCoarse,
int  a_refRat
[protected]
 

void AMRNodeOp::levelGSRB LevelData< NodeFArrayBox > &  a_e,
const LevelData< NodeFArrayBox > &  a_residual
[protected]
 

void AMRNodeOp::homogeneousCFInterp LevelData< NodeFArrayBox > &  a_phif  )  [protected]
 

void AMRNodeOp::homogeneousCFInterp LevelData< NodeFArrayBox > &  a_phif,
const DataIndex a_datInd,
int  a_idir,
Side::LoHiSide  a_hiorlo
[protected]
 

void AMRNodeOp::setCFIVS const DisjointBoxLayout a_grids  )  [protected]
 


Member Data Documentation

Real AMRNodeOp::m_alpha
 

Real AMRNodeOp::m_beta
 

ProblemDomain AMRNodeOp::m_domainInteriorNodes [protected]
 

Real AMRNodeOp::m_dx [protected]
 

Real AMRNodeOp::m_dxCrse [protected]
 

ProblemDomain AMRNodeOp::m_domain [protected]
 

NodeLevelDataOps AMRNodeOp::m_levelOps [protected]
 

NodeBCFunc AMRNodeOp::m_bc [protected]
 

LayoutData<NodeCFIVS> AMRNodeOp::m_loCFIVS[SpaceDim] [protected]
 

LayoutData<NodeCFIVS> AMRNodeOp::m_hiCFIVS[SpaceDim] [protected]
 

Copier AMRNodeOp::m_exchangeCopier [protected]
 

NodeQCFI AMRNodeOp::m_interpWithCoarser [protected]
 

NodeCoarseAverage AMRNodeOp::m_averageOpMG [protected]
 

int AMRNodeOp::m_refToCoarser [protected]
 

int AMRNodeOp::m_refToFiner [protected]
 

DisjointBoxLayout AMRNodeOp::m_coarsenedFineGrids [protected]
 

bool AMRNodeOp::m_hasFiner [protected]
 

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

interior boundary nodes

LayoutData< BitSet > AMRNodeOp::m_IVSVfull [protected]
 

whether each section of m_IVSV is a complete box

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

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

interior boundary nodes of the coarsened grids at this level

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

interior boundary nodes of the coarsened grids at next finer level


The documentation for this class was generated from the following file:
Generated on Fri May 4 13:31:28 2007 for Chombo by doxygen 1.3.6