13#ifndef CD_EBHELMHOLTZOP_H
14#define CD_EBHELMHOLTZOP_H
23#include <VCAggStencil.H>
33#include <CD_EBHelmholtzEBBC.H>
34#include <CD_EBHelmholtzDomainBC.H>
35#include <CD_NamespaceHeader.H>
41class EBHelmholtzOp :
public LevelTGAHelmOp<LevelData<EBCellFAB>, EBFluxFAB>
54 RestrictedAdditiveSchwarz,
113 const EBLevelGrid& a_eblgFine,
114 const EBLevelGrid& a_eblg,
115 const EBLevelGrid& a_eblgCoFi,
116 const EBLevelGrid& a_eblgCoar,
117 const EBLevelGrid& a_eblgCoFiMG,
118 const EBLevelGrid& a_eblgCoarMG,
119 const RefCountedPtr<LevelData<BaseFab<bool>>>& a_validCells,
120 const RefCountedPtr<EBMultigridInterpolator>& a_interpolator,
121 const RefCountedPtr<EBReflux>& a_fluxReg,
122 const RefCountedPtr<EBCoarAve>& a_coarAve,
123 const RefCountedPtr<EBHelmholtzDomainBC>& a_domainBC,
124 const RefCountedPtr<EBHelmholtzEBBC>& a_ebBC,
125 const RealVect& a_probLo,
127 const int& a_refToFine,
128 const int& a_refToCoar,
129 const bool& a_hasFine,
130 const bool& a_hasCoar,
131 const bool& a_hasMGObjects,
134 const RefCountedPtr<LevelData<EBCellFAB>>& a_Acoef,
135 const RefCountedPtr<LevelData<EBFluxFAB>>& a_Bcoef,
136 const RefCountedPtr<LevelData<BaseIVFAB<Real>>>& a_BcoefIrreg,
137 const IntVect& a_ghostPhi,
138 const IntVect& a_ghostRhs,
140 const Real& a_relaxFactor,
141 const int& a_chebyOrder,
142 const Real& a_chebyEigRatio,
143 const int& a_rasInnerSweeps,
144 const bool a_refluxFree =
false);
213 setAcoAndBco(
const RefCountedPtr<LevelData<EBCellFAB>>& a_Acoef,
214 const RefCountedPtr<LevelData<EBFluxFAB>>& a_Bcoef,
215 const RefCountedPtr<LevelData<BaseIVFAB<Real>>>& a_BcoefIrreg);
221 const RefCountedPtr<LevelData<EBCellFAB>>&
228 const RefCountedPtr<LevelData<EBFluxFAB>>&
235 const RefCountedPtr<LevelData<BaseIVFAB<Real>>>&
246 coarsenCell(LevelData<EBCellFAB>& a_phi,
const LevelData<EBCellFAB>& a_phiFine);
256 coarsenFlux(LevelData<EBFluxFAB>& a_flux,
const LevelData<EBFluxFAB>& a_fineFlux);
272 const EBCellFAB& a_resid,
273 const EBCellFAB& a_Acoef,
274 const EBFluxFAB& a_Bcoef,
275 const BaseIVFAB<Real>& a_BcoefIrreg,
276 const Box& a_cellBox,
277 const DataIndex& a_dit)
const noexcept;
295 const EBCellFAB& a_resid,
296 const EBCellFAB& a_Acoef,
297 const EBFluxFAB& a_Bcoef,
298 const BaseIVFAB<Real>& a_BcoefIrreg,
299 const Box& a_cellBox,
300 const DataIndex& a_dit,
301 const Real a_omega)
const noexcept;
318 const EBCellFAB& a_resid,
319 const EBCellFAB& a_Acoef,
320 const EBFluxFAB& a_Bcoef,
321 const BaseIVFAB<Real>& a_BcoefIrreg,
322 const Box& a_cellBox,
323 const DataIndex& a_dit,
324 const int& a_redBlack)
const noexcept;
341 const EBCellFAB& a_resid,
342 const EBCellFAB& a_Acoef,
343 const EBFluxFAB& a_Bcoef,
344 const BaseIVFAB<Real>& a_BcoefIrreg,
345 const Box& a_cellBox,
346 const DataIndex& a_dit,
347 const IntVect& a_color)
const noexcept;
357 residual(LevelData<EBCellFAB>& a_residual,
358 const LevelData<EBCellFAB>& a_phi,
359 const LevelData<EBCellFAB>& a_rhs,
360 const bool a_homogeneousPhysBc)
override;
369 preCond(LevelData<EBCellFAB>& a_corr,
const LevelData<EBCellFAB>& a_residual)
override final;
378 interpolateCF(LevelData<EBCellFAB>& a_phiFine,
const LevelData<EBCellFAB>* a_phiCoar,
const bool a_homogeneousCFBC);
404 const LevelData<EBCellFAB>& a_Lphi,
405 const LevelData<EBCellFAB>& a_rhs,
406 const IntVect& a_color)
const;
418 applyOp(LevelData<EBCellFAB>& a_Lphi,
419 const LevelData<EBCellFAB>& a_phi,
420 const LevelData<EBCellFAB>*
const a_phiCoar,
421 const bool a_homogeneousPhysBC,
422 const bool a_homogeneousCFBC);
432 applyOp(LevelData<EBCellFAB>& a_Lphi,
const LevelData<EBCellFAB>& a_phi,
bool a_homogeneousPhysBc)
override final;
448 const EBCellFAB& a_Acoef,
449 const EBFluxFAB& a_Bcoef,
450 const BaseIVFAB<Real>& a_BcoefIrreg,
451 const Box& a_cellBox,
452 const DataIndex& a_dit,
453 const bool a_homogeneousPhysBC)
const noexcept;
469 const EBCellFAB& a_Acoef,
470 const EBFluxFAB& a_Bcoef,
471 const BaseIVFAB<Real>& a_BcoefIrreg,
472 const Box& a_cellBox,
473 const DataIndex& a_dit,
474 const bool a_homogeneousPhysBC)
const noexcept;
488 const EBFluxFAB& a_Bcoef,
489 const Box& a_cellBox,
490 const DataIndex& a_dit,
491 const bool a_homogeneousPhysBc)
const noexcept;
504 const EBCellFAB& a_phi,
505 const Box& a_cellBox,
506 const DataIndex& a_dit,
507 const bool a_homogeneousPhysBC);
523 const EBCellFAB& a_phi,
524 const EBCellFAB& a_Acoef,
525 const EBFluxFAB& a_Bcoef,
526 const BaseIVFAB<Real>& a_BcoefIrreg,
527 const BaseIVFAB<Real>& a_alphaDiagWeight,
528 const Box& a_cellBox,
529 const DataIndex& a_dit,
530 const bool a_homogeneousPhysBC)
const noexcept;
538 create(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs)
override final;
547 assign(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs)
override final;
558 assignCopier(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs,
const Copier& a_copier)
override final;
566 assignLocal(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs)
override final;
575 buildCopier(Copier& a_copier,
const LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs)
override;
584 dotProduct(
const LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs)
override final;
604 const LevelData<EBCellFAB>& a_lhs,
605 const LevelData<EBCellFAB>& a_rhs,
606 const LevelData<BaseFab<bool>>& a_mask,
607 const bool a_needVolume)
const noexcept;
616 incr(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs,
const Real a_scale)
override final;
627 axby(LevelData<EBCellFAB>& a_lhs,
628 const LevelData<EBCellFAB>& a_x,
629 const LevelData<EBCellFAB>& a_y,
631 const Real a_b)
override final;
639 scale(LevelData<EBCellFAB>& a_lhs,
const Real& a_scale)
override final;
647 scaleLocal(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs)
noexcept;
657 norm(
const LevelData<EBCellFAB>& a_rhs,
const int a_order)
override final;
664 setToZero(LevelData<EBCellFAB>& a_lhs)
override final;
673 createCoarser(LevelData<EBCellFAB>& a_coarse,
const LevelData<EBCellFAB>& a_fine,
bool a_ghosted)
override final;
682 relax(LevelData<EBCellFAB>& a_correction,
const LevelData<EBCellFAB>& a_residual,
int a_iterations)
override final;
692 LevelData<EBCellFAB>& a_phi,
693 const LevelData<EBCellFAB>& a_rhs)
override final;
701 prolongIncrement(LevelData<EBCellFAB>& a_phi,
const LevelData<EBCellFAB>& a_correctCoarse)
override final;
722 const LevelData<EBCellFAB>& a_phiFine,
723 const LevelData<EBCellFAB>& a_phi,
724 const LevelData<EBCellFAB>& a_phiCoar,
725 const
bool a_homogeneousPhysBC,
726 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp) override final;
741 const LevelData<EBCellFAB>& a_phiFine,
742 const LevelData<EBCellFAB>& a_phi,
743 const LevelData<EBCellFAB>& a_phiCoar,
744 const
bool a_homogeneousPhysBC,
745 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp);
759 const LevelData<EBCellFAB>& a_phiFine,
760 const LevelData<EBCellFAB>& a_phi,
761 const LevelData<EBCellFAB>& a_phiCoar,
762 const LevelData<EBCellFAB>& a_rhs,
763 bool a_homogeneousPhysBC,
764 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp) override final;
776 const LevelData<EBCellFAB>& a_phi,
777 const LevelData<EBCellFAB>& a_phiCoar,
778 const LevelData<EBCellFAB>& a_rhs,
779 bool a_homogeneousPhysBC) override final;
792 const LevelData<EBCellFAB>& a_phiFine,
793 const LevelData<EBCellFAB>& a_phi,
794 const LevelData<EBCellFAB>& a_rhs,
795 bool a_homogeneousPhysBC,
796 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp) override final;
808 const LevelData<EBCellFAB>& a_phi,
809 const LevelData<EBCellFAB>& a_phiCoar,
810 bool a_homogeneousPhysBC) override final;
823 const LevelData<EBCellFAB>& a_phiFine,
824 const LevelData<EBCellFAB>& a_phi,
825 bool a_homogeneousPhysBC,
826 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp) override final;
837 AMRRestrict(LevelData<EBCellFAB>& a_residualCoarse,
838 const LevelData<EBCellFAB>& a_residual,
839 const LevelData<EBCellFAB>& a_correction,
840 const LevelData<EBCellFAB>& a_coarseCorrection,
841 bool a_skip_res) override final;
849 AMRProlong(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_coarseCorrection) override final;
859 const LevelData<EBCellFAB>& a_correction,
860 const LevelData<EBCellFAB>& a_coarseCorrection) override final;
868 setAlphaAndBeta(const Real& a_alpha, const Real& a_beta) override final;
877 createCoarsened(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const
int& a_refRat) override final;
885 diagonalScale(LevelData<EBCellFAB>& a_rhs,
bool a_kappaWeighted) override final;
900 applyOpNoBoundary(LevelData<EBCellFAB>& a_Lphi, const LevelData<EBCellFAB>& a_phi) override final;
907 fillGrad(const LevelData<EBCellFAB>& a_phi) override final;
919 const LevelData<EBCellFAB>& a_data,
921 const DataIndex& a_dit,
922 Real a_scale) override final;
935 LevelData<EBFluxFAB>&
942 const LevelData<EBCellFAB>&
977 LayoutData<VoFIterator>&
1329 int hasLo[SpaceDim] = {D_DECL(0, 0, 0)};
1334 int hasHi[SpaceDim] = {D_DECL(0, 0, 0)};
1365 relaxPointJacobi(LevelData<EBCellFAB>& a_correction,
const LevelData<EBCellFAB>& a_residual,
const int a_iterations);
1374 relaxGSRedBlack(LevelData<EBCellFAB>& a_correction,
const LevelData<EBCellFAB>& a_residual,
const int a_iterations);
1383 relaxGSMultiColor(LevelData<EBCellFAB>& a_correction,
const LevelData<EBCellFAB>& a_residual,
const int a_iterations);
1396 relaxChebyshev(LevelData<EBCellFAB>& a_correction,
const LevelData<EBCellFAB>& a_residual,
const int a_iterations);
1412 const LevelData<EBCellFAB>& a_residual,
1413 const int a_iterations);
1478 const EBCellFAB& a_phi,
1479 const Box& a_cellBox,
1480 const DataIndex& a_dit,
1494 const EBCellFAB& a_phi,
1495 const Box& a_cellBox,
1496 const DataIndex& a_dit,
1510 const EBCellFAB& a_phi,
1511 const Box& a_cellBox,
1512 const DataIndex& a_dit,
1555 const EBCellFAB& a_phi,
1556 const FaceIndex& a_face,
1557 const Box& a_cellBox,
1558 const DataIndex& a_dit,
1559 const int a_dir)
const noexcept;
1570 reflux(LevelData<EBCellFAB>& a_Lphi,
1571 const LevelData<EBCellFAB>& a_phiFine,
1572 const LevelData<EBCellFAB>& a_phi,
1573 AMRLevelOp<LevelData<EBCellFAB>>& a_finerOp);
1576#include <CD_NamespaceFooter.H>
Declaration of conservative coarsening utility.
Declaration of a prolongation operator for EB geometric multigrid.
Declaration of a restriction operator for EB geometric multigrid.
Parent base class for multigrid interpolation.
Declaration of a class which can reflux over the coarse-fine interface.
Declaration of cell positions.
Implementation of CD_Timer.H.
Class which replaces data at coarse level of refinement with average at fine level of refinement.
Definition CD_EBCoarAve.H:32
Base class for passing domain boundary conditions into EBHelmholtzOp.
Definition CD_EBHelmholtzDomainBC.H:30
Base class for passing EB boundary conditions into EBHelmholtzOp.
Definition CD_EBHelmholtzEBBC.H:30
VoFStencil getFaceCentroidFluxStencil(const FaceIndex &a_face, const DataIndex &a_dit) const
Get the face-centroid flux stencil.
Definition CD_EBHelmholtzOp.cpp:2514
void relaxGSMultiColor(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Multi-colored gauss-seidel relaxation.
Definition CD_EBHelmholtzOp.cpp:2155
void setAcoAndBco(const RefCountedPtr< LevelData< EBCellFAB > > &a_Acoef, const RefCountedPtr< LevelData< EBFluxFAB > > &a_Bcoef, const RefCountedPtr< LevelData< BaseIVFAB< Real > > > &a_BcoefIrreg)
Update with new A and B coefficients.
Definition CD_EBHelmholtzOp.cpp:176
void reflux(LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, AMRLevelOp< LevelData< EBCellFAB > > &a_finerOp)
Reflux algorithm.
Definition CD_EBHelmholtzOp.cpp:2836
Real getChebyEigRatio() const noexcept
Returns m_chebyEigRatio. Used by MFHelmholtzOp to replicate Chebyshev parameters.
Definition CD_EBHelmholtzOp.cpp:305
static constexpr int m_nComp
Number of components that we solve for (always one..).
Definition CD_EBHelmholtzOp.H:984
void AMRResidualNC(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_rhs, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp) override final
Compute AMR residual on coarsest.
Definition CD_EBHelmholtzOp.cpp:1210
RefCountedPtr< EBCoarAve > m_coarAve
Conservative coarsener.
Definition CD_EBHelmholtzOp.H:1214
void axby(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_x, const LevelData< EBCellFAB > &a_y, const Real a_a, const Real a_b) override final
Set a_lhs = a*x + b*y.
Definition CD_EBHelmholtzOp.cpp:784
void create(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Create data which clones the layout of the other.
Definition CD_EBHelmholtzOp.cpp:597
void gauSaiMultiColor(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_rhs, const IntVect &a_color) const
Multi-colored Gauss-Seidel kernel. Public because MFHelmholtzOp may want to use use.
static constexpr int m_comp
Component that we solve for.
Definition CD_EBHelmholtzOp.H:989
void turnOnCFInterp()
Turn on BCs.
Definition CD_EBHelmholtzOp.cpp:223
EBLevelGrid m_eblgCoFi
Coarsened of m_eblg.
Definition CD_EBHelmholtzOp.H:1154
void getFlux(EBFluxFAB &a_flux, const LevelData< EBCellFAB > &a_data, const Box &a_grid, const DataIndex &a_dit, Real a_scale) override final
Fill flux.
Definition CD_EBHelmholtzOp.cpp:1726
const RefCountedPtr< LevelData< BaseIVFAB< Real > > > & getBcoefIrreg()
Get the Helmholtz B-coefficient on the EB.
Definition CD_EBHelmholtzOp.cpp:204
void AMRProlong(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection) override final
Prolongation onto AMR level.
Definition CD_EBHelmholtzOp.cpp:1255
Smoother m_smoother
Relaxation method.
Definition CD_EBHelmholtzOp.H:1004
void applyOpRegular(EBCellFAB &a_Lphi, EBCellFAB &a_phi, const EBCellFAB &a_Acoef, const EBFluxFAB &a_Bcoef, const BaseIVFAB< Real > &a_BcoefIrreg, const Box &a_cellBox, const DataIndex &a_dit, const bool a_homogeneousPhysBC) const noexcept
Apply operator in regular cells.
Definition CD_EBHelmholtzOp.cpp:1365
LayoutData< BaseIVFAB< VoFStencil > > m_relaxStencils
Operator stencils in irregular cells (and ones that border irregular cells if using a centroid discre...
Definition CD_EBHelmholtzOp.H:1264
int getRasInnerSweeps() const noexcept
Returns m_rasInnerSweeps. Used by MFHelmholtzOp to replicate the Schwarz block solve.
Definition CD_EBHelmholtzOp.cpp:317
bool m_hasCoar
True if there's a coarser level.
Definition CD_EBHelmholtzOp.H:1034
void fillDomainFlux(EBFluxFAB &a_flux, const EBCellFAB &a_phi, const Box &a_cellBox, const DataIndex &a_dit, const bool a_homogeneousPhysBC)
Fill domain flux. This fills the flux on the domain face using centered differencing ala applyDomainF...
Definition CD_EBHelmholtzOp.cpp:1522
void AMRResidualNF(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoar, const LevelData< EBCellFAB > &a_rhs, bool a_homogeneousPhysBC) override final
Compute AMR residual on finest AMR level.
Definition CD_EBHelmholtzOp.cpp:1195
void relaxChebyshev(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Chebyshev polynomial smoother.
Definition CD_EBHelmholtzOp.cpp:1926
void computeFaceCentroidFlux(EBFaceFAB &a_flux, const EBCellFAB &a_phi, const Box &a_cellBox, const DataIndex &a_dit, const int a_dir)
Compute face-centroid fluxes.
Definition CD_EBHelmholtzOp.cpp:2640
void applyDomainFlux(EBCellFAB &a_phi, const EBFluxFAB &a_Bcoef, const Box &a_cellBox, const DataIndex &a_dit, const bool a_homogeneousPhysBc) const noexcept
Apply domain flux.
Definition CD_EBHelmholtzOp.cpp:1421
void applyOp(LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > *const a_phiCoar, const bool a_homogeneousPhysBC, const bool a_homogeneousCFBC)
Apply operator on this level. This is a more general version which can turn on/off homogeneous and CF...
Definition CD_EBHelmholtzOp.cpp:1291
void allocateFlux() const noexcept
Allocate m_flux if it is not already allocated.
Definition CD_EBHelmholtzOp.cpp:263
void computeDiagWeight()
Calculate the weight of the diagonal term.
Definition CD_EBHelmholtzOp.cpp:2271
void scale(LevelData< EBCellFAB > &a_lhs, const Real &a_scale) override final
Scale data. Returns a_lhs = a_lhs*a_scale.
Definition CD_EBHelmholtzOp.cpp:796
EBHelmholtzOp()=delete
Disallowed default constructor.
virtual ~EBHelmholtzOp()
Dtor.
Definition CD_EBHelmholtzOp.cpp:209
Copier m_exchangeCopierFine
Pre-built exchange copier.
Definition CD_EBHelmholtzOp.H:1139
void relax(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, int a_iterations) override final
Relaxation method. This does smoothing for the system L(correction) = residual.
Definition CD_EBHelmholtzOp.cpp:1789
void turnOffCoarsening()
Turn off coarsening operation.
Definition CD_EBHelmholtzOp.cpp:247
void relaxPointJacobi(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Jacobi relaxation.
Definition CD_EBHelmholtzOp.cpp:1833
int getChebyOrder() const noexcept
Returns m_chebyOrder. Used by MFHelmholtzOp to replicate Chebyshev parameters.
Definition CD_EBHelmholtzOp.cpp:299
RefCountedPtr< EBHelmholtzEBBC > m_ebBc
Domain bc object.
Definition CD_EBHelmholtzOp.H:1199
void makeAggStencil()
Compute aggregated stencils.
Definition CD_EBHelmholtzOp.cpp:2442
void homogeneousCFInterp(LevelData< EBCellFAB > &a_phi)
Do homogeneous coarse-fine interpolation.
Definition CD_EBHelmholtzOp.cpp:1738
EBLevelGrid m_eblg
Grid.
Definition CD_EBHelmholtzOp.H:1149
LayoutData< RefCountedPtr< VCAggStencil > > m_aggRelaxStencil
For making irregular stencil applications go faster.
Definition CD_EBHelmholtzOp.H:1270
EBMGRestrict m_restrictOp
Restriction operator for AMR levels.
Definition CD_EBHelmholtzOp.H:1169
void pointJacobiKernel(EBCellFAB &a_Lcorr, EBCellFAB &a_corr, const EBCellFAB &a_resid, const EBCellFAB &a_Acoef, const EBFluxFAB &a_Bcoef, const BaseIVFAB< Real > &a_BcoefIrreg, const Box &a_cellBox, const DataIndex &a_dit) const noexcept
Point Jacobi kernel.
Definition CD_EBHelmholtzOp.cpp:1875
Real m_chebyEigRatio
Ratio lambda_max/lambda_min for the Chebyshev eigenvalue window.
Definition CD_EBHelmholtzOp.H:1108
bool m_refluxFree
Use reflux-free formulation or not.
Definition CD_EBHelmholtzOp.H:1014
void computeSpectralRadius()
Estimate the spectral radius of D^{-1}A (Jacobi-preconditioned operator) via the Gershgorin bound.
Definition CD_EBHelmholtzOp.cpp:2393
RefCountedPtr< EBHelmholtzDomainBC > m_domainBc
Domain bc object.
Definition CD_EBHelmholtzOp.H:1194
Real dotProduct(const LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Compute the dot product??
Definition CD_EBHelmholtzOp.cpp:629
RefCountedPtr< EBReflux > m_fluxReg
Flux register.
Definition CD_EBHelmholtzOp.H:1209
void preCond(LevelData< EBCellFAB > &a_corr, const LevelData< EBCellFAB > &a_residual) override final
Precondition system before bottom solve.
Definition CD_EBHelmholtzOp.cpp:586
int m_numSmoothPreCond
Number of smoothings in the preconditioner.
Definition CD_EBHelmholtzOp.H:1049
bool m_doInterpCF
Do coarse-fine interpolation or not.
Definition CD_EBHelmholtzOp.H:1055
void AMROperatorNC(LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp) override final
Apply the AMR operator, i.e. compute L(phi) in an AMR context, assuming no coarser AMR levels.
Definition CD_EBHelmholtzOp.cpp:1164
int m_refToFine
Refinement factor to fine level.
Definition CD_EBHelmholtzOp.H:1044
Smoother
Relaxation method for the operators.
Definition CD_EBHelmholtzOp.H:48
bool m_hasMGObjects
True if there is a multigrid level below this operator.
Definition CD_EBHelmholtzOp.H:1024
Real m_dx
Grid resolution;.
Definition CD_EBHelmholtzOp.H:1092
bool m_profile
Profile the operator.
Definition CD_EBHelmholtzOp.H:1019
void turnOffExchange()
Turn off exchange operation.
Definition CD_EBHelmholtzOp.cpp:231
void relaxGSRedBlack(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Jacobi relaxation.
Definition CD_EBHelmholtzOp.cpp:1985
LayoutData< BaseIVFAB< Real > > m_alphaDiagWeight
Weights of diagonal alpha terms.
Definition CD_EBHelmholtzOp.H:1275
void fillGrad(const LevelData< EBCellFAB > &a_phi) override final
Not called, I think.
Definition CD_EBHelmholtzOp.cpp:1718
VoFStencil getFaceCenterFluxStencil(const FaceIndex &a_face, const DataIndex &a_dit) const
Get the face-centered flux stencil.
Definition CD_EBHelmholtzOp.cpp:2493
void restrictResidual(LevelData< EBCellFAB > &a_resCoar, LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_rhs) override final
Restrict residual onto coarse level.
Definition CD_EBHelmholtzOp.cpp:912
void divideByIdentityCoef(LevelData< EBCellFAB > &a_rhs) override final
Divide by the a-coefficient.
Definition CD_EBHelmholtzOp.cpp:1692
void assign(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Assign data.
Definition CD_EBHelmholtzOp.cpp:605
RealVect m_probLo
Lower-left corner of domain.
Definition CD_EBHelmholtzOp.H:1129
RefCountedPtr< EBMultigridInterpolator > m_interpolator
Interpolator object.
Definition CD_EBHelmholtzOp.H:1204
void computeCoarseFineFlux(const LevelData< EBCellFAB > &a_phi)
Compute the fluxes on this level through the faces that border the finer level.
Definition CD_EBHelmholtzOp.cpp:2697
void computeRelaxationCoefficient()
Calculate relaxation coefficient.
Definition CD_EBHelmholtzOp.cpp:2329
void computeFaceCenteredFlux(EBFaceFAB &a_fluxCenter, const EBCellFAB &a_phi, const Box &a_cellBox, const DataIndex &a_dit, const int a_dir)
Compute face-centered fluxes.
Definition CD_EBHelmholtzOp.cpp:2610
void AMROperatorNF(LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoar, bool a_homogeneousPhysBC) override final
Apply the AMR operator, i.e. compute L(phi) in an AMR context, assuming no finer levels.
Definition CD_EBHelmholtzOp.cpp:1153
EBMGProlong m_prolongOp
Prolongation operator for AMR levels.
Definition CD_EBHelmholtzOp.H:1179
void refluxFreeAMROperator(LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoar, const bool a_homogeneousPhysBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
Apply the AMR operator, i.e. compute L(phi) in an AMR context.
Definition CD_EBHelmholtzOp.cpp:984
IntVect m_ghostRhs
Ghost cells for rhs (note, the operator rhs).
Definition CD_EBHelmholtzOp.H:1077
int refToCoarser() override final
Return coarsening factor to coarser level (1 if there is no coarser level);.
Definition CD_EBHelmholtzOp.cpp:937
LayoutData< BaseIFFAB< VoFStencil > > m_centroidFluxStencil[SpaceDim]
Face centroid flux stencil. Defined on all faces connecting one or more irregular vofs.
Definition CD_EBHelmholtzOp.H:1256
EBHelmholtzOp & operator=(const EBHelmholtzOp &a_oper)=delete
No copy assignment allowed.
Interval m_interval
Interval.
Definition CD_EBHelmholtzOp.H:999
void assignLocal(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Local assignment function.
Definition CD_EBHelmholtzOp.cpp:621
bool m_doExchange
Turn on/off exchange operation.
Definition CD_EBHelmholtzOp.H:1061
EBMGProlong m_prolongOpMG
Prolongation operator for MG levels.
Definition CD_EBHelmholtzOp.H:1184
void chebyshevKernel(EBCellFAB &a_Lcorr, EBCellFAB &a_corr, const EBCellFAB &a_resid, const EBCellFAB &a_Acoef, const EBFluxFAB &a_Bcoef, const BaseIVFAB< Real > &a_BcoefIrreg, const Box &a_cellBox, const DataIndex &a_dit, const Real a_omega) const noexcept
Chebyshev smoother kernel.
Definition CD_EBHelmholtzOp.cpp:1901
Real norm(const LevelData< EBCellFAB > &a_rhs, const int a_order) override final
Compute norm of data.
Definition CD_EBHelmholtzOp.cpp:825
void AMRResidual(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoar, const LevelData< EBCellFAB > &a_rhs, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp) override final
Compute residual on this level. AMR version.
Definition CD_EBHelmholtzOp.cpp:1177
LayoutData< BaseIFFAB< FaceStencil > > m_interpStencil[SpaceDim]
Face centroid interpolation stencil.
Definition CD_EBHelmholtzOp.H:1251
void residual(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_rhs, const bool a_homogeneousPhysBc) override
Compute residual on this level.
Definition CD_EBHelmholtzOp.cpp:573
int m_rasInnerSweeps
Number of inner (frozen-ghost) red-black sweeps per outer restricted-additive-Schwarz iteration.
Definition CD_EBHelmholtzOp.H:1119
EBHelmholtzOp(const EBHelmholtzOp &&a_other)=delete
Disallowed move constructor.
RefCountedPtr< LevelData< EBFluxFAB > > m_Bcoef
B-coefficient in Helmholtz equation.
Definition CD_EBHelmholtzOp.H:1224
void dotProductMaskedLocal(Real &a_sumKappaXY, Real &a_sumVolume, const LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const LevelData< BaseFab< bool > > &a_mask, const bool a_needVolume) const noexcept
Rank-local (un-reduced) partials for the masked AMR-composite Krylov inner product.
Definition CD_EBHelmholtzOp.cpp:699
Timer m_timer
Timer so user can profile.
Definition CD_EBHelmholtzOp.H:994
Location::Cell m_dataLocation
Data centering.
Definition CD_EBHelmholtzOp.H:1009
void createCoarser(LevelData< EBCellFAB > &a_coarse, const LevelData< EBCellFAB > &a_fine, bool a_ghosted) override final
Create coarsened data.
Definition CD_EBHelmholtzOp.cpp:890
EBLevelGrid m_eblgCoar
Coarse level grid (if the operator has a coarse level).
Definition CD_EBHelmholtzOp.H:1159
IntVect m_ghostPhi
Ghost cells for phi.
Definition CD_EBHelmholtzOp.H:1072
void computeFineCoarseFlux(const LevelData< EBCellFAB > &a_phi, const EBReflux &a_coarFluxReg)
Compute the fluxes on this level through the faces on the refinement boundary with the coarser level.
Definition CD_EBHelmholtzOp.cpp:2744
void computeFlux(EBFaceFAB &a_fluxCentroid, const EBCellFAB &a_phi, const Box &a_cellBox, const DataIndex &a_dit, const int a_dir)
Compute centroid fluxes in a direction.
Definition CD_EBHelmholtzOp.cpp:2593
EBLevelGrid m_eblgFine
Fine level grid (if the operator has a fine level).
Definition CD_EBHelmholtzOp.H:1144
void turnOffCFInterp()
Turn off BCs.
Definition CD_EBHelmholtzOp.cpp:215
Real m_relaxFactor
Successive over-relaxation factor (Must be >= 1).
Definition CD_EBHelmholtzOp.H:1097
int m_refToCoar
Refinement factor to coarse level.
Definition CD_EBHelmholtzOp.H:1039
Real m_alpha
Alpha-coefficient.
Definition CD_EBHelmholtzOp.H:1082
LevelData< EBCellFAB > m_relCoef
Relaxation coefficient.
Definition CD_EBHelmholtzOp.H:1234
LayoutData< VoFIterator > & getVofIterIrreg() const noexcept
Return all-cut VoFIterators (one per patch). Used by MFHelmholtzOp.
Definition CD_EBHelmholtzOp.cpp:323
void computeFaceFlux(EBFaceFAB &a_flux, const EBCellFAB &a_phi, const FaceIndex &a_face, const Box &a_cellBox, const DataIndex &a_dit, const int a_dir) const noexcept
Compute the flux through a single face.
Definition CD_EBHelmholtzOp.cpp:2791
void applyOpNoBoundary(LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_phi) override final
Apply operator but turn off all BCs.
Definition CD_EBHelmholtzOp.cpp:1708
void diagonalScale(LevelData< EBCellFAB > &a_rhs, bool a_kappaWeighted) override final
Do diagonal scaling.
Definition CD_EBHelmholtzOp.cpp:1670
void setToZero(LevelData< EBCellFAB > &a_lhs) override final
Set data to zero.
Definition CD_EBHelmholtzOp.cpp:882
void setAlphaAndBeta(const Real &a_alpha, const Real &a_beta) override final
Set alpha coefficient and beta coefficient (can change as diffusion solvers progress).
Definition CD_EBHelmholtzOp.cpp:558
RefCountedPtr< LevelData< BaseFab< bool > > > m_validCells
Valid grid cells (might be nullptr on MG levels).
Definition CD_EBHelmholtzOp.H:1189
Copier m_exchangeCopier
Pre-built exchange copier.
Definition CD_EBHelmholtzOp.H:1134
void interpolateCF(LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > *a_phiCoar, const bool a_homogeneousCFBC)
Apply coarse-fine boundary conditions.
Definition CD_EBHelmholtzOp.cpp:1762
void coarsenCell(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiFine)
Coarsen data from fine to coar level.
Definition CD_EBHelmholtzOp.cpp:2872
void gauSaiRedBlackKernel(EBCellFAB &a_Lcorr, EBCellFAB &a_corr, const EBCellFAB &a_resid, const EBCellFAB &a_Acoef, const EBFluxFAB &a_Bcoef, const BaseIVFAB< Real > &a_BcoefIrreg, const Box &a_cellBox, const DataIndex &a_dit, const int &a_redBlack) const noexcept
Red-black Gauss-Seidel kernel.
Definition CD_EBHelmholtzOp.cpp:2086
LayoutData< BaseIFFAB< Real > > m_interpolant[SpaceDim]
Interpolant for when we want centroid fluxes.
Definition CD_EBHelmholtzOp.H:1246
void turnOnExchange()
Turn on exchange operation.
Definition CD_EBHelmholtzOp.cpp:239
void inhomogeneousCFInterp(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoar)
Inhomogeneous coarse-fine interpolation.
Definition CD_EBHelmholtzOp.cpp:1750
void coarsenFlux(LevelData< EBFluxFAB > &a_flux, const LevelData< EBFluxFAB > &a_fineFlux)
Coarsen fluxes on the fine level onto this level.
Definition CD_EBHelmholtzOp.cpp:2880
bool m_hasFine
True if there's a finer level.
Definition CD_EBHelmholtzOp.H:1029
bool m_doCoarsen
Turn on/off exchange operation.
Definition CD_EBHelmholtzOp.H:1067
Real m_spectralRadius
Spectral radius estimate for the Jacobi-preconditioned operator D^{-1}A.
Definition CD_EBHelmholtzOp.H:1114
void assignCopier(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const Copier &a_copier) override final
Assign lhs.
Definition CD_EBHelmholtzOp.cpp:613
static void scaleLocal(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) noexcept
Local scaling function. Multiplies the left-hand side by the right-hand side.
Definition CD_EBHelmholtzOp.cpp:804
void gauSaiMultiColorKernel(EBCellFAB &a_Lcorr, EBCellFAB &a_corr, const EBCellFAB &a_resid, const EBCellFAB &a_Acoef, const EBFluxFAB &a_Bcoef, const BaseIVFAB< Real > &a_BcoefIrreg, const Box &a_cellBox, const DataIndex &a_dit, const IntVect &a_color) const noexcept
Multi-color Gauss-Seidel kernel.
Definition CD_EBHelmholtzOp.cpp:2203
int m_chebyOrder
Number of Chebyshev polynomial steps per smoother invocation.
Definition CD_EBHelmholtzOp.H:1102
std::map< std::pair< int, Side::LoHiSide >, Box > m_sideBox
Domain boxes on each side.
Definition CD_EBHelmholtzOp.H:1310
LayoutData< VoFIterator > m_vofIterStenc
VoFIterator which iterates over all cells that are 1) a cut-cell or 2) borders a cut-cell.
Definition CD_EBHelmholtzOp.H:1295
const RefCountedPtr< LevelData< EBCellFAB > > & getAcoef()
Get the Helmholtz A-coefficient on cell centers.
Definition CD_EBHelmholtzOp.cpp:192
LevelData< EBFluxFAB > m_flux
For holding fluxes. Allocated and zeroed on first use by allocateFlux().
Definition CD_EBHelmholtzOp.H:1241
void relaxRestrictedAdditiveSchwarz(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Restricted additive Schwarz smoother (block smoother).
Definition CD_EBHelmholtzOp.cpp:2035
RealVect m_vecDx
Vector resolution.
Definition CD_EBHelmholtzOp.H:1124
void incr(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const Real a_scale) override final
Increment operator.
Definition CD_EBHelmholtzOp.cpp:776
LayoutData< DomainBndryBoxes > m_domainBndryBoxes
Precomputed domain-boundary boxes for each grid patch.
Definition CD_EBHelmholtzOp.H:1351
LayoutData< VoFIterator > m_vofIterMulti
VoFIterator for "multi-cells".
Definition CD_EBHelmholtzOp.H:1290
LayoutData< BaseIVFAB< Real > > m_betaDiagWeight
Weights of diagonal beta terms.
Definition CD_EBHelmholtzOp.H:1280
EBHelmholtzOp(const EBHelmholtzOp &a_other)=delete
Disallowed copy constructor.
Vector< IntVect > m_colors
"Colors" for the relaxation methods
Definition CD_EBHelmholtzOp.H:1356
const RefCountedPtr< LevelData< EBFluxFAB > > & getBcoef()
Get the Helmholtz B-coefficient on faces.
Definition CD_EBHelmholtzOp.cpp:198
RefCountedPtr< LevelData< EBCellFAB > > m_Acoef
A-coefficient in Helmholtz equation.
Definition CD_EBHelmholtzOp.H:1219
void turnOnCoarsening()
Turn on coarsening operation.
Definition CD_EBHelmholtzOp.cpp:255
LayoutData< VoFIterator > m_vofIterDomLo[SpaceDim]
VoF iterators for lo domain side.
Definition CD_EBHelmholtzOp.H:1300
LayoutData< VoFIterator > m_vofIterIrreg
VoFIterator for irregular cells.
Definition CD_EBHelmholtzOp.H:1285
void AMROperator(LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoar, const bool a_homogeneousPhysBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp) override final
Apply the AMR operator, i.e. compute L(phi) in an AMR context.
Definition CD_EBHelmholtzOp.cpp:943
void AMRRestrict(LevelData< EBCellFAB > &a_residualCoarse, const LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection, bool a_skip_res) override final
Restrict residual.
Definition CD_EBHelmholtzOp.cpp:1227
EBMGRestrict m_restrictOpMG
Restriction operator if this is an MG level.
Definition CD_EBHelmholtzOp.H:1174
void createCoarsened(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const int &a_refRat) override final
Create coarsening of data holder.
Definition CD_EBHelmholtzOp.cpp:900
Real getSpectralRadius() const noexcept
Returns m_spectralRadius. Used by MFHelmholtzOp to replicate Chebyshev parameters.
Definition CD_EBHelmholtzOp.cpp:311
Real m_beta
Beta-coefficient.
Definition CD_EBHelmholtzOp.H:1087
EBHelmholtzOp & operator=(const EBHelmholtzOp &&a_oper)=delete
No move assignment allowed.
void applyOpIrregular(EBCellFAB &a_Lphi, const EBCellFAB &a_phi, const EBCellFAB &a_Acoef, const EBFluxFAB &a_Bcoef, const BaseIVFAB< Real > &a_BcoefIrreg, const BaseIVFAB< Real > &a_alphaDiagWeight, const Box &a_cellBox, const DataIndex &a_dit, const bool a_homogeneousPhysBC) const noexcept
Apply operator in irregular cells.
Definition CD_EBHelmholtzOp.cpp:1586
void AMRUpdateResidual(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection) override final
Update AMR residual.
Definition CD_EBHelmholtzOp.cpp:1263
LayoutData< VoFIterator > m_vofIterDomHi[SpaceDim]
VoF iterators for hi domain side.
Definition CD_EBHelmholtzOp.H:1305
void buildCopier(Copier &a_copier, const LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override
Build copier.
Definition CD_EBHelmholtzOp.cpp:2888
void defineStencils()
Define stencils.
Definition CD_EBHelmholtzOp.cpp:329
void prolongIncrement(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_correctCoarse) override final
Prolongation method.
Definition CD_EBHelmholtzOp.cpp:929
const LevelData< EBCellFAB > & getRelaxationCoeff() const noexcept
Returns m_relCoef. Used by MFHelmholtzOp.
Definition CD_EBHelmholtzOp.cpp:291
EBLevelGrid m_eblgCoarMG
Coarser grids (multigrid level).
Definition CD_EBHelmholtzOp.H:1164
RefCountedPtr< LevelData< BaseIVFAB< Real > > > m_BcoefIrreg
B-coefficient in Helmholtz equation, but on EB faces.
Definition CD_EBHelmholtzOp.H:1229
Class for prolongation of multigrid residual onto a finer grid.
Definition CD_EBMGProlong.H:31
Class for restricting multigrid residual onto a coarser grid.
Definition CD_EBMGRestrict.H:31
Multigrid interpolator class.
Definition CD_EBMGLeastSquaresInterpolator.H:55
Class which can do refluxing across a coarse-fine interface.
Definition CD_EBReflux.H:38
Class which is used for run-time monitoring of events.
Definition CD_Timer.H:32
Namespace for encapsulating various data centerings.
Definition CD_Location.H:25
Cell
Enum for distinguishing between cell locations.
Definition CD_Location.H:31
Cached domain-boundary boxes for a single grid patch.
Definition CD_EBHelmholtzOp.H:1320
bool touchesDomain
True if the patch abuts the domain boundary on any side, i.e. if any boundary-flux work is needed at ...
Definition CD_EBHelmholtzOp.H:1324
Box loBox[SpaceDim]
Lo-side cell-centered box abutting the domain. Valid only when hasLo[dir] == 1.
Definition CD_EBHelmholtzOp.H:1339
Box hiBox[SpaceDim]
Hi-side cell-centered box abutting the domain. Valid only when hasHi[dir] == 1.
Definition CD_EBHelmholtzOp.H:1344
int hasLo[SpaceDim]
Per-direction flag: 1 if the patch abuts the lo domain face in that direction, 0 otherwise.
Definition CD_EBHelmholtzOp.H:1329
int hasHi[SpaceDim]
Per-direction flag: 1 if the patch abuts the hi domain face in that direction, 0 otherwise.
Definition CD_EBHelmholtzOp.H:1334