Chombo + EB
3.0
|
#include <AMRNodeOp.H>
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 Member Functions inherited from AMRLevelOp< LevelData< NodeFArrayBox > > | |
virtual void | dumpAMR (Vector< LevelData< NodeFArrayBox > * > &a_data, string name) |
virtual void | dumpLevel (LevelData< NodeFArrayBox > &a_data, string name) |
AMRLevelOp () | |
Constructor. More... | |
virtual void | dumpStuff (Vector< LevelData< NodeFArrayBox > * > data, string filename) |
virtual | ~AMRLevelOp () |
Destructor. More... | |
virtual void | outputLevel (LevelData< NodeFArrayBox > &a_rhs, string &a_name) |
virtual void | outputAMR (Vector< LevelData< NodeFArrayBox > * > &a_rhs, string &a_name) |
virtual void | buildCopier (Copier &a_copier, const LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_rhs) |
virtual void | assignCopier (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_rhs, const Copier &a_copier) |
virtual void | zeroCovered (LevelData< NodeFArrayBox > &a_lhs, LevelData< NodeFArrayBox > &a_rhs, const Copier &a_copier) |
virtual Real | localMaxNorm (const LevelData< NodeFArrayBox > &a_phi) |
virtual void | AMRProlongS (LevelData< NodeFArrayBox > &a_correction, const LevelData< NodeFArrayBox > &a_coarseCorrection, LevelData< NodeFArrayBox > &a_temp, const Copier &a_copier) |
virtual void | AMRRestrictS (LevelData< NodeFArrayBox > &a_resCoarse, const LevelData< NodeFArrayBox > &a_residual, const LevelData< NodeFArrayBox > &a_correction, const LevelData< NodeFArrayBox > &a_coarseCorrection, LevelData< NodeFArrayBox > &scratch) |
virtual unsigned int | orderOfAccuracy (void) const |
virtual void | enforceCFConsistency (LevelData< NodeFArrayBox > &a_coarseCorrection, const LevelData< NodeFArrayBox > &a_correction) |
This routine is for operators with orderOfAccuracy()>2. More... | |
Public Member Functions inherited from MGLevelOp< LevelData< NodeFArrayBox > > | |
MGLevelOp () | |
Constructor. More... | |
virtual | ~MGLevelOp () |
Destructor. More... | |
void | addObserver (MGLevelOpObserver< LevelData< NodeFArrayBox > > *a_observer) |
void | removeObserver (MGLevelOpObserver< LevelData< NodeFArrayBox > > *a_observer) |
void | addCoarserObserver (MGLevelOp< LevelData< NodeFArrayBox > > *a_operator, int a_coarseningFactor) |
void | notifyObserversOfChange () |
This should be called whenever the operator's data is updated. More... | |
virtual void | finerOperatorChanged (const MGLevelOp< LevelData< NodeFArrayBox > > &a_operator, int a_coarseningFactor) |
int | numObservers () const |
Returns the number of objects observing this operator. More... | |
Public Member Functions inherited from LinearOp< LevelData< NodeFArrayBox > > | |
virtual | ~LinearOp () |
virtual void | clear (LevelData< NodeFArrayBox > &a_lhs) |
virtual void | assignLocal (LevelData< NodeFArrayBox > &a_lhs, const LevelData< NodeFArrayBox > &a_rhs) |
virtual void | mDotProduct (const LevelData< NodeFArrayBox > &a_1, const int a_sz, const LevelData< NodeFArrayBox > a_2[], Real a_mdots[]) |
virtual Real | dx () const |
virtual void | write (const LevelData< NodeFArrayBox > *a, const char *filename) |
Public Member Functions inherited from MGLevelOpObserver< LevelData< NodeFArrayBox > > | |
MGLevelOpObserver () | |
Base level Constructor. Called by all subclasses. More... | |
virtual | ~MGLevelOpObserver () |
Destructor. More... | |
virtual void | operatorChanged (const MGLevelOp< LevelData< NodeFArrayBox > > &a_operator) |
void | setObservee (MGLevelOp< LevelData< NodeFArrayBox > > *a_observee) |
void | clearObservee () |
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) |
AMRNodeOp::AMRNodeOp | ( | ) |
|
inlinevirtual |
void AMRNodeOp::define | ( | const DisjointBoxLayout & | a_grids, |
const Real & | a_dx, | ||
const ProblemDomain & | a_domain, | ||
NodeBCFunc | a_bc | ||
) |
Referenced by ~AMRNodeOp(), and AMRNodeOpFactory::~AMRNodeOpFactory().
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 | ||
) |
Referenced by ~AMRNodeOp().
|
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 > >.
Referenced by ~AMRNodeOp().
|
virtual |
Given the current state of the residual the correction, apply your preconditioner to a_cor.
Implements LinearOp< LevelData< NodeFArrayBox > >.
Referenced by ~AMRNodeOp().
|
virtual |
Referenced by ~AMRNodeOp().
|
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 > >.
Referenced by ~AMRNodeOp().
|
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 > >.
Referenced by ~AMRNodeOp().
|
virtual |
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by ~AMRNodeOp().
|
virtual |
Set a_lhs equal to a_rhs.
Implements LinearOp< LevelData< NodeFArrayBox > >.
Referenced by ~AMRNodeOp().
|
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 > >.
Referenced by ~AMRNodeOp().
|
virtual |
Increment by scaled amount (a_lhs += a_scale*a_x).
Implements LinearOp< LevelData< NodeFArrayBox > >.
Referenced by ~AMRNodeOp().
|
virtual |
Set input to a scaled sum (a_lhs = a_a*a_x + a_b*a_y).
Implements LinearOp< LevelData< NodeFArrayBox > >.
Referenced by ~AMRNodeOp().
|
virtual |
Multiply the input by a given scale (a_lhs *= a_scale).
Implements LinearOp< LevelData< NodeFArrayBox > >.
Referenced by ~AMRNodeOp().
|
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 > >.
Referenced by ~AMRNodeOp().
|
virtual |
|
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 > >.
Referenced by ~AMRNodeOp().
|
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 > >.
Referenced by ~AMRNodeOp().
|
virtual |
calculate restricted residual a_resCoarse[2h] = I[h->2h] (rhsFine[h] - L[h](phiFine[h])
Implements MGLevelOp< LevelData< NodeFArrayBox > >.
Referenced by ~AMRNodeOp().
|
virtual |
correct the fine solution based on coarse correction a_phiThisLevel += I[2h->h](a_correctCoarse)
Implements MGLevelOp< LevelData< NodeFArrayBox > >.
Referenced by ~AMRNodeOp().
|
inlinevirtual |
return the refinement ratio to next coarser level. return 1 when there are no coarser AMRLevelOp objects.
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
References AMRNorm(), AMROperator(), AMROperatorNC(), AMROperatorNF(), AMRProlong(), AMRResidual(), AMRResidualNC(), AMRResidualNF(), AMRRestrict(), AMRUpdateResidual(), and m_refToCoarser.
|
virtual |
a_residual = a_rhs - L(a_phi, a_phiFine, a_phiCoarse)
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by refToCoarser().
|
virtual |
residual assuming no more coarser AMR levels
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by refToCoarser().
|
virtual |
a_residual = a_rhs - L(a_phi, a_phiCoarse)
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by refToCoarser().
|
virtual |
apply AMR operator
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by refToCoarser().
|
virtual |
apply AMR operator, assuming no more coarser AMR levels
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by refToCoarser().
|
virtual |
AMR operator, assuming no finer AMR levels
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by refToCoarser().
|
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 > >.
Referenced by refToCoarser().
|
virtual |
a_correction += I[h->h](a_coarseCorrection)
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by refToCoarser().
|
virtual |
a_residual = a_residual - L(a_correction, a_coarseCorrection)
Implements AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by refToCoarser().
|
virtual |
compute norm over all cells on coarse not covered by finer
Reimplemented from AMRLevelOp< LevelData< NodeFArrayBox > >.
Referenced by refToCoarser().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Real AMRNodeOp::m_alpha |
Real AMRNodeOp::m_beta |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by refToCoarser().
|
protected |
|
protected |
|
protected |
|
protected |
interior boundary nodes
|
protected |
whether each section of m_IVSV is a complete box
|
protected |
|
protected |
interior boundary nodes of the coarsened grids at this level
|
protected |
interior boundary nodes of the coarsened grids at next finer level