13#ifndef CD_MFHELMHOLTZOPFACTORY_H
14#define CD_MFHELMHOLTZOPFACTORY_H
32#include <CD_NamespaceHeader.H>
49 using MFIS = RefCountedPtr<MultiFluidIndexSpace>;
84 using AmrMask = Vector<RefCountedPtr<LevelData<BaseFab<bool>>>>;
89 using AmrCellData = Vector<RefCountedPtr<LevelData<MFCellFAB>>>;
94 using AmrFluxData = Vector<RefCountedPtr<LevelData<MFFluxFAB>>>;
99 using AmrIrreData = Vector<RefCountedPtr<LevelData<MFBaseIVFAB>>>;
173 const RealVect& a_probLo,
187 const IntVect& a_ghostPhi,
188 const IntVect& a_ghostRhs,
190 const Real& a_relaxFactor,
191 const int& a_chebyOrder,
192 const Real& a_chebyEigRatio,
193 const int& a_rasInnerSweeps,
194 const ProblemDomain& a_bottomDomain,
195 const int& a_jumpOrder,
196 const int& a_jumpWeight,
197 const int& a_preCondSmooth,
198 const int& a_blockingFactor,
199 const bool a_refluxFree =
false,
213 setJump(
const EBAMRIVData& a_sigma,
const Real& a_scale);
220 setJump(
const Real& a_sigma,
const Real& a_scale);
244 MGnewOp(
const ProblemDomain& a_fineDomain,
int a_depth,
bool a_homogeneousOnly =
true) override final;
252 AMRnewOp(const ProblemDomain& a_domain) override final;
261 refToFiner(const ProblemDomain& a_domain) const override final;
508 isCoarser(const ProblemDomain& a_domainOne, const ProblemDomain& B);
517 isFiner(const ProblemDomain& a_domainOne, const ProblemDomain& B);
532 const
int a_blockingFactor) const;
548 LevelData<MFFluxFAB>& a_coarBcoef,
550 const LevelData<MFCellFAB>& a_fineAcoef,
551 const LevelData<MFFluxFAB>& a_fineBcoef,
567#include <CD_NamespaceFooter.H>
Class for holding data across EBAMR hierarchies.
Declaration of cell positions.
Declaration of a multiphase BaseIVFAB<Real>
Wrapper class for holding multifluid EBCoarAves.
Declaration of an EB boundary condition factory class for MFHelmholtzOp.
Declaration of a factory class for making MFHelmholtzJumpBC objects for use in a multifluid MFHelmhol...
Declaration of a class for solving multiphase Helmholtz equations.
Declaration of a wrapper for wrapping multifluid EBLevelGrids.
Declaration of a wrapper class for holding multifluid EBMultigridInterpolators.
Declaration of a class for refluxing in a multiphase context.
Class which replaces data at coarse level of refinement with average at fine level of refinement.
Definition CD_EBCoarAve.H:32
Multiphase BaseIVFAB<Real>.
Definition CD_MFBaseIVFAB.H:30
Factory class for making MFHelmholtzOp.
Definition CD_MFHelmholtzOpFactory.H:42
static constexpr int m_comp
Component that this operator solves for.
Definition CD_MFHelmholtzOpFactory.H:267
ProblemDomain m_bottomDomain
Coarsest level where we run multigrid.
Definition CD_MFHelmholtzOpFactory.H:428
static bool isCoarser(const ProblemDomain &a_domainOne, const ProblemDomain &B)
Check if a domain is coarser than the other.
Definition CD_MFHelmholtzOpFactory.cpp:826
Vector< EBAMRIVData > m_mgJump
Jump coefficient on deeper grids.
Definition CD_MFHelmholtzOpFactory.H:482
EBBCFactory m_ebBcFactory
EB BC factory.
Definition CD_MFHelmholtzOpFactory.H:413
Vector< AmrFluxData > m_mgBcoef
B-coefficient on deeper grids. Always weird to write this but e.g. m_mgLevelGrids[0] corresponds to t...
Definition CD_MFHelmholtzOpFactory.H:471
std::vector< bool > m_hasMgLevels
For checking if an AMR level has multigrid levels.
Definition CD_MFHelmholtzOpFactory.H:453
Vector< RefCountedPtr< LevelData< MFFluxFAB > > > AmrFluxData
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:94
EBAMRIVData m_amrJump
Jump on multiphase cells.
Definition CD_MFHelmholtzOpFactory.H:423
Vector< MFReflux > AmrFluxRegisters
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:64
AmrFluxData m_amrBcoef
Operator B-coefficient.
Definition CD_MFHelmholtzOpFactory.H:398
int m_mgBlockingFactor
Blocking factor for grid aggregation.
Definition CD_MFHelmholtzOpFactory.H:433
AmrFluxRegisters m_amrFluxRegisters
Flux registers.
Definition CD_MFHelmholtzOpFactory.H:373
Real m_chebyEigRatio
Chebyshev eigenvalue ratio lambda_max/lambda_min (only used when m_smoother is Smoother::Chebyshev)
Definition CD_MFHelmholtzOpFactory.H:302
Location::Cell m_dataLocation
Data centering.
Definition CD_MFHelmholtzOpFactory.H:287
MFHelmholtzOp * AMRnewOp(const ProblemDomain &a_domain) override final
Create AMR operator for specified domain.
Definition CD_MFHelmholtzOpFactory.cpp:737
MFHelmholtzOpFactory()=delete
Disallowed constructor.
int m_numAmrLevels
Number of AMR levels.
Definition CD_MFHelmholtzOpFactory.H:313
Vector< AmrLevelGrids > m_mgLevelGrids
Deeper grids. Always weird to write this but e.g. m_mgLevelGrids[0] corresponds to the the multigrid ...
Definition CD_MFHelmholtzOpFactory.H:459
Real m_alpha
Operator alpha.
Definition CD_MFHelmholtzOpFactory.H:333
int m_jumpWeight
Weighting for least squares reconstruction in jump cells.
Definition CD_MFHelmholtzOpFactory.H:443
bool getCoarserLayout(MFLevelGrid &a_coarMflg, const MFLevelGrid &a_fineMflg, const int a_refRat, const int a_blockingFactor) const
Construct coarsening of a grid level.
Definition CD_MFHelmholtzOpFactory.cpp:513
Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > AmrMask
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:84
AmrCoarseners m_amrCoarseners
Data coarseners.
Definition CD_MFHelmholtzOpFactory.H:378
RefCountedPtr< MFHelmholtzEBBCFactory > EBBCFactory
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:109
Vector< MFCoarAve > AmrCoarseners
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:69
bool m_refluxFree
Use reflux-free AMR operator.
Definition CD_MFHelmholtzOpFactory.H:348
const EBAMRIVData & getSigma() const
Get the BC jump factor.
Definition CD_MFHelmholtzOpFactory.cpp:197
MFHelmholtzOpFactory(const MFHelmholtzOpFactory &a_otherFactory)=delete
Disallowed constructor.
Vector< AmrCellData > m_mgAcoef
A-coefficient on deeper grids. Always weird to write this but e.g. m_mgLevelGrids[0] corresponds to t...
Definition CD_MFHelmholtzOpFactory.H:465
static void coarsenCoefficients(LevelData< MFCellFAB > &a_coarAcoef, LevelData< MFFluxFAB > &a_coarBcoef, LevelData< MFBaseIVFAB > &a_coarBcoefIrreg, const LevelData< MFCellFAB > &a_fineAcoef, const LevelData< MFFluxFAB > &a_fineBcoef, const LevelData< MFBaseIVFAB > &a_fineBcoefIrreg, const MFLevelGrid &a_mflgCoar, const MFLevelGrid &a_mflgFine, const int a_refRat)
Coarsen coefficients (conservatively)
Definition CD_MFHelmholtzOpFactory.cpp:449
AmrIrreData m_amrBcoefIrreg
Operator B-coefficient.
Definition CD_MFHelmholtzOpFactory.H:403
JumpBCFactory m_jumpBcFactory
Jump BC factory.
Definition CD_MFHelmholtzOpFactory.H:418
AmrLevelGrids m_amrLevelGrids
AMR grids.
Definition CD_MFHelmholtzOpFactory.H:358
int m_rasInnerSweeps
Number of inner frozen-ghost sweeps per restricted-additive-Schwarz iteration (only used when m_smoot...
Definition CD_MFHelmholtzOpFactory.H:308
static constexpr int m_nComp
Number of components that this operator solves for.
Definition CD_MFHelmholtzOpFactory.H:272
Vector< MFMultigridInterpolator > AmrInterpolators
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:59
RefCountedPtr< MFHelmholtzJumpBCFactory > JumpBCFactory
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:114
MFIS m_mfis
Index space.
Definition CD_MFHelmholtzOpFactory.H:282
RefCountedPtr< MFHelmholtzDomainBCFactory > DomainBCFactory
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:104
IntVect m_ghostPhi
Number of ghost cells that are used. Need because of Chombo prolongation objects.
Definition CD_MFHelmholtzOpFactory.H:323
AmrMask m_validCells
Valid cells.
Definition CD_MFHelmholtzOpFactory.H:363
Real m_relaxFactor
Relaxation factor.
Definition CD_MFHelmholtzOpFactory.H:343
AmrResolutions m_amrResolutions
Grid resolutions.
Definition CD_MFHelmholtzOpFactory.H:388
static constexpr int m_mainPhase
Main phase.
Definition CD_MFHelmholtzOpFactory.H:277
void setJump(const EBAMRIVData &a_sigma, const Real &a_scale)
Set jump condition. This is passed to the operators by reference.
Definition CD_MFHelmholtzOpFactory.cpp:117
DomainBCFactory m_domainBcFactory
Domain BC factory.
Definition CD_MFHelmholtzOpFactory.H:408
int findAmrLevel(const ProblemDomain &a_domain) const
Find level corresponding to amr level.
Definition CD_MFHelmholtzOpFactory.cpp:858
Vector< Real > AmrResolutions
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:74
int m_chebyOrder
Chebyshev polynomial degree (only used when m_smoother is Smoother::Chebyshev)
Definition CD_MFHelmholtzOpFactory.H:297
Vector< RefCountedPtr< LevelData< MFCellFAB > > > AmrCellData
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:89
Smoother m_smoother
Smoother.
Definition CD_MFHelmholtzOpFactory.H:292
RefCountedPtr< MultiFluidIndexSpace > MFIS
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:49
RealVect m_probLo
Lower-left corner of computational domain.
Definition CD_MFHelmholtzOpFactory.H:353
AmrRefRatios m_amrRefRatios
Refinement ratios.
Definition CD_MFHelmholtzOpFactory.H:383
AmrLevelGrids m_deeperLevelGrids
Deeper grids.
Definition CD_MFHelmholtzOpFactory.H:448
Vector< RefCountedPtr< LevelData< MFBaseIVFAB > > > AmrIrreData
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:99
Vector< Vector< RefCountedPtr< EBCoarAve > > > m_mgAveOp
Coarsneing operator on deeper grids (used for coarsening jump)
Definition CD_MFHelmholtzOpFactory.H:487
IntVect m_ghostRhs
Number of ghost cells that are used. Need because of Chombo prolongation objects.
Definition CD_MFHelmholtzOpFactory.H:328
MFHelmholtzOp * MGnewOp(const ProblemDomain &a_fineDomain, int a_depth, bool a_homogeneousOnly=true) override final
Create multigrid operator.
Definition CD_MFHelmholtzOpFactory.cpp:586
void coarsenCoefficientsMG()
Go through all MG levels and coarsen the coefficients from the finer levels.
Definition CD_MFHelmholtzOpFactory.cpp:401
AmrCellData m_amrAcoef
Operator A-coefficient.
Definition CD_MFHelmholtzOpFactory.H:393
AmrInterpolators m_amrInterpolators
Multigrid interpolators.
Definition CD_MFHelmholtzOpFactory.H:368
Vector< AmrIrreData > m_mgBcoefIrreg
B-coefficient on deeper grids. Always weird to write this but e.g. m_mgLevelGrids[0] corresponds to t...
Definition CD_MFHelmholtzOpFactory.H:477
Vector< int > AmrRefRatios
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:79
Real m_beta
Operator beta.
Definition CD_MFHelmholtzOpFactory.H:338
void defineMultigridLevels()
Function which defines the multigrid levels for this operator factory.
Definition CD_MFHelmholtzOpFactory.cpp:244
static bool isFiner(const ProblemDomain &a_domainOne, const ProblemDomain &B)
Check if a domain is finer than the other.
Definition CD_MFHelmholtzOpFactory.cpp:834
int m_numPreCondSmooth
Number of smoothings in the preconditioner. Passed directly to the operators.
Definition CD_MFHelmholtzOpFactory.H:318
int refToFiner(const ProblemDomain &a_domain) const override final
Get refinement ratio to next finest level.
Definition CD_MFHelmholtzOpFactory.cpp:842
void defineJump()
Define jump data.
Definition CD_MFHelmholtzOpFactory.cpp:205
Vector< MFLevelGrid > AmrLevelGrids
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:54
virtual ~MFHelmholtzOpFactory()
Destructor. Does nothing.
Definition CD_MFHelmholtzOpFactory.cpp:111
int m_jumpOrder
Stencil order in jump cells.
Definition CD_MFHelmholtzOpFactory.H:438
Operator for solving multifluid Helmholtz on a grid level.
Definition CD_MFHelmholtzOp.H:44
Smoother
Relaxation methods for this operator.
Definition CD_MFHelmholtzOp.H:50
Wrapper class for holding multifluid EBLevelGrids.
Definition CD_MFLevelGrid.H:30
Namespace for encapsulating various data centerings.
Definition CD_Location.H:25
Cell
Enum for distinguishing between cell locations.
Definition CD_Location.H:31