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>>>;
179 const RealVect& a_probLo,
193 const IntVect& a_ghostPhi,
194 const IntVect& a_ghostRhs,
196 const Real& a_relaxFactor,
197 const int& a_chebyOrder,
198 const Real& a_chebyEigRatio,
199 const int& a_rasInnerSweeps,
200 const int& a_jumpOrder,
201 const int& a_jumpWeight,
202 const int& a_preCondSmooth,
203 const Vector<AmrLevelGrids>& a_mgLevelGrids,
204 const Vector<AmrLevelGrids>& a_mgLevelGridsCoFi,
205 const Vector<AmrCoarseners>& a_mgCoarseners,
207 const ProblemDomain& a_bottomDomain,
208 const bool a_refluxFree);
221 setJump(
const EBAMRIVData& a_sigma,
const Real& a_scale);
228 setJump(
const Real& a_sigma,
const Real& a_scale);
252 MGnewOp(
const ProblemDomain& a_fineDomain,
int a_depth,
bool a_homogeneousOnly =
true) override final;
260 AMRnewOp(const ProblemDomain& a_domain) override final;
269 refToFiner(const ProblemDomain& a_domain) const override final;
524 isCoarser(const ProblemDomain& a_domainOne, const ProblemDomain& B);
533 isFiner(const ProblemDomain& a_domainOne, const ProblemDomain& B);
545#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.
static constexpr int m_comp
Component that this operator solves for.
Definition CD_MFHelmholtzOpFactory.H:275
ProblemDomain m_bottomDomain
Coarsest level where we run multigrid.
Definition CD_MFHelmholtzOpFactory.H:436
Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > AmrMask
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:84
static bool isCoarser(const ProblemDomain &a_domainOne, const ProblemDomain &B)
Check if a domain is coarser than the other.
Definition CD_MFHelmholtzOpFactory.cpp:662
Vector< EBAMRIVData > m_mgJump
Jump coefficient on deeper grids.
Definition CD_MFHelmholtzOpFactory.H:485
EBBCFactory m_ebBcFactory
EB BC factory.
Definition CD_MFHelmholtzOpFactory.H:421
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:474
std::vector< bool > m_hasMgLevels
For checking if an AMR level has multigrid levels.
Definition CD_MFHelmholtzOpFactory.H:456
EBAMRIVData m_amrJump
Jump on multiphase cells.
Definition CD_MFHelmholtzOpFactory.H:431
Vector< MFReflux > AmrFluxRegisters
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:64
AmrFluxData m_amrBcoef
Operator B-coefficient.
Definition CD_MFHelmholtzOpFactory.H:406
AmrFluxRegisters m_amrFluxRegisters
Flux registers.
Definition CD_MFHelmholtzOpFactory.H:381
Real m_chebyEigRatio
Chebyshev eigenvalue ratio lambda_max/lambda_min (only used when m_smoother is Smoother::Chebyshev).
Definition CD_MFHelmholtzOpFactory.H:310
Location::Cell m_dataLocation
Data centering.
Definition CD_MFHelmholtzOpFactory.H:295
MFHelmholtzOp * AMRnewOp(const ProblemDomain &a_domain) override final
Create AMR operator for specified domain.
Definition CD_MFHelmholtzOpFactory.cpp:572
MFHelmholtzOpFactory()=delete
Disallowed constructor.
Vector< RefCountedPtr< LevelData< MFBaseIVFAB > > > AmrIrreData
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:99
int m_numAmrLevels
Number of AMR levels.
Definition CD_MFHelmholtzOpFactory.H:321
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:462
Real m_alpha
Operator alpha.
Definition CD_MFHelmholtzOpFactory.H:341
int m_jumpWeight
Weighting for least squares reconstruction in jump cells.
Definition CD_MFHelmholtzOpFactory.H:451
AmrCoarseners m_amrCoarseners
Data coarseners.
Definition CD_MFHelmholtzOpFactory.H:386
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:356
const EBAMRIVData & getSigma() const
Get the BC jump factor.
Definition CD_MFHelmholtzOpFactory.cpp:180
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:468
Vector< AmrLevelGrids > m_mgLevelGridsCoFi
Coarsened grids between consecutive multigrid levels. m_mgLevelGridsCoFi[lvl][k] is m_mgLevelGrids[lv...
Definition CD_MFHelmholtzOpFactory.H:497
AmrIrreData m_amrBcoefIrreg
Operator B-coefficient.
Definition CD_MFHelmholtzOpFactory.H:411
JumpBCFactory m_jumpBcFactory
Jump BC factory.
Definition CD_MFHelmholtzOpFactory.H:426
AmrLevelGrids m_amrLevelGrids
AMR grids.
Definition CD_MFHelmholtzOpFactory.H:366
int m_rasInnerSweeps
Number of inner frozen-ghost sweeps per restricted-additive-Schwarz iteration (only used when m_smoot...
Definition CD_MFHelmholtzOpFactory.H:316
static constexpr int m_nComp
Number of components that this operator solves for.
Definition CD_MFHelmholtzOpFactory.H:280
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:290
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:331
AmrMask m_validCells
Valid cells.
Definition CD_MFHelmholtzOpFactory.H:371
Real m_relaxFactor
Relaxation factor.
Definition CD_MFHelmholtzOpFactory.H:351
AmrResolutions m_amrResolutions
Grid resolutions.
Definition CD_MFHelmholtzOpFactory.H:396
static constexpr int m_mainPhase
Main phase.
Definition CD_MFHelmholtzOpFactory.H:285
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:119
DomainBCFactory m_domainBcFactory
Domain BC factory.
Definition CD_MFHelmholtzOpFactory.H:416
AmrLevelGrids m_amrLevelGridsCoFi
Coarsened grids between AMR levels. Entry lvl is AMR level lvl+1 coarsened to AMR level lvl.
Definition CD_MFHelmholtzOpFactory.H:441
int findAmrLevel(const ProblemDomain &a_domain) const
Find level corresponding to amr level.
Definition CD_MFHelmholtzOpFactory.cpp:694
MFHelmholtzOp::Smoother Smoother
Smoother type alias.
Definition CD_MFHelmholtzOpFactory.H:119
Vector< Real > AmrResolutions
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:74
Vector< RefCountedPtr< LevelData< MFCellFAB > > > AmrCellData
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:89
int m_chebyOrder
Chebyshev polynomial degree (only used when m_smoother is Smoother::Chebyshev).
Definition CD_MFHelmholtzOpFactory.H:305
Vector< RefCountedPtr< LevelData< MFFluxFAB > > > AmrFluxData
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:94
Smoother m_smoother
Smoother.
Definition CD_MFHelmholtzOpFactory.H:300
RefCountedPtr< MultiFluidIndexSpace > MFIS
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:49
RealVect m_probLo
Lower-left corner of computational domain.
Definition CD_MFHelmholtzOpFactory.H:361
Vector< AmrCoarseners > m_mgCoarseners
Coarse averaging between consecutive multigrid levels. m_mgCoarseners[lvl][k] averages from m_mgLevel...
Definition CD_MFHelmholtzOpFactory.H:491
AmrRefRatios m_amrRefRatios
Refinement ratios.
Definition CD_MFHelmholtzOpFactory.H:391
IntVect m_ghostRhs
Number of ghost cells that are used. Need because of Chombo prolongation objects.
Definition CD_MFHelmholtzOpFactory.H:336
MFHelmholtzOp * MGnewOp(const ProblemDomain &a_fineDomain, int a_depth, bool a_homogeneousOnly=true) override final
Create multigrid operator.
Definition CD_MFHelmholtzOpFactory.cpp:417
void coarsenCoefficientsMG()
Go through all MG levels and coarsen the coefficients from the finer levels.
Definition CD_MFHelmholtzOpFactory.cpp:358
AmrCellData m_amrAcoef
Operator A-coefficient.
Definition CD_MFHelmholtzOpFactory.H:401
void defineMultigridLevels(const Vector< AmrLevelGrids > &a_mgLevelGrids, const Vector< AmrLevelGrids > &a_mgLevelGridsCoFi, const Vector< AmrCoarseners > &a_mgCoarseners)
Define the multigrid levels for this operator factory, and the coefficients on them.
Definition CD_MFHelmholtzOpFactory.cpp:227
AmrInterpolators m_amrInterpolators
Multigrid interpolators.
Definition CD_MFHelmholtzOpFactory.H:376
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:480
Vector< int > AmrRefRatios
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:79
Real m_beta
Operator beta.
Definition CD_MFHelmholtzOpFactory.H:346
static bool isFiner(const ProblemDomain &a_domainOne, const ProblemDomain &B)
Check if a domain is finer than the other.
Definition CD_MFHelmholtzOpFactory.cpp:670
int m_numPreCondSmooth
Number of smoothings in the preconditioner. Passed directly to the operators.
Definition CD_MFHelmholtzOpFactory.H:326
int refToFiner(const ProblemDomain &a_domain) const override final
Get refinement ratio to next finest level.
Definition CD_MFHelmholtzOpFactory.cpp:678
void defineJump()
Define jump data.
Definition CD_MFHelmholtzOpFactory.cpp:188
Vector< MFLevelGrid > AmrLevelGrids
alias type alias.
Definition CD_MFHelmholtzOpFactory.H:54
virtual ~MFHelmholtzOpFactory()
Destructor. Does nothing.
Definition CD_MFHelmholtzOpFactory.cpp:113
int m_jumpOrder
Stencil order in jump cells.
Definition CD_MFHelmholtzOpFactory.H:446
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
Namespace for encapsulating various data centerings.
Definition CD_Location.H:25
Cell
Enum for distinguishing between cell locations.
Definition CD_Location.H:31