chombo-discharge
Loading...
Searching...
No Matches
CD_EBHelmholtzOp.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_EBHELMHOLTZOP_H
14#define CD_EBHELMHOLTZOP_H
15
16// Std includes
17#include <map>
18
19// Chombo includes
20#include <BaseEBBC.H>
21#include <LevelTGA.H>
22#include <BaseIVFAB.H>
23#include <VCAggStencil.H>
24
25// Our includes
26#include <CD_Timer.H>
27#include <CD_Location.H>
29#include <CD_EBCoarAve.H>
30#include <CD_EBReflux.H>
31#include <CD_EBMGRestrict.H>
32#include <CD_EBMGProlong.H>
33#include <CD_EBHelmholtzEBBC.H>
34#include <CD_EBHelmholtzDomainBC.H>
35#include <CD_NamespaceHeader.H>
36
41class EBHelmholtzOp : public LevelTGAHelmOp<LevelData<EBCellFAB>, EBFluxFAB>
42{
43public:
47 enum class Smoother
48 {
49 NoRelax,
50 PointJacobi,
51 GauSaiRedBlack,
52 GauSaiMultiColor,
53 };
54
58 EBHelmholtzOp() = delete;
59
65
71
104 const EBLevelGrid& a_eblgFine,
105 const EBLevelGrid& a_eblg,
106 const EBLevelGrid& a_eblgCoFi,
107 const EBLevelGrid& a_eblgCoar,
115 const RealVect& a_probLo,
116 const Real& a_dx,
117 const int& a_refToFine,
118 const int& a_refToCoar,
119 const bool& a_hasFine,
120 const bool& a_hasCoar,
121 const bool& a_hasMGObjects,
122 const Real& a_alpha,
123 const Real& a_beta,
127 const IntVect& a_ghostPhi,
128 const IntVect& a_ghostRhs,
129 const Smoother& a_smoother,
130 const Real& a_relaxFactor);
131
135 virtual ~EBHelmholtzOp();
136
143
149 operator=(const EBHelmholtzOp&& a_oper) = delete;
150
154 void
156
160 void
162
167 void
169
174 void
176
181 void
183
188 void
190
198 void
202
208 getAcoef();
209
215 getBcoef();
216
223
230 void
232
240 void
242
254 void
257 const EBCellFAB& a_resid,
258 const EBCellFAB& a_Acoef,
259 const EBFluxFAB& a_Bcoef,
261 const Box& a_cellBox,
262 const DataIndex& a_dit) const noexcept;
263
276 void
279 const EBCellFAB& a_resid,
280 const EBCellFAB& a_Acoef,
281 const EBFluxFAB& a_Bcoef,
283 const Box& a_cellBox,
284 const DataIndex& a_dit,
285 const int& a_redBlack) const noexcept;
286
299 void
302 const EBCellFAB& a_resid,
303 const EBCellFAB& a_Acoef,
304 const EBFluxFAB& a_Bcoef,
306 const Box& a_cellBox,
307 const DataIndex& a_dit,
308 const IntVect& a_color) const noexcept;
309
317 void
321 const bool a_homogeneousPhysBc) override;
322
329 void
331
338 void
340
345 void
347
353 void
355
363 void
367 const IntVect& a_color) const;
368
378 void
381 const LevelData<EBCellFAB>* const a_phiCoar,
382 const bool a_homogeneousPhysBC,
383 const bool a_homogeneousCFBC);
384
392 void
394
406 void
409 const EBCellFAB& a_Acoef,
410 const EBFluxFAB& a_Bcoef,
412 const Box& a_cellBox,
413 const DataIndex& a_dit,
414 const bool a_homogeneousPhysBC) const noexcept;
415
427 void
430 const EBCellFAB& a_Acoef,
431 const EBFluxFAB& a_Bcoef,
433 const Box& a_cellBox,
434 const DataIndex& a_dit,
435 const bool a_homogeneousPhysBC) const noexcept;
436
447 void
449 const EBFluxFAB& a_Bcoef,
450 const Box& a_cellBox,
451 const DataIndex& a_dit,
452 const bool a_homogeneousPhysBc) const noexcept;
453
462 void
464
477 void
479 const EBCellFAB& a_phi,
480 const EBCellFAB& a_Acoef,
481 const EBFluxFAB& a_Bcoef,
484 const Box& a_cellBox,
485 const DataIndex& a_dit,
486 const bool a_homogeneousPhysBC) const noexcept;
487
493 void
495
502 void
504
513 void
515
521 void
523
530 void
532
539 Real
540 dotProduct(const LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override final;
541
548 void
549 incr(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const Real a_scale) override final;
550
559 void
563 const Real a_a,
564 const Real a_b) override final;
565
571 void
572 scale(LevelData<EBCellFAB>& a_lhs, const Real& a_scale) override final;
573
579 static void
581
589 Real
590 norm(const LevelData<EBCellFAB>& a_rhs, const int a_order) override final;
591
596 void
597 setToZero(LevelData<EBCellFAB>& a_lhs) override final;
598
605 void
607
614 void
616
623 void
626 const LevelData<EBCellFAB>& a_rhs) override final;
627
633 void
635
640 int
642
653 void
660
672 void
679
690 void
698
707 void
713
723 void
730
739 void
744
754 void
760
769 void
775
781 void
783
790 void
794
800 void
802
809 void
811
817 void
819
824 void
826
832 void
834
839 void
841
850 void
856
860 void
862
866 void
868
874 getFlux() const;
875
882
889
895
900
905
910
915
920
925
930
935
940
945
950
955
960
966
972
978
983
988
993
998
1003
1008
1013
1018
1023
1028
1033
1038
1043
1048
1053
1058
1063
1068
1073
1078
1083
1088
1093
1098
1103
1108
1113
1118
1123
1128
1133
1138
1143
1150
1156
1161
1166
1171
1176
1181
1186
1191
1196
1205 {
1209 bool touchesDomain = false;
1210
1214 int hasLo[SpaceDim] = {D_DECL(0, 0, 0)};
1215
1219 int hasHi[SpaceDim] = {D_DECL(0, 0, 0)};
1220
1225
1230 };
1231
1237
1242
1249 void
1251
1258 void
1260
1267 void
1269
1273 void
1275
1279 void
1281
1285 void
1287
1291 void
1293
1303
1313
1323 void
1325 const EBCellFAB& a_phi,
1326 const Box& a_cellBox,
1327 const DataIndex& a_dit,
1328 const int a_dir);
1329
1339 void
1341 const EBCellFAB& a_phi,
1342 const Box& a_cellBox,
1343 const DataIndex& a_dit,
1344 const int a_dir);
1345
1355 void
1357 const EBCellFAB& a_phi,
1358 const Box& a_cellBox,
1359 const DataIndex& a_dit,
1360 const int a_dir);
1361
1367 void
1369
1377 void
1382};
1383
1384#include <CD_NamespaceFooter.H>
1385
1386#endif
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
Helmholtz operator for equations like alpha*a(x)*phi(x) + beta*div(b(x)*grad(phi(x))) = rho.
Definition CD_EBHelmholtzOp.H:42
VoFStencil getFaceCentroidFluxStencil(const FaceIndex &a_face, const DataIndex &a_dit) const
Get the face-centroid flux stencil.
Definition CD_EBHelmholtzOp.cpp:2170
void relaxGSMultiColor(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Multi-colored gauss-seidel relaxation.
Definition CD_EBHelmholtzOp.cpp:1869
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:163
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:2349
LevelData< EBFluxFAB > & getFlux() const
Returns m_flux. This is used in refluxing routines.
Definition CD_EBHelmholtzOp.cpp:266
static constexpr int m_nComp
Number of components that we solve for (always one..)
Definition CD_EBHelmholtzOp.H:894
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:1091
RefCountedPtr< EBCoarAve > m_coarAve
Conservative coarsener.
Definition CD_EBHelmholtzOp.H:1102
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:661
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:551
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:899
void turnOnCFInterp()
Turn on BCs.
Definition CD_EBHelmholtzOp.cpp:210
EBLevelGrid m_eblgCoFi
Coarsened of m_eblg.
Definition CD_EBHelmholtzOp.H:1042
const RefCountedPtr< LevelData< BaseIVFAB< Real > > > & getBcoefIrreg()
Get the Helmholtz B-coefficient on the EB.
Definition CD_EBHelmholtzOp.cpp:191
void AMRProlong(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection) override final
Prolongation onto AMR level.
Definition CD_EBHelmholtzOp.cpp:1136
Smoother m_smoother
Relaxation method.
Definition CD_EBHelmholtzOp.H:914
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:1246
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:1149
bool m_hasCoar
True if there's a coarser level.
Definition CD_EBHelmholtzOp.H:944
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:1076
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:2295
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:1300
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:1172
void allocateFlux() const noexcept
Allocate m_flux.
Definition CD_EBHelmholtzOp.cpp:250
void computeDiagWeight()
Calculate the weight of the diagonal term.
Definition CD_EBHelmholtzOp.cpp:1983
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:673
EBHelmholtzOp()=delete
Disallowed default constructor.
virtual ~EBHelmholtzOp()
Dtor.
Definition CD_EBHelmholtzOp.cpp:196
Copier m_exchangeCopierFine
Pre-built exchange copier.
Definition CD_EBHelmholtzOp.H:1027
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:1655
void turnOffCoarsening()
Turn off coarsening operation.
Definition CD_EBHelmholtzOp.cpp:234
void relaxPointJacobi(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Jacobi relaxation.
Definition CD_EBHelmholtzOp.cpp:1689
RefCountedPtr< EBHelmholtzEBBC > m_ebBc
Domain bc object.
Definition CD_EBHelmholtzOp.H:1087
void makeAggStencil()
Compute aggregated stencils.
Definition CD_EBHelmholtzOp.cpp:2100
void homogeneousCFInterp(LevelData< EBCellFAB > &a_phi)
Do homogeneous coarse-fine interpolation.
Definition CD_EBHelmholtzOp.cpp:1604
EBLevelGrid m_eblg
Grid.
Definition CD_EBHelmholtzOp.H:1037
LayoutData< RefCountedPtr< VCAggStencil > > m_aggRelaxStencil
For making irregular stencil applications go faster.
Definition CD_EBHelmholtzOp.H:1155
EBMGRestrict m_restrictOp
Restriction operator for AMR levels.
Definition CD_EBHelmholtzOp.H:1057
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:1729
bool m_refluxFree
Use reflux-free formulation or not.
Definition CD_EBHelmholtzOp.H:924
RefCountedPtr< EBHelmholtzDomainBC > m_domainBc
Domain bc object.
Definition CD_EBHelmholtzOp.H:1082
Real dotProduct(const LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Compute the dot product??
Definition CD_EBHelmholtzOp.cpp:583
RefCountedPtr< EBReflux > m_fluxReg
Flux register.
Definition CD_EBHelmholtzOp.H:1097
void preCond(LevelData< EBCellFAB > &a_corr, const LevelData< EBCellFAB > &a_residual) override final
Precondition system before bottom solve.
Definition CD_EBHelmholtzOp.cpp:540
int m_numSmoothPreCond
Number of smoothings in the preconditioner.
Definition CD_EBHelmholtzOp.H:959
bool m_doInterpCF
Do coarse-fine interpolation or not.
Definition CD_EBHelmholtzOp.H:965
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:1045
int m_refToFine
Refinement factor to fine level.
Definition CD_EBHelmholtzOp.H:954
Smoother
Relaxation method for the operators.
Definition CD_EBHelmholtzOp.H:48
LevelData< EBFluxFAB > * m_flux
For holding fluxes.
Definition CD_EBHelmholtzOp.H:1127
bool m_hasMGObjects
True if there is a multigrid level below this operator.
Definition CD_EBHelmholtzOp.H:934
Real m_dx
Grid resolution;.
Definition CD_EBHelmholtzOp.H:1002
bool m_profile
Profile the operator.
Definition CD_EBHelmholtzOp.H:929
void turnOffExchange()
Turn off exchange operation.
Definition CD_EBHelmholtzOp.cpp:218
void relaxGSRedBlack(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Jacobi relaxation.
Definition CD_EBHelmholtzOp.cpp:1754
LayoutData< BaseIVFAB< Real > > m_alphaDiagWeight
Weights of diagonal alpha terms.
Definition CD_EBHelmholtzOp.H:1160
void fillGrad(const LevelData< EBCellFAB > &a_phi) override final
Not called, I think.
Definition CD_EBHelmholtzOp.cpp:1584
VoFStencil getFaceCenterFluxStencil(const FaceIndex &a_face, const DataIndex &a_dit) const
Get the face-centered flux stencil.
Definition CD_EBHelmholtzOp.cpp:2151
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:789
void divideByIdentityCoef(LevelData< EBCellFAB > &a_rhs) override final
Divide by the a-coefficient.
Definition CD_EBHelmholtzOp.cpp:1558
void assign(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Assign data.
Definition CD_EBHelmholtzOp.cpp:559
RealVect m_probLo
Lower-left corner of domain.
Definition CD_EBHelmholtzOp.H:1017
RefCountedPtr< EBMultigridInterpolator > m_interpolator
Interpolator object.
Definition CD_EBHelmholtzOp.H:1092
void computeRelaxationCoefficient()
Calculate relaxation coefficient.
Definition CD_EBHelmholtzOp.cpp:2038
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:2265
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:1034
EBMGProlong m_prolongOp
Prolongation operator for AMR levels.
Definition CD_EBHelmholtzOp.H:1067
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:861
IntVect m_ghostRhs
Ghost cells for rhs (note, the operator rhs)
Definition CD_EBHelmholtzOp.H:987
int refToCoarser() override final
Return coarsening factor to coarser level (1 if there is no coarser level);.
Definition CD_EBHelmholtzOp.cpp:814
LayoutData< BaseIFFAB< VoFStencil > > m_centroidFluxStencil[SpaceDim]
Face centroid flux stencil. Defined on all faces connecting one or more irregular vofs.
Definition CD_EBHelmholtzOp.H:1142
EBHelmholtzOp & operator=(const EBHelmholtzOp &a_oper)=delete
No copy assignment allowed.
Interval m_interval
Interval.
Definition CD_EBHelmholtzOp.H:909
void assignLocal(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Local assignment function.
Definition CD_EBHelmholtzOp.cpp:575
bool m_doExchange
Turn on/off exchange operation.
Definition CD_EBHelmholtzOp.H:971
EBMGProlong m_prolongOpMG
Prolongation operator for MG levels.
Definition CD_EBHelmholtzOp.H:1072
Real norm(const LevelData< EBCellFAB > &a_rhs, const int a_order) override final
Compute norm of data.
Definition CD_EBHelmholtzOp.cpp:702
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:1058
LayoutData< BaseIFFAB< FaceStencil > > m_interpStencil[SpaceDim]
Face centroid interpolation stencil.
Definition CD_EBHelmholtzOp.H:1137
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:527
void fillDomainFlux(EBFluxFAB &a_flux, const EBCellFAB &a_phi, const Box &a_cellBox, const DataIndex &a_dit)
Fill domain flux. This fills the flux on the domain face using centered differencing ala applyDomainF...
Definition CD_EBHelmholtzOp.cpp:1395
EBHelmholtzOp(const EBHelmholtzOp &&a_other)=delete
Disallowed move constructor.
RefCountedPtr< LevelData< EBFluxFAB > > m_Bcoef
B-coefficient in Helmholtz equation.
Definition CD_EBHelmholtzOp.H:1112
void deallocateFlux() const noexcept
Deallocate m_flux.
Definition CD_EBHelmholtzOp.cpp:258
Timer m_timer
Timer so user can profile.
Definition CD_EBHelmholtzOp.H:904
Location::Cell m_dataLocation
Data centering.
Definition CD_EBHelmholtzOp.H:919
void createCoarser(LevelData< EBCellFAB > &a_coarse, const LevelData< EBCellFAB > &a_fine, bool a_ghosted) override final
Create coarsened data.
Definition CD_EBHelmholtzOp.cpp:767
EBLevelGrid m_eblgCoar
Coarse level grid (if the operator has a coarse level)
Definition CD_EBHelmholtzOp.H:1047
IntVect m_ghostPhi
Ghost cells for phi.
Definition CD_EBHelmholtzOp.H:982
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:2246
EBLevelGrid m_eblgFine
Fine level grid (if the operator has a fine level)
Definition CD_EBHelmholtzOp.H:1032
void turnOffCFInterp()
Turn off BCs.
Definition CD_EBHelmholtzOp.cpp:202
Real m_relaxFactor
Successive over-relaxation factor (Must be >= 1).
Definition CD_EBHelmholtzOp.H:1007
int m_refToCoar
Refinement factor to coarse level.
Definition CD_EBHelmholtzOp.H:949
Real m_alpha
Alpha-coefficient.
Definition CD_EBHelmholtzOp.H:992
LevelData< EBCellFAB > m_relCoef
Relaxation coefficient.
Definition CD_EBHelmholtzOp.H:1122
LayoutData< VoFIterator > & getVofIterIrreg() const noexcept
Return all-cut VoFIterators (one per patch). Used by MFHelmholtzOp.
Definition CD_EBHelmholtzOp.cpp:282
void applyOpNoBoundary(LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_phi) override final
Apply operator but turn off all BCs.
Definition CD_EBHelmholtzOp.cpp:1574
void diagonalScale(LevelData< EBCellFAB > &a_rhs, bool a_kappaWeighted) override final
Do diagonal scaling.
Definition CD_EBHelmholtzOp.cpp:1536
void setToZero(LevelData< EBCellFAB > &a_lhs) override final
Set data to zero.
Definition CD_EBHelmholtzOp.cpp:759
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:513
RefCountedPtr< LevelData< BaseFab< bool > > > m_validCells
Valid grid cells (might be nullptr on MG levels)
Definition CD_EBHelmholtzOp.H:1077
Copier m_exchangeCopier
Pre-built exchange copier.
Definition CD_EBHelmholtzOp.H:1022
void interpolateCF(LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > *a_phiCoar, const bool a_homogeneousCFBC)
Apply coarse-fine boundary conditions.
Definition CD_EBHelmholtzOp.cpp:1628
void coarsenCell(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiFine)
Coarsen data from fine to coar level.
Definition CD_EBHelmholtzOp.cpp:2387
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:1801
LayoutData< BaseIFFAB< Real > > m_interpolant[SpaceDim]
Interpolant for when we want centroid fluxes.
Definition CD_EBHelmholtzOp.H:1132
void turnOnExchange()
Turn on exchange operation.
Definition CD_EBHelmholtzOp.cpp:226
void inhomogeneousCFInterp(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoar)
Inhomogeneous coarse-fine interpolation.
Definition CD_EBHelmholtzOp.cpp:1616
void coarsenFlux(LevelData< EBFluxFAB > &a_flux, const LevelData< EBFluxFAB > &a_fineFlux)
Coarsen fluxes on the fine level onto this level.
Definition CD_EBHelmholtzOp.cpp:2395
bool m_hasFine
True if there's a finer level.
Definition CD_EBHelmholtzOp.H:939
bool m_doCoarsen
Turn on/off exchange operation.
Definition CD_EBHelmholtzOp.H:977
void assignCopier(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const Copier &a_copier) override final
Assign lhs.
Definition CD_EBHelmholtzOp.cpp:567
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:681
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:1915
std::map< std::pair< int, Side::LoHiSide >, Box > m_sideBox
Domain boxes on each side.
Definition CD_EBHelmholtzOp.H:1195
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:1180
const RefCountedPtr< LevelData< EBCellFAB > > & getAcoef()
Get the Helmholtz A-coefficient on cell centers.
Definition CD_EBHelmholtzOp.cpp:179
RealVect m_vecDx
Vector resolution.
Definition CD_EBHelmholtzOp.H:1012
void incr(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const Real a_scale) override final
Increment operator.
Definition CD_EBHelmholtzOp.cpp:653
LayoutData< DomainBndryBoxes > m_domainBndryBoxes
Precomputed domain-boundary boxes for each grid patch.
Definition CD_EBHelmholtzOp.H:1236
LayoutData< VoFIterator > m_vofIterMulti
VoFIterator for "multi-cells".
Definition CD_EBHelmholtzOp.H:1175
LayoutData< BaseIVFAB< Real > > m_betaDiagWeight
Weights of diagonal beta terms.
Definition CD_EBHelmholtzOp.H:1165
EBHelmholtzOp(const EBHelmholtzOp &a_other)=delete
Disallowed copy constructor.
Vector< IntVect > m_colors
"Colors" for the relaxation methods
Definition CD_EBHelmholtzOp.H:1241
const RefCountedPtr< LevelData< EBFluxFAB > > & getBcoef()
Get the Helmholtz B-coefficient on faces.
Definition CD_EBHelmholtzOp.cpp:185
RefCountedPtr< LevelData< EBCellFAB > > m_Acoef
A-coefficient in Helmholtz equation.
Definition CD_EBHelmholtzOp.H:1107
void turnOnCoarsening()
Turn on coarsening operation.
Definition CD_EBHelmholtzOp.cpp:242
LayoutData< VoFIterator > m_vofIterDomLo[SpaceDim]
VoF iterators for lo domain side.
Definition CD_EBHelmholtzOp.H:1185
LayoutData< VoFIterator > m_vofIterIrreg
VoFIterator for irregular cells.
Definition CD_EBHelmholtzOp.H:1170
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:820
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:1108
EBMGRestrict m_restrictOpMG
Restriction operator if this is an MG level.
Definition CD_EBHelmholtzOp.H:1062
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:777
Real m_beta
Beta-coefficient.
Definition CD_EBHelmholtzOp.H:997
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:1454
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:1144
LayoutData< VoFIterator > m_vofIterDomHi[SpaceDim]
VoF iterators for hi domain side.
Definition CD_EBHelmholtzOp.H:1190
void buildCopier(Copier &a_copier, const LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override
Build copier.
Definition CD_EBHelmholtzOp.cpp:2403
void defineStencils()
Define stencils.
Definition CD_EBHelmholtzOp.cpp:288
void prolongIncrement(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_correctCoarse) override final
Prolongation method.
Definition CD_EBHelmholtzOp.cpp:806
const LevelData< EBCellFAB > & getRelaxationCoeff() const noexcept
Returns m_relCoef. Used by MFHelmholtzOp.
Definition CD_EBHelmholtzOp.cpp:274
EBLevelGrid m_eblgCoarMG
Coarser grids (multigrid level)
Definition CD_EBHelmholtzOp.H:1052
RefCountedPtr< LevelData< BaseIVFAB< Real > > > m_BcoefIrreg
B-coefficient in Helmholtz equation, but on EB faces.
Definition CD_EBHelmholtzOp.H:1117
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:49
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
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
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:1205