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 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
111 EBHelmholtzOp(const Location::Cell a_dataLocation,
112 const EBLevelGrid& a_eblgFine,
113 const EBLevelGrid& a_eblg,
114 const EBLevelGrid& a_eblgCoFi,
115 const EBLevelGrid& a_eblgCoar,
116 const EBLevelGrid& a_eblgCoarMG,
117 const RefCountedPtr<LevelData<BaseFab<bool>>>& a_validCells,
118 const RefCountedPtr<EBMultigridInterpolator>& a_interpolator,
119 const RefCountedPtr<EBReflux>& a_fluxReg,
120 const RefCountedPtr<EBCoarAve>& a_coarAve,
121 const RefCountedPtr<EBHelmholtzDomainBC>& a_domainBC,
122 const RefCountedPtr<EBHelmholtzEBBC>& a_ebBC,
123 const RealVect& a_probLo,
124 const Real& a_dx,
125 const int& a_refToFine,
126 const int& a_refToCoar,
127 const bool& a_hasFine,
128 const bool& a_hasCoar,
129 const bool& a_hasMGObjects,
130 const Real& a_alpha,
131 const Real& a_beta,
132 const RefCountedPtr<LevelData<EBCellFAB>>& a_Acoef,
133 const RefCountedPtr<LevelData<EBFluxFAB>>& a_Bcoef,
134 const RefCountedPtr<LevelData<BaseIVFAB<Real>>>& a_BcoefIrreg,
135 const IntVect& a_ghostPhi,
136 const IntVect& a_ghostRhs,
137 const Smoother& a_smoother,
138 const Real& a_relaxFactor,
139 const int& a_chebyOrder,
140 const Real& a_chebyEigRatio,
141 const int& a_rasInnerSweeps,
142 const bool a_refluxFree = false);
143
147 virtual ~EBHelmholtzOp();
148
154 operator=(const EBHelmholtzOp& a_oper) = delete;
155
161 operator=(const EBHelmholtzOp&& a_oper) = delete;
162
166 void
168
172 void
174
179 void
181
186 void
188
193 void
195
200 void
202
210 void
211 setAcoAndBco(const RefCountedPtr<LevelData<EBCellFAB>>& a_Acoef,
212 const RefCountedPtr<LevelData<EBFluxFAB>>& a_Bcoef,
213 const RefCountedPtr<LevelData<BaseIVFAB<Real>>>& a_BcoefIrreg);
214
219 const RefCountedPtr<LevelData<EBCellFAB>>&
220 getAcoef();
221
226 const RefCountedPtr<LevelData<EBFluxFAB>>&
227 getBcoef();
228
233 const RefCountedPtr<LevelData<BaseIVFAB<Real>>>&
235
243 void
244 coarsenCell(LevelData<EBCellFAB>& a_phi, const LevelData<EBCellFAB>& a_phiFine);
245
253 void
254 coarsenFlux(LevelData<EBFluxFAB>& a_flux, const LevelData<EBFluxFAB>& a_fineFlux);
255
267 void
268 pointJacobiKernel(EBCellFAB& a_Lcorr,
269 EBCellFAB& a_corr,
270 const EBCellFAB& a_resid,
271 const EBCellFAB& a_Acoef,
272 const EBFluxFAB& a_Bcoef,
273 const BaseIVFAB<Real>& a_BcoefIrreg,
274 const Box& a_cellBox,
275 const DataIndex& a_dit) const noexcept;
276
290 void
291 chebyshevKernel(EBCellFAB& a_Lcorr,
292 EBCellFAB& a_corr,
293 const EBCellFAB& a_resid,
294 const EBCellFAB& a_Acoef,
295 const EBFluxFAB& a_Bcoef,
296 const BaseIVFAB<Real>& a_BcoefIrreg,
297 const Box& a_cellBox,
298 const DataIndex& a_dit,
299 const Real a_omega) const noexcept;
300
313 void
314 gauSaiRedBlackKernel(EBCellFAB& a_Lcorr,
315 EBCellFAB& a_corr,
316 const EBCellFAB& a_resid,
317 const EBCellFAB& a_Acoef,
318 const EBFluxFAB& a_Bcoef,
319 const BaseIVFAB<Real>& a_BcoefIrreg,
320 const Box& a_cellBox,
321 const DataIndex& a_dit,
322 const int& a_redBlack) const noexcept;
323
336 void
337 gauSaiMultiColorKernel(EBCellFAB& a_Lcorr,
338 EBCellFAB& a_corr,
339 const EBCellFAB& a_resid,
340 const EBCellFAB& a_Acoef,
341 const EBFluxFAB& a_Bcoef,
342 const BaseIVFAB<Real>& a_BcoefIrreg,
343 const Box& a_cellBox,
344 const DataIndex& a_dit,
345 const IntVect& a_color) const noexcept;
346
354 void
355 residual(LevelData<EBCellFAB>& a_residual,
356 const LevelData<EBCellFAB>& a_phi,
357 const LevelData<EBCellFAB>& a_rhs,
358 const bool a_homogeneousPhysBc) override;
359
366 void
367 preCond(LevelData<EBCellFAB>& a_corr, const LevelData<EBCellFAB>& a_residual) override final;
368
375 void
376 interpolateCF(LevelData<EBCellFAB>& a_phiFine, const LevelData<EBCellFAB>* a_phiCoar, const bool a_homogeneousCFBC);
377
382 void
383 homogeneousCFInterp(LevelData<EBCellFAB>& a_phi);
384
390 void
391 inhomogeneousCFInterp(LevelData<EBCellFAB>& a_phi, const LevelData<EBCellFAB>& a_phiCoar);
392
400 void
401 gauSaiMultiColor(LevelData<EBCellFAB>& a_phi,
402 const LevelData<EBCellFAB>& a_Lphi,
403 const LevelData<EBCellFAB>& a_rhs,
404 const IntVect& a_color) const;
405
415 void
416 applyOp(LevelData<EBCellFAB>& a_Lphi,
417 const LevelData<EBCellFAB>& a_phi,
418 const LevelData<EBCellFAB>* const a_phiCoar,
419 const bool a_homogeneousPhysBC,
420 const bool a_homogeneousCFBC);
421
429 void
430 applyOp(LevelData<EBCellFAB>& a_Lphi, const LevelData<EBCellFAB>& a_phi, bool a_homogeneousPhysBc) override final;
431
443 void
444 applyOp(EBCellFAB& a_Lphi,
445 EBCellFAB& a_phi,
446 const EBCellFAB& a_Acoef,
447 const EBFluxFAB& a_Bcoef,
448 const BaseIVFAB<Real>& a_BcoefIrreg,
449 const Box& a_cellBox,
450 const DataIndex& a_dit,
451 const bool a_homogeneousPhysBC) const noexcept;
452
464 void
465 applyOpRegular(EBCellFAB& a_Lphi,
466 EBCellFAB& a_phi,
467 const EBCellFAB& a_Acoef,
468 const EBFluxFAB& a_Bcoef,
469 const BaseIVFAB<Real>& a_BcoefIrreg,
470 const Box& a_cellBox,
471 const DataIndex& a_dit,
472 const bool a_homogeneousPhysBC) const noexcept;
473
484 void
485 applyDomainFlux(EBCellFAB& a_phi,
486 const EBFluxFAB& a_Bcoef,
487 const Box& a_cellBox,
488 const DataIndex& a_dit,
489 const bool a_homogeneousPhysBc) const noexcept;
490
500 void
501 fillDomainFlux(EBFluxFAB& a_flux,
502 const EBCellFAB& a_phi,
503 const Box& a_cellBox,
504 const DataIndex& a_dit,
505 const bool a_homogeneousPhysBC);
506
519 void
520 applyOpIrregular(EBCellFAB& a_Lphi,
521 const EBCellFAB& a_phi,
522 const EBCellFAB& a_Acoef,
523 const EBFluxFAB& a_Bcoef,
524 const BaseIVFAB<Real>& a_BcoefIrreg,
525 const BaseIVFAB<Real>& a_alphaDiagWeight,
526 const Box& a_cellBox,
527 const DataIndex& a_dit,
528 const bool a_homogeneousPhysBC) const noexcept;
529
535 void
536 create(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override final;
537
544 void
545 assign(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override final;
546
555 void
556 assignCopier(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const Copier& a_copier) override final;
557
563 void
564 assignLocal(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override final;
565
572 void
573 buildCopier(Copier& a_copier, const LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override;
574
581 Real
582 dotProduct(const LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) override final;
583
599 void
600 dotProductMaskedLocal(Real& a_sumKappaXY,
601 Real& a_sumVolume,
602 const LevelData<EBCellFAB>& a_lhs,
603 const LevelData<EBCellFAB>& a_rhs,
604 const LevelData<BaseFab<bool>>& a_mask,
605 const bool a_needVolume) const noexcept;
606
613 void
614 incr(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const Real a_scale) override final;
615
624 void
625 axby(LevelData<EBCellFAB>& a_lhs,
626 const LevelData<EBCellFAB>& a_x,
627 const LevelData<EBCellFAB>& a_y,
628 const Real a_a,
629 const Real a_b) override final;
630
636 void
637 scale(LevelData<EBCellFAB>& a_lhs, const Real& a_scale) override final;
638
644 static void
645 scaleLocal(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs) noexcept;
646
654 Real
655 norm(const LevelData<EBCellFAB>& a_rhs, const int a_order) override final;
656
661 void
662 setToZero(LevelData<EBCellFAB>& a_lhs) override final;
663
670 void
671 createCoarser(LevelData<EBCellFAB>& a_coarse, const LevelData<EBCellFAB>& a_fine, bool a_ghosted) override final;
672
679 void
680 relax(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, int a_iterations) override final;
681
688 void
689 restrictResidual(LevelData<EBCellFAB>& a_resCoar,
690 LevelData<EBCellFAB>& a_phi,
691 const LevelData<EBCellFAB>& a_rhs) override final;
692
698 void
699 prolongIncrement(LevelData<EBCellFAB>& a_phi, const LevelData<EBCellFAB>& a_correctCoarse) override final;
700
705 int
706 refToCoarser() override final;
707
718 void
719 AMROperator(LevelData<EBCellFAB>& a_Lphi,
720 const LevelData<EBCellFAB>& a_phiFine,
721 const LevelData<EBCellFAB>& a_phi,
722 const LevelData<EBCellFAB>& a_phiCoar,
723 const bool a_homogeneousPhysBC,
724 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp) override final;
725
737 void
738 refluxFreeAMROperator(LevelData<EBCellFAB>& a_Lphi,
739 const LevelData<EBCellFAB>& a_phiFine,
740 const LevelData<EBCellFAB>& a_phi,
741 const LevelData<EBCellFAB>& a_phiCoar,
742 const bool a_homogeneousPhysBC,
743 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp);
744
755 void
756 AMRResidual(LevelData<EBCellFAB>& a_residual,
757 const LevelData<EBCellFAB>& a_phiFine,
758 const LevelData<EBCellFAB>& a_phi,
759 const LevelData<EBCellFAB>& a_phiCoar,
760 const LevelData<EBCellFAB>& a_rhs,
761 bool a_homogeneousPhysBC,
762 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp) override final;
763
772 void
773 AMRResidualNF(LevelData<EBCellFAB>& a_residual,
774 const LevelData<EBCellFAB>& a_phi,
775 const LevelData<EBCellFAB>& a_phiCoar,
776 const LevelData<EBCellFAB>& a_rhs,
777 bool a_homogeneousPhysBC) override final;
778
788 void
789 AMRResidualNC(LevelData<EBCellFAB>& a_residual,
790 const LevelData<EBCellFAB>& a_phiFine,
791 const LevelData<EBCellFAB>& a_phi,
792 const LevelData<EBCellFAB>& a_rhs,
793 bool a_homogeneousPhysBC,
794 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp) override final;
795
804 void
805 AMROperatorNF(LevelData<EBCellFAB>& a_Lphi,
806 const LevelData<EBCellFAB>& a_phi,
807 const LevelData<EBCellFAB>& a_phiCoar,
808 bool a_homogeneousPhysBC) override final;
809
819 void
820 AMROperatorNC(LevelData<EBCellFAB>& a_Lphi,
821 const LevelData<EBCellFAB>& a_phiFine,
822 const LevelData<EBCellFAB>& a_phi,
823 bool a_homogeneousPhysBC,
824 AMRLevelOp<LevelData<EBCellFAB>>* a_finerOp) override final;
825
834 void
835 AMRRestrict(LevelData<EBCellFAB>& a_residualCoarse,
836 const LevelData<EBCellFAB>& a_residual,
837 const LevelData<EBCellFAB>& a_correction,
838 const LevelData<EBCellFAB>& a_coarseCorrection,
839 bool a_skip_res) override final;
840
846 void
847 AMRProlong(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_coarseCorrection) override final;
848
855 void
856 AMRUpdateResidual(LevelData<EBCellFAB>& a_residual,
857 const LevelData<EBCellFAB>& a_correction,
858 const LevelData<EBCellFAB>& a_coarseCorrection) override final;
859
865 void
866 setAlphaAndBeta(const Real& a_alpha, const Real& a_beta) override final;
867
874 void
875 createCoarsened(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const int& a_refRat) override final;
876
882 void
883 diagonalScale(LevelData<EBCellFAB>& a_rhs, bool a_kappaWeighted) override final;
884
889 void
890 divideByIdentityCoef(LevelData<EBCellFAB>& a_rhs) override final;
891
897 void
898 applyOpNoBoundary(LevelData<EBCellFAB>& a_Lphi, const LevelData<EBCellFAB>& a_phi) override final;
899
904 void
905 fillGrad(const LevelData<EBCellFAB>& a_phi) override final;
906
915 void
916 getFlux(EBFluxFAB& a_flux,
917 const LevelData<EBCellFAB>& a_data,
918 const Box& a_grid,
919 const DataIndex& a_dit,
920 Real a_scale) override final;
921
925 void
926 allocateFlux() const noexcept;
927
931 void
932 deallocateFlux() const noexcept;
933
938 LevelData<EBFluxFAB>&
939 getFlux() const;
940
945 const LevelData<EBCellFAB>&
946 getRelaxationCoeff() const noexcept;
947
952 int
953 getChebyOrder() const noexcept;
954
959 Real
960 getChebyEigRatio() const noexcept;
961
966 Real
967 getSpectralRadius() const noexcept;
968
973 int
974 getRasInnerSweeps() const noexcept;
975
980 LayoutData<VoFIterator>&
981 getVofIterIrreg() const noexcept;
982
983protected:
987 static constexpr int m_nComp = 1;
988
992 static constexpr int m_comp = 0;
993
998
1002 Interval m_interval;
1003
1008
1013
1018
1023
1028
1033
1038
1043
1048
1053
1059
1065
1071
1075 IntVect m_ghostPhi;
1076
1080 IntVect m_ghostRhs;
1081
1086
1091
1095 Real m_dx;
1096
1101
1106
1112
1118
1123
1127 RealVect m_vecDx;
1128
1132 RealVect m_probLo;
1133
1138
1143
1147 EBLevelGrid m_eblgFine;
1148
1152 EBLevelGrid m_eblg;
1153
1157 EBLevelGrid m_eblgCoFi;
1158
1162 EBLevelGrid m_eblgCoar;
1163
1167 EBLevelGrid m_eblgCoarMG;
1168
1173
1178
1183
1188
1192 RefCountedPtr<LevelData<BaseFab<bool>>> m_validCells;
1193
1198
1202 RefCountedPtr<EBHelmholtzEBBC> m_ebBc;
1203
1208
1212 RefCountedPtr<EBReflux> m_fluxReg;
1213
1217 RefCountedPtr<EBCoarAve> m_coarAve;
1218
1222 RefCountedPtr<LevelData<EBCellFAB>> m_Acoef;
1223
1227 RefCountedPtr<LevelData<EBFluxFAB>> m_Bcoef;
1228
1232 RefCountedPtr<LevelData<BaseIVFAB<Real>>> m_BcoefIrreg;
1233
1237 LevelData<EBCellFAB> m_relCoef;
1238
1242 mutable LevelData<EBFluxFAB>* m_flux;
1243
1247 LayoutData<BaseIFFAB<Real>> m_interpolant[SpaceDim];
1248
1252 LayoutData<BaseIFFAB<FaceStencil>> m_interpStencil[SpaceDim];
1253
1257 LayoutData<BaseIFFAB<VoFStencil>> m_centroidFluxStencil[SpaceDim];
1258
1265 LayoutData<BaseIVFAB<VoFStencil>> m_relaxStencils;
1266
1271 LayoutData<RefCountedPtr<VCAggStencil>> m_aggRelaxStencil;
1272
1276 LayoutData<BaseIVFAB<Real>> m_alphaDiagWeight;
1277
1281 LayoutData<BaseIVFAB<Real>> m_betaDiagWeight;
1282
1286 mutable LayoutData<VoFIterator> m_vofIterIrreg;
1287
1291 mutable LayoutData<VoFIterator> m_vofIterMulti;
1292
1296 mutable LayoutData<VoFIterator> m_vofIterStenc;
1297
1301 mutable LayoutData<VoFIterator> m_vofIterDomLo[SpaceDim];
1302
1306 mutable LayoutData<VoFIterator> m_vofIterDomHi[SpaceDim];
1307
1311 std::map<std::pair<int, Side::LoHiSide>, Box> m_sideBox;
1312
1321 {
1325 bool touchesDomain = false;
1326
1330 int hasLo[SpaceDim] = {D_DECL(0, 0, 0)};
1331
1335 int hasHi[SpaceDim] = {D_DECL(0, 0, 0)};
1336
1340 Box loBox[SpaceDim];
1341
1345 Box hiBox[SpaceDim];
1346 };
1347
1352 LayoutData<DomainBndryBoxes> m_domainBndryBoxes;
1353
1357 Vector<IntVect> m_colors;
1358
1365 void
1366 relaxPointJacobi(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, const int a_iterations);
1367
1374 void
1375 relaxGSRedBlack(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, const int a_iterations);
1376
1383 void
1384 relaxGSMultiColor(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, const int a_iterations);
1385
1396 void
1397 relaxChebyshev(LevelData<EBCellFAB>& a_correction, const LevelData<EBCellFAB>& a_residual, const int a_iterations);
1398
1411 void
1412 relaxRestrictedAdditiveSchwarz(LevelData<EBCellFAB>& a_correction,
1413 const LevelData<EBCellFAB>& a_residual,
1414 const int a_iterations);
1415
1419 void
1421
1425 void
1427
1433 void
1435
1439 void
1441
1445 void
1447
1455 VoFStencil
1456 getFaceCenterFluxStencil(const FaceIndex& a_face, const DataIndex& a_dit) const;
1457
1465 VoFStencil
1466 getFaceCentroidFluxStencil(const FaceIndex& a_face, const DataIndex& a_dit) const;
1467
1477 void
1478 computeFlux(EBFaceFAB& a_fluxCentroid,
1479 const EBCellFAB& a_phi,
1480 const Box& a_cellBox,
1481 const DataIndex& a_dit,
1482 const int a_dir);
1483
1493 void
1494 computeFaceCenteredFlux(EBFaceFAB& a_fluxCenter,
1495 const EBCellFAB& a_phi,
1496 const Box& a_cellBox,
1497 const DataIndex& a_dit,
1498 const int a_dir);
1499
1509 void
1510 computeFaceCentroidFlux(EBFaceFAB& a_flux,
1511 const EBCellFAB& a_phi,
1512 const Box& a_cellBox,
1513 const DataIndex& a_dit,
1514 const int a_dir);
1515
1521 void
1522 computeFlux(const LevelData<EBCellFAB>& a_phi);
1523
1532 void
1533 reflux(LevelData<EBCellFAB>& a_Lphi,
1534 const LevelData<EBCellFAB>& a_phiFine,
1535 const LevelData<EBCellFAB>& a_phi,
1536 AMRLevelOp<LevelData<EBCellFAB>>& a_finerOp);
1537};
1538
1539#include <CD_NamespaceFooter.H>
1540
1541#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:2513
void relaxGSMultiColor(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Multi-colored gauss-seidel relaxation.
Definition CD_EBHelmholtzOp.cpp:2154
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:175
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:2695
LevelData< EBFluxFAB > & getFlux() const
Returns m_flux. This is used in refluxing routines.
Definition CD_EBHelmholtzOp.cpp:278
Real getChebyEigRatio() const noexcept
Returns m_chebyEigRatio. Used by MFHelmholtzOp to replicate Chebyshev parameters.
Definition CD_EBHelmholtzOp.cpp:300
static constexpr int m_nComp
Number of components that we solve for (always one..)
Definition CD_EBHelmholtzOp.H:987
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:1209
RefCountedPtr< EBCoarAve > m_coarAve
Conservative coarsener.
Definition CD_EBHelmholtzOp.H:1217
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:779
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:592
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:992
void turnOnCFInterp()
Turn on BCs.
Definition CD_EBHelmholtzOp.cpp:222
EBLevelGrid m_eblgCoFi
Coarsened of m_eblg.
Definition CD_EBHelmholtzOp.H:1157
const RefCountedPtr< LevelData< BaseIVFAB< Real > > > & getBcoefIrreg()
Get the Helmholtz B-coefficient on the EB.
Definition CD_EBHelmholtzOp.cpp:203
void AMRProlong(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection) override final
Prolongation onto AMR level.
Definition CD_EBHelmholtzOp.cpp:1254
Smoother m_smoother
Relaxation method.
Definition CD_EBHelmholtzOp.H:1007
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:1364
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:1265
int getRasInnerSweeps() const noexcept
Returns m_rasInnerSweeps. Used by MFHelmholtzOp to replicate the Schwarz block solve.
Definition CD_EBHelmholtzOp.cpp:312
bool m_hasCoar
True if there's a coarser level.
Definition CD_EBHelmholtzOp.H:1037
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:1521
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:1194
void relaxChebyshev(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Chebyshev polynomial smoother.
Definition CD_EBHelmholtzOp.cpp:1925
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:2641
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:1420
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:1290
void allocateFlux() const noexcept
Allocate m_flux.
Definition CD_EBHelmholtzOp.cpp:262
void computeDiagWeight()
Calculate the weight of the diagonal term.
Definition CD_EBHelmholtzOp.cpp:2270
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:791
EBHelmholtzOp()=delete
Disallowed default constructor.
virtual ~EBHelmholtzOp()
Dtor.
Definition CD_EBHelmholtzOp.cpp:208
Copier m_exchangeCopierFine
Pre-built exchange copier.
Definition CD_EBHelmholtzOp.H:1142
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:1788
void turnOffCoarsening()
Turn off coarsening operation.
Definition CD_EBHelmholtzOp.cpp:246
void relaxPointJacobi(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Jacobi relaxation.
Definition CD_EBHelmholtzOp.cpp:1832
int getChebyOrder() const noexcept
Returns m_chebyOrder. Used by MFHelmholtzOp to replicate Chebyshev parameters.
Definition CD_EBHelmholtzOp.cpp:294
RefCountedPtr< EBHelmholtzEBBC > m_ebBc
Domain bc object.
Definition CD_EBHelmholtzOp.H:1202
void makeAggStencil()
Compute aggregated stencils.
Definition CD_EBHelmholtzOp.cpp:2441
void homogeneousCFInterp(LevelData< EBCellFAB > &a_phi)
Do homogeneous coarse-fine interpolation.
Definition CD_EBHelmholtzOp.cpp:1737
EBLevelGrid m_eblg
Grid.
Definition CD_EBHelmholtzOp.H:1152
LayoutData< RefCountedPtr< VCAggStencil > > m_aggRelaxStencil
For making irregular stencil applications go faster.
Definition CD_EBHelmholtzOp.H:1271
EBMGRestrict m_restrictOp
Restriction operator for AMR levels.
Definition CD_EBHelmholtzOp.H:1172
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:1874
Real m_chebyEigRatio
Ratio lambda_max/lambda_min for the Chebyshev eigenvalue window.
Definition CD_EBHelmholtzOp.H:1111
bool m_refluxFree
Use reflux-free formulation or not.
Definition CD_EBHelmholtzOp.H:1017
void computeSpectralRadius()
Estimate the spectral radius of D^{-1}A (Jacobi-preconditioned operator) via the Gershgorin bound.
Definition CD_EBHelmholtzOp.cpp:2392
RefCountedPtr< EBHelmholtzDomainBC > m_domainBc
Domain bc object.
Definition CD_EBHelmholtzOp.H:1197
Real dotProduct(const LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Compute the dot product??
Definition CD_EBHelmholtzOp.cpp:624
RefCountedPtr< EBReflux > m_fluxReg
Flux register.
Definition CD_EBHelmholtzOp.H:1212
void preCond(LevelData< EBCellFAB > &a_corr, const LevelData< EBCellFAB > &a_residual) override final
Precondition system before bottom solve.
Definition CD_EBHelmholtzOp.cpp:581
int m_numSmoothPreCond
Number of smoothings in the preconditioner.
Definition CD_EBHelmholtzOp.H:1052
bool m_doInterpCF
Do coarse-fine interpolation or not.
Definition CD_EBHelmholtzOp.H:1058
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:1163
int m_refToFine
Refinement factor to fine level.
Definition CD_EBHelmholtzOp.H:1047
Smoother
Relaxation method for the operators.
Definition CD_EBHelmholtzOp.H:48
LevelData< EBFluxFAB > * m_flux
For holding fluxes.
Definition CD_EBHelmholtzOp.H:1242
bool m_hasMGObjects
True if there is a multigrid level below this operator.
Definition CD_EBHelmholtzOp.H:1027
Real m_dx
Grid resolution;.
Definition CD_EBHelmholtzOp.H:1095
bool m_profile
Profile the operator.
Definition CD_EBHelmholtzOp.H:1022
void turnOffExchange()
Turn off exchange operation.
Definition CD_EBHelmholtzOp.cpp:230
void relaxGSRedBlack(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_residual, const int a_iterations)
Jacobi relaxation.
Definition CD_EBHelmholtzOp.cpp:1984
LayoutData< BaseIVFAB< Real > > m_alphaDiagWeight
Weights of diagonal alpha terms.
Definition CD_EBHelmholtzOp.H:1276
void fillGrad(const LevelData< EBCellFAB > &a_phi) override final
Not called, I think.
Definition CD_EBHelmholtzOp.cpp:1717
VoFStencil getFaceCenterFluxStencil(const FaceIndex &a_face, const DataIndex &a_dit) const
Get the face-centered flux stencil.
Definition CD_EBHelmholtzOp.cpp:2492
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:907
void divideByIdentityCoef(LevelData< EBCellFAB > &a_rhs) override final
Divide by the a-coefficient.
Definition CD_EBHelmholtzOp.cpp:1691
void assign(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Assign data.
Definition CD_EBHelmholtzOp.cpp:600
RealVect m_probLo
Lower-left corner of domain.
Definition CD_EBHelmholtzOp.H:1132
RefCountedPtr< EBMultigridInterpolator > m_interpolator
Interpolator object.
Definition CD_EBHelmholtzOp.H:1207
void computeRelaxationCoefficient()
Calculate relaxation coefficient.
Definition CD_EBHelmholtzOp.cpp:2328
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:2611
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:1152
EBMGProlong m_prolongOp
Prolongation operator for AMR levels.
Definition CD_EBHelmholtzOp.H:1182
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:979
IntVect m_ghostRhs
Ghost cells for rhs (note, the operator rhs)
Definition CD_EBHelmholtzOp.H:1080
int refToCoarser() override final
Return coarsening factor to coarser level (1 if there is no coarser level);.
Definition CD_EBHelmholtzOp.cpp:932
LayoutData< BaseIFFAB< VoFStencil > > m_centroidFluxStencil[SpaceDim]
Face centroid flux stencil. Defined on all faces connecting one or more irregular vofs.
Definition CD_EBHelmholtzOp.H:1257
EBHelmholtzOp & operator=(const EBHelmholtzOp &a_oper)=delete
No copy assignment allowed.
Interval m_interval
Interval.
Definition CD_EBHelmholtzOp.H:1002
void assignLocal(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override final
Local assignment function.
Definition CD_EBHelmholtzOp.cpp:616
bool m_doExchange
Turn on/off exchange operation.
Definition CD_EBHelmholtzOp.H:1064
EBMGProlong m_prolongOpMG
Prolongation operator for MG levels.
Definition CD_EBHelmholtzOp.H:1187
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:1900
Real norm(const LevelData< EBCellFAB > &a_rhs, const int a_order) override final
Compute norm of data.
Definition CD_EBHelmholtzOp.cpp:820
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:1176
LayoutData< BaseIFFAB< FaceStencil > > m_interpStencil[SpaceDim]
Face centroid interpolation stencil.
Definition CD_EBHelmholtzOp.H:1252
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:568
int m_rasInnerSweeps
Number of inner (frozen-ghost) red-black sweeps per outer restricted-additive-Schwarz iteration.
Definition CD_EBHelmholtzOp.H:1122
EBHelmholtzOp(const EBHelmholtzOp &&a_other)=delete
Disallowed move constructor.
RefCountedPtr< LevelData< EBFluxFAB > > m_Bcoef
B-coefficient in Helmholtz equation.
Definition CD_EBHelmholtzOp.H:1227
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:694
void deallocateFlux() const noexcept
Deallocate m_flux.
Definition CD_EBHelmholtzOp.cpp:270
Timer m_timer
Timer so user can profile.
Definition CD_EBHelmholtzOp.H:997
Location::Cell m_dataLocation
Data centering.
Definition CD_EBHelmholtzOp.H:1012
void createCoarser(LevelData< EBCellFAB > &a_coarse, const LevelData< EBCellFAB > &a_fine, bool a_ghosted) override final
Create coarsened data.
Definition CD_EBHelmholtzOp.cpp:885
EBLevelGrid m_eblgCoar
Coarse level grid (if the operator has a coarse level)
Definition CD_EBHelmholtzOp.H:1162
IntVect m_ghostPhi
Ghost cells for phi.
Definition CD_EBHelmholtzOp.H:1075
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:2592
EBLevelGrid m_eblgFine
Fine level grid (if the operator has a fine level)
Definition CD_EBHelmholtzOp.H:1147
void turnOffCFInterp()
Turn off BCs.
Definition CD_EBHelmholtzOp.cpp:214
Real m_relaxFactor
Successive over-relaxation factor (Must be >= 1).
Definition CD_EBHelmholtzOp.H:1100
int m_refToCoar
Refinement factor to coarse level.
Definition CD_EBHelmholtzOp.H:1042
Real m_alpha
Alpha-coefficient.
Definition CD_EBHelmholtzOp.H:1085
LevelData< EBCellFAB > m_relCoef
Relaxation coefficient.
Definition CD_EBHelmholtzOp.H:1237
LayoutData< VoFIterator > & getVofIterIrreg() const noexcept
Return all-cut VoFIterators (one per patch). Used by MFHelmholtzOp.
Definition CD_EBHelmholtzOp.cpp:318
void applyOpNoBoundary(LevelData< EBCellFAB > &a_Lphi, const LevelData< EBCellFAB > &a_phi) override final
Apply operator but turn off all BCs.
Definition CD_EBHelmholtzOp.cpp:1707
void diagonalScale(LevelData< EBCellFAB > &a_rhs, bool a_kappaWeighted) override final
Do diagonal scaling.
Definition CD_EBHelmholtzOp.cpp:1669
void setToZero(LevelData< EBCellFAB > &a_lhs) override final
Set data to zero.
Definition CD_EBHelmholtzOp.cpp:877
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:553
RefCountedPtr< LevelData< BaseFab< bool > > > m_validCells
Valid grid cells (might be nullptr on MG levels)
Definition CD_EBHelmholtzOp.H:1192
Copier m_exchangeCopier
Pre-built exchange copier.
Definition CD_EBHelmholtzOp.H:1137
void interpolateCF(LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > *a_phiCoar, const bool a_homogeneousCFBC)
Apply coarse-fine boundary conditions.
Definition CD_EBHelmholtzOp.cpp:1761
void coarsenCell(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiFine)
Coarsen data from fine to coar level.
Definition CD_EBHelmholtzOp.cpp:2734
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:2085
LayoutData< BaseIFFAB< Real > > m_interpolant[SpaceDim]
Interpolant for when we want centroid fluxes.
Definition CD_EBHelmholtzOp.H:1247
void turnOnExchange()
Turn on exchange operation.
Definition CD_EBHelmholtzOp.cpp:238
void inhomogeneousCFInterp(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoar)
Inhomogeneous coarse-fine interpolation.
Definition CD_EBHelmholtzOp.cpp:1749
void coarsenFlux(LevelData< EBFluxFAB > &a_flux, const LevelData< EBFluxFAB > &a_fineFlux)
Coarsen fluxes on the fine level onto this level.
Definition CD_EBHelmholtzOp.cpp:2742
bool m_hasFine
True if there's a finer level.
Definition CD_EBHelmholtzOp.H:1032
bool m_doCoarsen
Turn on/off exchange operation.
Definition CD_EBHelmholtzOp.H:1070
Real m_spectralRadius
Spectral radius estimate for the Jacobi-preconditioned operator D^{-1}A.
Definition CD_EBHelmholtzOp.H:1117
void assignCopier(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const Copier &a_copier) override final
Assign lhs.
Definition CD_EBHelmholtzOp.cpp:608
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:799
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:2202
int m_chebyOrder
Number of Chebyshev polynomial steps per smoother invocation.
Definition CD_EBHelmholtzOp.H:1105
std::map< std::pair< int, Side::LoHiSide >, Box > m_sideBox
Domain boxes on each side.
Definition CD_EBHelmholtzOp.H:1311
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:1296
const RefCountedPtr< LevelData< EBCellFAB > > & getAcoef()
Get the Helmholtz A-coefficient on cell centers.
Definition CD_EBHelmholtzOp.cpp:191
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:2034
RealVect m_vecDx
Vector resolution.
Definition CD_EBHelmholtzOp.H:1127
void incr(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const Real a_scale) override final
Increment operator.
Definition CD_EBHelmholtzOp.cpp:771
LayoutData< DomainBndryBoxes > m_domainBndryBoxes
Precomputed domain-boundary boxes for each grid patch.
Definition CD_EBHelmholtzOp.H:1352
LayoutData< VoFIterator > m_vofIterMulti
VoFIterator for "multi-cells".
Definition CD_EBHelmholtzOp.H:1291
LayoutData< BaseIVFAB< Real > > m_betaDiagWeight
Weights of diagonal beta terms.
Definition CD_EBHelmholtzOp.H:1281
EBHelmholtzOp(const EBHelmholtzOp &a_other)=delete
Disallowed copy constructor.
Vector< IntVect > m_colors
"Colors" for the relaxation methods
Definition CD_EBHelmholtzOp.H:1357
const RefCountedPtr< LevelData< EBFluxFAB > > & getBcoef()
Get the Helmholtz B-coefficient on faces.
Definition CD_EBHelmholtzOp.cpp:197
RefCountedPtr< LevelData< EBCellFAB > > m_Acoef
A-coefficient in Helmholtz equation.
Definition CD_EBHelmholtzOp.H:1222
void turnOnCoarsening()
Turn on coarsening operation.
Definition CD_EBHelmholtzOp.cpp:254
LayoutData< VoFIterator > m_vofIterDomLo[SpaceDim]
VoF iterators for lo domain side.
Definition CD_EBHelmholtzOp.H:1301
LayoutData< VoFIterator > m_vofIterIrreg
VoFIterator for irregular cells.
Definition CD_EBHelmholtzOp.H:1286
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:938
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:1226
EBMGRestrict m_restrictOpMG
Restriction operator if this is an MG level.
Definition CD_EBHelmholtzOp.H:1177
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:895
Real getSpectralRadius() const noexcept
Returns m_spectralRadius. Used by MFHelmholtzOp to replicate Chebyshev parameters.
Definition CD_EBHelmholtzOp.cpp:306
Real m_beta
Beta-coefficient.
Definition CD_EBHelmholtzOp.H:1090
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:1585
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:1262
LayoutData< VoFIterator > m_vofIterDomHi[SpaceDim]
VoF iterators for hi domain side.
Definition CD_EBHelmholtzOp.H:1306
void buildCopier(Copier &a_copier, const LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs) override
Build copier.
Definition CD_EBHelmholtzOp.cpp:2750
void defineStencils()
Define stencils.
Definition CD_EBHelmholtzOp.cpp:324
void prolongIncrement(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_correctCoarse) override final
Prolongation method.
Definition CD_EBHelmholtzOp.cpp:924
const LevelData< EBCellFAB > & getRelaxationCoeff() const noexcept
Returns m_relCoef. Used by MFHelmholtzOp.
Definition CD_EBHelmholtzOp.cpp:286
EBLevelGrid m_eblgCoarMG
Coarser grids (multigrid level)
Definition CD_EBHelmholtzOp.H:1167
RefCountedPtr< LevelData< BaseIVFAB< Real > > > m_BcoefIrreg
B-coefficient in Helmholtz equation, but on EB faces.
Definition CD_EBHelmholtzOp.H:1232
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:1321