11 #ifndef _AMRPOISSONOP_H_ 12 #define _AMRPOISSONOP_H_ 28 #include "NamespaceHeader.H" 62 const Real& a_dxLevel,
69 const int a_nComp = 1);
74 const Real& a_dxLevel,
81 const int a_nComp = 1);
90 const Real& a_dxLevel,
132 bool a_homogeneous =
false);
141 bool a_homogeneous =
false);
147 bool a_homogeneous =
false);
154 bool a_homogeneous =
false);
159 bool a_homogeneous =
false);
169 const int& a_refRat);
208 const Real& a_scale);
270 bool a_homogeneousPhysBC,
279 bool a_homogeneousPhysBC,
287 bool a_homogeneousPhysBC);
297 bool a_homogeneousDomBC,
308 bool a_homogeneousBC,
319 bool a_homogeneousBC);
331 bool a_skip_res =
false );
338 bool a_skip_res =
false );
360 const Copier& a_cornerCopier,
391 bool a_kappaWeighted)
418 for (
int idir = 0; idir <
SpaceDim; idir++)
420 getFlux(a_flux[idir], data, a_flux[idir].
box(), idir, 1);
421 a_flux[idir] *= a_scale;
426 const char* a_filename);
502 const Box& a_edgebox,
504 int a_ref = 1)
const ;
509 int a_ref = 1)
const ;
538 const Real& a_coarsedx,
555 bool a_homoOnly =
true);
579 #include "NamespaceFooter.H" virtual void assignLocal(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs)
virtual void setAlphaAndBeta(const Real &a_alpha, const Real &a_beta)
For tga to reset stuff.
virtual void reflux(const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, LevelData< FArrayBox > &a_residual, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
virtual void incr(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_x, Real a_scale)
virtual Real dx() const
Definition: AMRPoissonOp.H:443
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, BCHolder a_bc, const Copier &a_exchange, const CFRegion &a_cfregion, const int a_nComp=1)
virtual void AMRResidualNF(LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_phiCoarse, const LevelData< FArrayBox > &a_rhs, bool a_homogeneousPhysBC)
virtual void residualI(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs, bool a_homogeneous=false)
despite what you might think, the "I" here means "Ignore the coarse-fine boundary" ...
virtual void AMRResidual(LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_phiCoarse, const LevelData< FArrayBox > &a_rhs, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
virtual void assign(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs)
virtual Real AMRNorm(const LevelData< FArrayBox > &a_coarseResid, const LevelData< FArrayBox > &a_fineResid, const int &a_refRat, const int &a_ord)
virtual void write(const LevelData< FArrayBox > *a_data, const char *a_filename)
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
virtual void AMRProlongS(LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection, LevelData< FArrayBox > &a_temp, const Copier &a_copier)
virtual void mDotProduct(const LevelData< FArrayBox > &a_1, const int a_sz, const LevelData< FArrayBox > a_2[], Real a_mdots[])
Real m_dx
Definition: AMRPoissonOp.H:449
BCHolder m_bc
Definition: AMRPoissonOp.H:570
virtual void levelJacobi(LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
Definition: AMRPoissonOp.H:516
virtual void fillGrad(const LevelData< FArrayBox > &a_phi)
These functions are part of the LevelTGA interface......
Definition: AMRPoissonOp.H:400
Vector< int > m_refRatios
Definition: AMRPoissonOp.H:568
virtual void axby(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_x, const LevelData< FArrayBox > &a_y, Real a_a, Real a_b)
virtual void createCoarser(LevelData< FArrayBox > &a_coarse, const LevelData< FArrayBox > &a_fine, bool a_ghosted)
static int s_maxCoarse
Definition: AMRPoissonOp.H:440
AMRPoissonOp()
Definition: AMRPoissonOp.H:46
A strange but true thing to make copying from one boxlayoutdata to another fast.
Definition: Copier.H:145
virtual void AMRProlongS_2(LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection, LevelData< FArrayBox > &a_temp, const Copier &a_copier, const Copier &a_cornerCopier, const AMRLevelOp< LevelData< FArrayBox > > *a_crsOp)
Real m_alpha
public constants
Definition: AMRPoissonOp.H:431
virtual void prolongIncrement(LevelData< FArrayBox > &a_phiThisLevel, const LevelData< FArrayBox > &a_correctCoarse)
Vector< CFRegion > m_cfregion
Definition: AMRPoissonOp.H:576
virtual void relaxNF(LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > *a_phiCoarse, const LevelData< FArrayBox > &a_rhs, int a_iterations)
Do CF interpolation then relax as normal.
Real m_bCoef
Definition: AMRPoissonOp.H:431
virtual void restrictResidual(LevelData< FArrayBox > &a_resCoarse, LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_rhsFine)
virtual void preCond(LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_residual)
static int s_prolongType
Definition: AMRPoissonOp.H:441
Vector< Copier > m_exchangeCopiers
Definition: AMRPoissonOp.H:575
virtual void singleBoxCFInterp(FArrayBox &a_phi)
virtual void overlapGSRB(LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
virtual void AMROperatorNF(LevelData< FArrayBox > &a_LofPhi, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_phiCoarse, bool a_homogeneousBC)
virtual void homogeneousCFInterp(LevelData< FArrayBox > &a_phif)
virtual Real localMaxNorm(const LevelData< FArrayBox > &a_x)
virtual int refToCoarser()
Definition: AMRPoissonOp.H:259
DisjointBoxLayout m_coarsenedMGrids
Definition: AMRPoissonOp.H:462
virtual void scale(LevelData< FArrayBox > &a_lhs, const Real &a_scale)
virtual void levelGSRB(LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
virtual void looseGSRB(LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
virtual void AMRRestrictS(LevelData< FArrayBox > &a_resCoarse, const LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection, LevelData< FArrayBox > &a_scratch, bool a_skip_res=false)
virtual void create(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs)
const int SpaceDim
Definition: SPACE.H:38
CFRegion m_cfregion
Definition: AMRPoissonOp.H:456
virtual void AMRRestrict(LevelData< FArrayBox > &a_resCoarse, const LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection, bool a_skip_res=false)
Definition: AMRMultiGrid.H:39
Definition: EBInterface.H:45
Definition: AMRPoissonOp.H:35
virtual void applyOp(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_phi, bool a_homogeneous=false)
virtual void residual(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs, bool a_homogeneous=false)
Vector< ProblemDomain > m_domains
Definition: AMRPoissonOp.H:564
A FArrayBox-like container for face-centered fluxes.
Definition: FluxBox.H:22
Real m_beta
Definition: AMRPoissonOp.H:573
virtual void setBC(const BCHolder &a_bc)
Change boundary conditions.
Vector< IntVect > m_colors
Definition: AMRPoissonOp.H:437
virtual void AMRResidualNC(LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
virtual void getFlux(FluxBox &a_flux, const LevelData< FArrayBox > &a_data, const Box &a_grid, const DataIndex &a_dit, Real a_scale)
Definition: AMRPoissonOp.H:410
Vector< DisjointBoxLayout > m_boxes
Definition: AMRPoissonOp.H:565
double Real
Definition: REAL.H:33
virtual void divideByIdentityCoef(LevelData< FArrayBox > &a_rhs)
For tga stuff—in this case a noop.
Definition: AMRPoissonOp.H:396
virtual void diagonalScale(LevelData< FArrayBox > &a_rhs, bool a_kappaWeighted)
For tga stuff—in this case a noop.
Definition: AMRPoissonOp.H:390
BCHolder m_bc
Definition: AMRPoissonOp.H:454
Definition: MultiGrid.H:30
LevelFluxRegister m_levfluxreg
Definition: AMRPoissonOp.H:460
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
LoHiSide
Definition: LoHiSide.H:27
virtual ~AMRPoissonOp()
Definition: AMRPoissonOp.H:53
virtual void buildCopier(Copier &a_copier, const LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs)
Class that represents the edge region around a DisjointBoxLayout.
Definition: CFRegion.H:28
virtual void residualNF(LevelData< FArrayBox > &a_lhs, LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > *a_phiCoarse, const LevelData< FArrayBox > &a_rhs, bool a_homogeneous=false)
Residual which uses coarse-level boundary conditions, but ignores finer levels.
LevelFluxRegister-A class to encapsulate a levels worth of flux registers.
Definition: LevelFluxRegister.H:29
ProblemDomain m_domain
Definition: AMRPoissonOp.H:450
static int s_exchangeMode
Definition: AMRPoissonOp.H:438
virtual void applyOpNoBoundary(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs)
virtual void levelGSRBLazy(LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
virtual void zeroCovered(LevelData< FArrayBox > &a_lhs, LevelData< FArrayBox > &a_rhs, const Copier &a_copier)
virtual void createCoarsened(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs, const int &a_refRat)
int nComp() const
Definition: BoxLayoutData.H:306
Definition: DataIndex.H:112
virtual void AMROperatorNC(LevelData< FArrayBox > &a_LofPhi, const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, bool a_homogeneousBC, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
virtual void setToZero(LevelData< FArrayBox > &a_x)
Real m_beta
Definition: AMRPoissonOp.H:431
Definition: FArrayBox.H:45
virtual Real norm(const LevelData< FArrayBox > &a_x, int a_ord)
int m_refToFiner
Definition: AMRPoissonOp.H:465
static int s_relaxMode
Definition: AMRPoissonOp.H:439
virtual void AMRProlong(LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection)
virtual void levelMultiColor(LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
Vector< Real > m_dx
Definition: AMRPoissonOp.H:567
void define(const Box &bx, int n=1)
Resize FluxBox similar to BaseFab::resize()
Real m_dxCrse
Definition: AMRPoissonOp.H:435
virtual void assignCopier(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs, const Copier &a_copier)
int m_refToCoarser
Definition: AMRPoissonOp.H:464
Real m_alpha
Definition: AMRPoissonOp.H:572
Definition: AMRMultiGrid.H:233
virtual void applyOpI(LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_phi, bool a_homogeneous=false)
despite what you might think, the "I" here means "Ignore the coarse-fine boundary" ...
LevelDataOps< FArrayBox > m_levelOps
Definition: AMRPoissonOp.H:452
virtual Real dotProduct(const LevelData< FArrayBox > &a_1, const LevelData< FArrayBox > &a_2)
virtual ~AMRPoissonOpFactory()
Definition: AMRPoissonOp.H:519
virtual void AMRUpdateResidual(LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection)
virtual void AMROperator(LevelData< FArrayBox > &a_LofPhi, const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_phiCoarse, bool a_homogeneousDomBC, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
QuadCFInterp m_interpWithCoarser
Definition: AMRPoissonOp.H:458
Real m_aCoef
Definition: AMRPoissonOp.H:431
virtual void interpOnIVSHomo(LevelData< FArrayBox > &a_phif, const DataIndex &a_datInd, const int a_idir, const Side::LoHiSide a_hiorlo, const IntVectSet &a_interpIVS)
Copier m_exchangeCopier
Definition: AMRPoissonOp.H:457
Quadratic coarse-fine interpolation utility.
Definition: QuadCFInterp.H:36
virtual void relax(LevelData< FArrayBox > &a_e, const LevelData< FArrayBox > &a_residual, int a_iterations)