NodePoissonOp Class Reference

#include <NodePoissonOp.H>

Inheritance diagram for NodePoissonOp:

Inheritance graph
[legend]
Collaboration diagram for NodePoissonOp:

Collaboration graph
[legend]

List of all members.


Detailed Description

Node-centered Poisson operator.

This class contains stuff to solve div (grad phi) = rhs at one level.

Public Member Functions

Constructors, destructor and defines
 NodePoissonOp ()
virtual NodeLevelOpnew_levelop () const
 ~NodePoissonOp ()
void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_gridsCoarsePtr, Real a_dx, int a_refToCoarse, const ProblemDomain &a_domain, bool a_homogeneousOnly=false, int a_ncomp=1, bool a_verbose=false)
void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_gridsCoarsePtr, Real a_dx, int a_refToCoarse, const Box &a_domain, bool a_homogeneousOnly=false, int a_ncomp=1, bool a_verbose=false)
void define (const NodeLevelOp *a_opfine, int a_refToFine)
Access functions
virtual bool isDefined () const
Parameter-setting functions
virtual void setVerbose (bool a_verbose)
void setBottomSmoother (const NodeBaseBottomSmoother &a_bottomSmoother)
void setDomainNodeBC (const DomainNodeBC &a_dombcin)
void setInterpolationDegree (int a_interpolationDegree)
Coarse/fine interpolation functions
void CFInterp (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_phiCoarse, bool a_inhomogeneous)
void homogeneousCFInterp (LevelData< NodeFArrayBox > &a_phi)
Evaluation of residual
void residualI (LevelData< NodeFArrayBox > &a_resid, LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > *a_phiCoarsePtr, const LevelData< NodeFArrayBox > &a_rhs)
void residualH (LevelData< NodeFArrayBox > &a_resid, LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs)
void residualIcfHphys (LevelData< NodeFArrayBox > &a_resid, LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > *a_phiCoarsePtr, const LevelData< NodeFArrayBox > &a_rhs)
void residualHcfIphys (LevelData< NodeFArrayBox > &a_resid, LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs)
Evaluation of operator
void applyOpI (LevelData< NodeFArrayBox > &a_LofPhi, LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > *a_phiCoarsePtr)
void applyOpH (LevelData< NodeFArrayBox > &a_LofPhi, LevelData< NodeFArrayBox > &a_phi)
void applyOpIcfHphys (LevelData< NodeFArrayBox > &a_LofPhi, LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > *a_phiCoarsePtr)
void applyOpHcfIphys (LevelData< NodeFArrayBox > &a_LofPhi, LevelData< NodeFArrayBox > &a_phi)
Evaluation of gradient
void gradient (LevelData< NodeFArrayBox > &a_gradPhi, LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > *a_phiCoarsePtr)
Smoothing functions
void smooth (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs)
void levelPreconditioner (LevelData< NodeFArrayBox > &a_phihat, const LevelData< NodeFArrayBox > &a_rhshat)
void bottomSmoother (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs)

Protected Attributes

DomainNodeBC m_dombc
int m_interpolationDegree
ProblemDomain m_domainInteriorNodes
DisjointBoxLayout m_grids
Copier m_exchangeCopier
DisjointBoxLayout m_gridsCoarse
int m_ncomp
int m_refToCoarse
Real m_dx
Real m_dxCoarse
bool m_isDefined
bool m_isBCDefined
bool m_ihcfiEnabled
LayoutData< NodeCFIVSm_loCFIVS [SpaceDim]
LayoutData< NodeCFIVSm_hiCFIVS [SpaceDim]
NodeQuadCFInterp m_qcfi
NodeBaseBottomSmootherm_bottomSmootherPtr
LayoutData< Vector< IntVectSet > > m_IVSV
LayoutData< BitSetm_IVSVfull

Private Member Functions

void setCFIVS ()
void levelGSRB (LevelData< NodeFArrayBox > &a_phi, const LevelData< NodeFArrayBox > &a_rhs)
void applyOpOnly (LevelData< NodeFArrayBox > &a_LofPhi, const LevelData< NodeFArrayBox > &a_phi)
void gradientOnly (LevelData< NodeFArrayBox > &a_gradPhi, const LevelData< NodeFArrayBox > &a_phi)
void homogeneousCFInterp (FArrayBox &a_phiFab, const DataIndex &a_datInd, const int a_idir, const Side::LoHiSide a_hiorlo)
void clearMemory ()
void setDefaultValues ()
void residualDiff (LevelData< NodeFArrayBox > &a_resid, const LevelData< NodeFArrayBox > &a_rhs)


Constructor & Destructor Documentation

NodePoissonOp::NodePoissonOp (  ) 

Default constructor. User must subsequently call define().

NodePoissonOp::~NodePoissonOp (  ) 

Destructor.


Member Function Documentation

virtual NodeLevelOp* NodePoissonOp::new_levelop (  )  const [virtual]

Virtual constructor workaround. Sets these to be the same as this:

  • m_dombc, boundary condition;
  • m_interpolationDegree, degree of c/f interpolation;
  • m_bottomSmootherPtr, pointer to bottom smoother.

Implements NodeLevelOp.

void NodePoissonOp::define ( const DisjointBoxLayout a_grids,
const DisjointBoxLayout a_gridsCoarsePtr,
Real  a_dx,
int  a_refToCoarse,
const ProblemDomain a_domain,
bool  a_homogeneousOnly = false,
int  a_ncomp = 1,
bool  a_verbose = false 
) [virtual]

Full define function. Makes all coarse/fine information and sets internal variables. The current level is taken to be the fine level.

Parameters:
a_grids  grids at this level
a_gridsCoarsePtr  pointer to grids at next coarser AMR level, or NULL if none
a_dx  mesh spacing at this level
a_refToCoarse  refinement ratio between this and next coarser level
a_domain  physical domain at this level
a_homogeneousOnly  only homogeneous coarse/fine interpolation?
a_ncomp  number of components
a_verbose  verbose output?

Implements NodeLevelOp.

void NodePoissonOp::define ( const DisjointBoxLayout a_grids,
const DisjointBoxLayout a_gridsCoarsePtr,
Real  a_dx,
int  a_refToCoarse,
const Box a_domain,
bool  a_homogeneousOnly = false,
int  a_ncomp = 1,
bool  a_verbose = false 
) [virtual]

Full define function. Makes all coarse/fine information and sets internal variables. The current level is taken to be the fine level.

Parameters:
a_grids  grids at this level
a_gridsCoarsePtr  pointer to grids at next coarser AMR level, or NULL if none
a_dx  mesh spacing at this level
a_refToCoarse  refinement ratio between this and next coarser level
a_domain  physical domain at this level
a_homogeneousOnly  only homogeneous coarse/fine interpolation?
a_ncomp  number of components
a_verbose  verbose output?

Implements NodeLevelOp.

void NodePoissonOp::define ( const NodeLevelOp a_opfine,
int  a_refToFine 
) [virtual]

Full define function, based on a coarsening of the finer NodeLevelOp. Coarse-level grids are not set because only homogeneous interpolation is used.

Parameters:
a_opfine  pointer to NodeLevelOp at next finer level
a_refToFine  refinement ratio between a_opfine's and this level

Implements NodeLevelOp.

virtual bool NodePoissonOp::isDefined (  )  const [virtual]

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

Implements NodeLevelOp.

virtual void NodePoissonOp::setVerbose ( bool  a_verbose  )  [virtual]

set max number of bottomSmoother iterations Control output to stdout.

Reimplemented from NodeLevelOp.

void NodePoissonOp::setBottomSmoother ( const NodeBaseBottomSmoother a_bottomSmoother  ) 

Set bottom smoother.

void NodePoissonOp::setDomainNodeBC ( const DomainNodeBC a_dombcin  ) 

Set physical boundary conditions.

void NodePoissonOp::setInterpolationDegree ( int  a_interpolationDegree  ) 

Set interpolation degree in NodeQuadCFInterp:

  • 1 for linear in 2-D or bilinear in 3-D;
  • 2 (default) for quadratic in 2-D or biquadratic in 3-D.

Like setDomainNodeBC, this function must be called before define(). You cannot change the interpolation degree later.

void NodePoissonOp::CFInterp ( LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_phiCoarse,
bool  a_inhomogeneous 
) [virtual]

Coarse / Fine (inhomogeneous) interpolation operator. Fill the nodes of a_phi on the coarse/fine interface with interpolated data from a_phiCoarse.

Parameters:
a_phi  the data at this level
a_phiCoarse  the data at the next coarser level
a_inhomogeneous  inhomogeneous physical boundary condition?

Implements NodeLevelOp.

void NodePoissonOp::homogeneousCFInterp ( LevelData< NodeFArrayBox > &  a_phi  )  [virtual]

Homogeneous coarse/fine interpolation operator. Fill the nodes of a_phi on the coarse/fine interface with zeroes.

Parameters:
a_phi  the data at this level

Implements NodeLevelOp.

void NodePoissonOp::residualI ( LevelData< NodeFArrayBox > &  a_resid,
LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > *  a_phiCoarsePtr,
const LevelData< NodeFArrayBox > &  a_rhs 
) [virtual]

Evaluate residual of operator,
a_resid = a_rhs - operator(a_phi),
with inhomogeneous coarse/fine boundary conditions, inhomogeneous physical boundary conditions.

The operator is evaluated on a_phi, after interpolating from *a_phiCoarsePtr at the coarse/fine boundary and applying the physical boundary conditions.

Parameters:
a_resid  the residual, at interior nodes
a_phi  the data at this level, interpolated from *a_phiCoarsePtr at coarse/fine boundary
a_phiCoarsePtr  pointer to data at next coarser level
a_rhs  right-hand side at this level

Implements NodeLevelOp.

void NodePoissonOp::residualH ( LevelData< NodeFArrayBox > &  a_resid,
LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_rhs 
) [virtual]

Evaluate residual of operator,
a_resid = a_rhs - operator(a_phi),
with homogeneous coarse/fine boundary conditions, homogeneous physical boundary conditions.

The operator is evaluated on a_phi, after setting to zero at the coarse/fine boundary and applying homogeneous physical boundary conditions.

Parameters:
a_resid  the residual, at interior nodes
a_phi  the data at this level, set to zero at coarse/fine boundary
a_rhs  right-hand side at this level

Implements NodeLevelOp.

void NodePoissonOp::residualIcfHphys ( LevelData< NodeFArrayBox > &  a_resid,
LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > *  a_phiCoarsePtr,
const LevelData< NodeFArrayBox > &  a_rhs 
) [virtual]

Evaluate residual of operator,
a_resid = a_rhs - operator(a_phi),
with inhomogeneous coarse/fine boundary conditions, homogeneous physical boundary conditions.

The operator is evaluated on a_phi, after interpolating from *a_phiCoarsePtr at the coarse/fine boundary and applying homogeneous physical boundary conditions.

Parameters:
a_resid  the residual, at interior nodes
a_phi  the data at this level, interpolated from *a_phiCoarsePtr at coarse/fine boundary
a_phiCoarsePtr  pointer to data at next coarser level
a_rhs  right-hand side at this level

Implements NodeLevelOp.

void NodePoissonOp::residualHcfIphys ( LevelData< NodeFArrayBox > &  a_resid,
LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_rhs 
) [virtual]

Evaluate residual of operator,
a_resid = a_rhs - operator(a_phi),
with homogeneous coarse/fine boundary conditions, inhomogeneous physical boundary conditions.

The operator is evaluated on a_phi, after setting to zero at the coarse/fine boundary and applying the physical boundary conditions.

Parameters:
a_resid  the residual, at interior nodes
a_phi  the data at this level, set to zero at coarse/fine boundary
a_rhs  right-hand side at this level

Implements NodeLevelOp.

void NodePoissonOp::applyOpI ( LevelData< NodeFArrayBox > &  a_LofPhi,
LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > *  a_phiCoarsePtr 
) [virtual]

Evaluate operator, inhomogeneous coarse/fine boundary conditions, inhomogeneous physical boundary conditions.

The operator is evaluated on a_phi after interpolating from *a_phiCoarsePtr at the coarse/fine boundary and applying the physical boundary conditions.

Parameters:
a_LofPhi  value of the operator, at interior nodes
a_phi  the data at this level, interpolated from *a_phiCoarsePtr at coarse/fine boundary
a_phiCoarsePtr  pointer to data at next coarser level

Implements NodeLevelOp.

void NodePoissonOp::applyOpH ( LevelData< NodeFArrayBox > &  a_LofPhi,
LevelData< NodeFArrayBox > &  a_phi 
) [virtual]

Evaluate operator, homogeneous coarse/fine boundary conditions, homogeneous physical boundary conditions.

The operator is evaluated on a_phi, after setting to zero at the coarse/fine boundary and applying homogeneous physical boundary conditions.

Parameters:
a_LofPhi  value of the operator, at interior nodes
a_phi  the data at this level, set to zero at coarse/fine boundary

Implements NodeLevelOp.

void NodePoissonOp::applyOpIcfHphys ( LevelData< NodeFArrayBox > &  a_LofPhi,
LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > *  a_phiCoarsePtr 
) [virtual]

Evaluate operator, inhomogeneous coarse/fine boundary conditions, homogeneous physical boundary conditions.

The operator is evaluated on a_phi, after interpolating from *a_phiCoarsePtr at the coarse/fine boundary and applying homogeneous physical boundary conditions.

Parameters:
a_LofPhi  value of the operator, at interior nodes
a_phi  the data at this level, interpolated from *a_phiCoarsePtr at coarse/fine boundary
a_phiCoarsePtr  pointer to data at next coarser level

Implements NodeLevelOp.

void NodePoissonOp::applyOpHcfIphys ( LevelData< NodeFArrayBox > &  a_LofPhi,
LevelData< NodeFArrayBox > &  a_phi 
) [virtual]

Evaluate operator, homogeneous coarse/fine boundary conditions, inhomogeneous physical boundary conditions.

The operator is evaluated on a_phi, after setting to zero at the coarse/fine boundary and applying the physical boundary conditions.

Parameters:
a_LofPhi  value of the operator, at interior nodes
a_phi  the data at this level, interpolated from *a_phiCoarsePtr at coarse/fine boundary

Implements NodeLevelOp.

void NodePoissonOp::gradient ( LevelData< NodeFArrayBox > &  a_gradPhi,
LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > *  a_phiCoarsePtr 
) [virtual]

Evaluate gradient, inhomogeneous coarse/fine boundary conditions, inhomogeneous physical boundary conditions.

The gradient is evaluated on a_phi after interpolating from *a_phiCoarsePtr at the coarse/fine boundary and applying the physical boundary conditions.

Parameters:
a_gradPhi  value of the gradient, at interior nodes
a_phi  the data at this level, interpolated from *a_phiCoarsePtr at coarse/fine boundary
a_phiCoarsePtr  pointer to data at next coarser level

Implements NodeLevelOp.

void NodePoissonOp::smooth ( LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_rhs 
) [virtual]

Smoother. Assumes that problem has already been put in residual-correction form, so that coarse/fine boundary conditions are homogeneous.

Parameters:
a_phi  the data at this level
a_rhs  right-hand side at this level

Implements NodeLevelOp.

void NodePoissonOp::levelPreconditioner ( LevelData< NodeFArrayBox > &  a_phihat,
const LevelData< NodeFArrayBox > &  a_rhshat 
) [virtual]

Apply preconditioning to the solution on this level. Given a_rhshat, returns a_phihat from M(a_phihat) = a_rhshat .

Parameters:
a_phihat  data at this level
a_rhshat  right-hand side at this level

Implements NodeLevelOp.

void NodePoissonOp::bottomSmoother ( LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_rhs 
) [virtual]

Do a smoothing at the bottom level. Default is conjugate gradient.

Parameters:
a_phi  data at this level
a_rhs  right-hand side at this level

Implements NodeLevelOp.

void NodePoissonOp::setCFIVS (  )  [private]

Get members related to the coarse/fine interface.

void NodePoissonOp::levelGSRB ( LevelData< NodeFArrayBox > &  a_phi,
const LevelData< NodeFArrayBox > &  a_rhs 
) [private]

Does GSRB on a level.

void NodePoissonOp::applyOpOnly ( LevelData< NodeFArrayBox > &  a_LofPhi,
const LevelData< NodeFArrayBox > &  a_phi 
) [private]

Applies operator, after coarse/fine and physical boundary conditions have been set.

void NodePoissonOp::gradientOnly ( LevelData< NodeFArrayBox > &  a_gradPhi,
const LevelData< NodeFArrayBox > &  a_phi 
) [private]

Evaluates gradient, after coarse/fine and physical boundary conditions have been set.

void NodePoissonOp::homogeneousCFInterp ( FArrayBox a_phiFab,
const DataIndex a_datInd,
const int  a_idir,
const Side::LoHiSide  a_hiorlo 
) [private]

Does homogeneous coarse/fine interpolation.

void NodePoissonOp::clearMemory (  )  [private]

void NodePoissonOp::setDefaultValues (  )  [private]

void NodePoissonOp::residualDiff ( LevelData< NodeFArrayBox > &  a_resid,
const LevelData< NodeFArrayBox > &  a_rhs 
) [private]


Member Data Documentation

boundary conditons

degree of interpolation at c/f interfaces: 1 for (bi)linear, 2 for (bi)quadratic

nodes inside physical domain of current level

CELL-centered grids at the current level

Copier object that knows how to perform exchange operations on LevelData objects defined on m_grids

CELL-centered grids at next coarser level, if any

int NodePoissonOp::m_ncomp [protected]

number of components

refinement ratio between this and the next coarser level

mesh spacing at this level

mesh spacing at next coarser level

bool NodePoissonOp::m_isDefined [protected]

has full define function been called?

bool NodePoissonOp::m_isBCDefined [protected]

has boundary condition been defined?

is inhomogeneous CF interpolation possible?

used for figuring out which nodes lie on interface with next coarser level

used for figuring out which nodes lie on interface with next coarser level

coarse-fine quadratic interpolation

bottom smoother object

interior boundary nodes

whether each section of m_IVSV is a complete box


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

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