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
12
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 Chebyshev,
54 RestrictedAdditiveSchwarz,
55 };
56
60 EBHelmholtzOp() = delete;
61
66 EBHelmholtzOp(const EBHelmholtzOp& a_other) = delete;
67
72 EBHelmholtzOp(const EBHelmholtzOp&& a_other) = delete;
73
112 EBHelmholtzOp(const Location::Cell a_dataLocation,
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,
126 const Real& a_dx,
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,
132 const Real& a_alpha,
133 const Real& a_beta,
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,
139 const Smoother& a_smoother,
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);
145
149 virtual ~EBHelmholtzOp();
150
156 operator=(const EBHelmholtzOp& a_oper) = delete;
157
163 operator=(const EBHelmholtzOp&& a_oper) = delete;
164
168 void
170
174 void
176
181 void
183
188 void
190
195 void
197
202 void
204
212 void
213 setAcoAndBco(const RefCountedPtr<LevelData<EBCellFAB>>& a_Acoef,
214 const RefCountedPtr<LevelData<EBFluxFAB>>& a_Bcoef,
215 const RefCountedPtr<LevelData<BaseIVFAB<Real>>>& a_BcoefIrreg);
216
221 const RefCountedPtr<LevelData<EBCellFAB>>&
222 getAcoef();
223
228 const RefCountedPtr<LevelData<EBFluxFAB>>&
229 getBcoef();
230
235 const RefCountedPtr<LevelData<BaseIVFAB<Real>>>&
237
245 void
246 coarsenCell(LevelData<EBCellFAB>& a_phi, const LevelData<EBCellFAB>& a_phiFine);
247
255 void
256 coarsenFlux(LevelData<EBFluxFAB>& a_flux, const LevelData<EBFluxFAB>& a_fineFlux);
257
269 void
270 pointJacobiKernel(EBCellFAB& a_Lcorr,
271 EBCellFAB& a_corr,
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;
278
292 void
293 chebyshevKernel(EBCellFAB& a_Lcorr,
294 EBCellFAB& a_corr,
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;
302
315 void
316 gauSaiRedBlackKernel(EBCellFAB& a_Lcorr,
317 EBCellFAB& a_corr,
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;
325
338 void
339 gauSaiMultiColorKernel(EBCellFAB& a_Lcorr,
340 EBCellFAB& a_corr,
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;
348
356 void
357 residual(LevelData<EBCellFAB>& a_residual,
358 const LevelData<EBCellFAB>& a_phi,
359 const LevelData<EBCellFAB>& a_rhs,
360 const bool a_homogeneousPhysBc) override;
361
368 void
369 preCond(LevelData<EBCellFAB>& a_corr, const LevelData<EBCellFAB>& a_residual) override final;
370
377 void
378 interpolateCF(LevelData<EBCellFAB>& a_phiFine, const LevelData<EBCellFAB>* a_phiCoar, const bool a_homogeneousCFBC);
379
384 void
385 homogeneousCFInterp(LevelData<EBCellFAB>& a_phi);
386
392 void
393 inhomogeneousCFInterp(LevelData<EBCellFAB>& a_phi, const LevelData<EBCellFAB>& a_phiCoar);
394
402 void
403 gauSaiMultiColor(LevelData<EBCellFAB>& a_phi,
404 const LevelData<EBCellFAB>& a_Lphi,
405 const LevelData<EBCellFAB>& a_rhs,
406 const IntVect& a_color) const;
407
417 void
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);
423
431 void
432 applyOp(LevelData<EBCellFAB>& a_Lphi, const LevelData<EBCellFAB>& a_phi, bool a_homogeneousPhysBc) override final;
433
445 void
446 applyOp(EBCellFAB& a_Lphi,
447 EBCellFAB& a_phi,
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;
454
466 void
467 applyOpRegular(EBCellFAB& a_Lphi,
468 EBCellFAB& a_phi,
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;
475
486 void
487 applyDomainFlux(EBCellFAB& a_phi,
488 const EBFluxFAB& a_Bcoef,
489 const Box& a_cellBox,
490 const DataIndex& a_dit,
491 const bool a_homogeneousPhysBc) const noexcept;
492
502 void
503 fillDomainFlux(EBFluxFAB& a_flux,
504 const EBCellFAB& a_phi,
505 const Box& a_cellBox,
506 const DataIndex& a_dit,
507 const bool a_homogeneousPhysBC);
508
521 void
522 applyOpIrregular(EBCellFAB& a_Lphi,
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;
531
537 void
538 create(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override final;
539
546 void
547 assign(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override final;
548
557 void
558 assignCopier(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const Copier& a_copier) override final;
559
565 void
566 assignLocal(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override final;
567
574 void
575 buildCopier(Copier& a_copier, const LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override;
576
583 Real
584 dotProduct(const LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override final;
585
601 void
602 dotProductMaskedLocal(Real& a_sumKappaXY,
603 Real& a_sumVolume,
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;
608
615 void
616 incr(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const Real a_scale) override final;
617
626 void
627 axby(LevelData<EBCellFAB>& a_lhs,
628 const LevelData<EBCellFAB>& a_x,
629 const LevelData<EBCellFAB>& a_y,
630 const Real a_a,
631 const Real a_b) override final;
632
638 void
639 scale(LevelData<EBCellFAB>& a_lhs, const Real& a_scale) override final;
640
646 static void
647 scaleLocal(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) noexcept;
648
656 Real
657 norm(const LevelData<EBCellFAB>& a_rhs, const int a_order) override final;
658
663 void
664 setToZero(LevelData<EBCellFAB>& a_lhs) override final;
665
672 void
673 createCoarser(LevelData<EBCellFAB>& a_coarse, const LevelData<EBCellFAB>& a_fine, bool a_ghosted) override final;
674
681 void
682 relax(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, int a_iterations) override final;
683
690 void
691 restrictResidual(LevelData<EBCellFAB>& a_resCoar,
692 LevelData<EBCellFAB>& a_phi,
693 const LevelData<EBCellFAB>& a_rhs) override final;
694
700 void
701 prolongIncrement(LevelData<EBCellFAB>& a_phi, const LevelData<EBCellFAB>& a_correctCoarse) override final;
702
707 int
708 refToCoarser() override final;
709
720 void
721 AMROperator(LevelData<EBCellFAB>& a_Lphi,
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;
727
739 void
740 refluxFreeAMROperator(LevelData<EBCellFAB>& a_Lphi,
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);
746
757 void
758 AMRResidual(LevelData<EBCellFAB>& a_residual,
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;
765
774 void
775 AMRResidualNF(LevelData<EBCellFAB>& a_residual,
776 const LevelData<EBCellFAB>& a_phi,
777 const LevelData<EBCellFAB>& a_phiCoar,
778 const LevelData<EBCellFAB>& a_rhs,
779 bool a_homogeneousPhysBC) override final;
780
790 void
791 AMRResidualNC(LevelData<EBCellFAB>& a_residual,
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;
797
806 void
807 AMROperatorNF(LevelData<EBCellFAB>& a_Lphi,
808 const LevelData<EBCellFAB>& a_phi,
809 const LevelData<EBCellFAB>& a_phiCoar,
810 bool a_homogeneousPhysBC) override final;
811
821 void
822 AMROperatorNC(LevelData<EBCellFAB>& a_Lphi,
823 const LevelData<EBCellFAB>& a_phiFine,
824 const LevelData<EBCellFAB>& a_phi,
825 bool a_homogeneousPhysBC,
826 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp) override final;
827
836 void
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;
842
848 void
849 AMRProlong(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_coarseCorrection) override final;
850
857 void
858 AMRUpdateResidual(LevelData<EBCellFAB>& a_residual,
859 const LevelData<EBCellFAB>& a_correction,
860 const LevelData<EBCellFAB>& a_coarseCorrection) override final;
861
867 void
868 setAlphaAndBeta(const Real& a_alpha, const Real& a_beta) override final;
869
876 void
877 createCoarsened(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const int& a_refRat) override final;
878
884 void
885 diagonalScale(LevelData<EBCellFAB>& a_rhs, bool a_kappaWeighted) override final;
886
891 void
892 divideByIdentityCoef(LevelData<EBCellFAB>& a_rhs) override final;
893
899 void
900 applyOpNoBoundary(LevelData<EBCellFAB>& a_Lphi, const LevelData<EBCellFAB>& a_phi) override final;
901
906 void
907 fillGrad(const LevelData<EBCellFAB>& a_phi) override final;
908
917 void
918 getFlux(EBFluxFAB& a_flux,
919 const LevelData<EBCellFAB>& a_data,
920 const Box& a_grid,
921 const DataIndex& a_dit,
922 Real a_scale) override final;
923
928 void
929 allocateFlux() const noexcept;
930
935 LevelData<EBFluxFAB>&
936 getFlux() const;
937
942 const LevelData<EBCellFAB>&
943 getRelaxationCoeff() const noexcept;
944
949 int
950 getChebyOrder() const noexcept;
951
956 Real
957 getChebyEigRatio() const noexcept;
958
963 Real
964 getSpectralRadius() const noexcept;
965
970 int
971 getRasInnerSweeps() const noexcept;
972
977 LayoutData<VoFIterator>&
978 getVofIterIrreg() const noexcept;
979
980protected:
984 static constexpr int m_nComp = 1;
985
989 static constexpr int m_comp = 0;
990
995
999 Interval m_interval;
1000
1005
1010
1015
1020
1025
1030
1035
1040
1045
1050
1056
1062
1068
1072 IntVect m_ghostPhi;
1073
1077 IntVect m_ghostRhs;
1078
1083
1088
1092 Real m_dx;
1093
1098
1103
1109
1115
1120
1124 RealVect m_vecDx;
1125
1129 RealVect m_probLo;
1130
1135
1140
1144 EBLevelGrid m_eblgFine;
1145
1149 EBLevelGrid m_eblg;
1150
1154 EBLevelGrid m_eblgCoFi;
1155
1159 EBLevelGrid m_eblgCoar;
1160
1164 EBLevelGrid m_eblgCoarMG;
1165
1170
1175
1180
1185
1189 RefCountedPtr<LevelData<BaseFab<bool>>> m_validCells;
1190
1195
1199 RefCountedPtr<EBHelmholtzEBBC> m_ebBc;
1200
1205
1209 RefCountedPtr<EBReflux> m_fluxReg;
1210
1214 RefCountedPtr<EBCoarAve> m_coarAve;
1215
1219 RefCountedPtr<LevelData<EBCellFAB>> m_Acoef;
1220
1224 RefCountedPtr<LevelData<EBFluxFAB>> m_Bcoef;
1225
1229 RefCountedPtr<LevelData<BaseIVFAB<Real>>> m_BcoefIrreg;
1230
1234 LevelData<EBCellFAB> m_relCoef;
1235
1241 mutable LevelData<EBFluxFAB> m_flux;
1242
1246 LayoutData<BaseIFFAB<Real>> m_interpolant[SpaceDim];
1247
1251 LayoutData<BaseIFFAB<FaceStencil>> m_interpStencil[SpaceDim];
1252
1256 LayoutData<BaseIFFAB<VoFStencil>> m_centroidFluxStencil[SpaceDim];
1257
1264 LayoutData<BaseIVFAB<VoFStencil>> m_relaxStencils;
1265
1270 LayoutData<RefCountedPtr<VCAggStencil>> m_aggRelaxStencil;
1271
1275 LayoutData<BaseIVFAB<Real>> m_alphaDiagWeight;
1276
1280 LayoutData<BaseIVFAB<Real>> m_betaDiagWeight;
1281
1285 mutable LayoutData<VoFIterator> m_vofIterIrreg;
1286
1290 mutable LayoutData<VoFIterator> m_vofIterMulti;
1291
1295 mutable LayoutData<VoFIterator> m_vofIterStenc;
1296
1300 mutable LayoutData<VoFIterator> m_vofIterDomLo[SpaceDim];
1301
1305 mutable LayoutData<VoFIterator> m_vofIterDomHi[SpaceDim];
1306
1310 std::map<std::pair<int, Side::LoHiSide>, Box> m_sideBox;
1311
1320 {
1324 bool touchesDomain = false;
1325
1329 int hasLo[SpaceDim] = {D_DECL(0, 0, 0)};
1330
1334 int hasHi[SpaceDim] = {D_DECL(0, 0, 0)};
1335
1339 Box loBox[SpaceDim];
1340
1344 Box hiBox[SpaceDim];
1345 };
1346
1351 LayoutData<DomainBndryBoxes> m_domainBndryBoxes;
1352
1356 Vector<IntVect> m_colors;
1357
1364 void
1365 relaxPointJacobi(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, const int a_iterations);
1366
1373 void
1374 relaxGSRedBlack(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, const int a_iterations);
1375
1382 void
1383 relaxGSMultiColor(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, const int a_iterations);
1384
1395 void
1396 relaxChebyshev(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, const int a_iterations);
1397
1410 void
1411 relaxRestrictedAdditiveSchwarz(LevelData<EBCellFAB>& a_correction,
1412 const LevelData<EBCellFAB>& a_residual,
1413 const int a_iterations);
1414
1418 void
1420
1424 void
1426
1432 void
1434
1438 void
1440
1444 void
1446
1454 VoFStencil
1455 getFaceCenterFluxStencil(const FaceIndex& a_face, const DataIndex& a_dit) const;
1456
1464 VoFStencil
1465 getFaceCentroidFluxStencil(const FaceIndex& a_face, const DataIndex& a_dit) const;
1466
1476 void
1477 computeFlux(EBFaceFAB& a_fluxCentroid,
1478 const EBCellFAB& a_phi,
1479 const Box& a_cellBox,
1480 const DataIndex& a_dit,
1481 const int a_dir);
1482
1492 void
1493 computeFaceCenteredFlux(EBFaceFAB& a_fluxCenter,
1494 const EBCellFAB& a_phi,
1495 const Box& a_cellBox,
1496 const DataIndex& a_dit,
1497 const int a_dir);
1498
1508 void
1509 computeFaceCentroidFlux(EBFaceFAB& a_flux,
1510 const EBCellFAB& a_phi,
1511 const Box& a_cellBox,
1512 const DataIndex& a_dit,
1513 const int a_dir);
1514
1520 void
1521 computeFlux(const LevelData<EBCellFAB>& a_phi);
1522
1528 void
1529 computeCoarseFineFlux(const LevelData<EBCellFAB>& a_phi);
1530
1539 void
1540 computeFineCoarseFlux(const LevelData<EBCellFAB>& a_phi, const EBReflux& a_coarFluxReg);
1541
1553 void
1554 computeFaceFlux(EBFaceFAB& a_flux,
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;
1560
1569 void
1570 reflux(LevelData<EBCellFAB>& a_Lphi,
1571 const LevelData<EBCellFAB>& a_phiFine,
1572 const LevelData<EBCellFAB>& a_phi,
1573 AMRLevelOp<LevelData<EBCellFAB>>& a_finerOp);
1574};
1575
1576#include <CD_NamespaceFooter.H>
1577
1578#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
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