13#ifndef CD_EBHELMHOLTZOPFACTORY_H
14#define CD_EBHELMHOLTZOPFACTORY_H
18#include <EBLevelGrid.H>
22#include <ConductivityBaseDomainBC.H>
31#include <CD_EBHelmholtzEBBCFactory.H>
32#include <CD_EBHelmholtzDomainBCFactory.H>
33#include <CD_NamespaceHeader.H>
60 using AmrMask = Vector<RefCountedPtr<LevelData<BaseFab<bool>>>>;
80 using AmrCellData = Vector<RefCountedPtr<LevelData<EBCellFAB>>>;
85 using AmrFluxData = Vector<RefCountedPtr<LevelData<EBFluxFAB>>>;
90 using AmrIrreData = Vector<RefCountedPtr<LevelData<BaseIVFAB<Real>>>>;
170 const RealVect& a_probLo,
183 const IntVect& a_ghostPhi,
184 const IntVect& a_ghostRHS,
186 const Real& a_relaxFactor,
187 const int& a_chebyOrder,
188 const Real& a_chebyEigRatio,
189 const int& a_rasInnerSweeps,
190 const Vector<AmrLevelGrids>& a_mgLevelGrids,
191 const Vector<AmrLevelGrids>& a_mgLevelGridsCoFi,
192 const Vector<AmrCoarseners>& a_mgCoarseners,
194 const ProblemDomain& a_bottomDomain,
195 const bool a_refluxFree);
229 MGnewOp(
const ProblemDomain& a_fineDomain,
int a_depth,
bool a_homogeneousOnly =
true) final;
237 AMRnewOp(const ProblemDomain& a_domain) final;
246 refToFiner(const ProblemDomain& a_domain) const final;
457 isCoarser(const ProblemDomain& a_domainOne, const ProblemDomain& B);
466 isFiner(const ProblemDomain& a_domainOne, const ProblemDomain& B);
478#include <CD_NamespaceFooter.H>
Declaration of conservative coarsening utility.
Declaration of Helmholtz multigrid operators.
Parent base class for multigrid interpolation.
Declaration of a class which can reflux over the coarse-fine interface.
Declaration of cell positions.
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_EBHelmholtzOpFactory.H:424
Vector< AmrLevelGrids > m_mgLevelGridsCoFi
Coarsened grids between consecutive multigrid levels. m_mgLevelGridsCoFi[lvl][k] is m_mgLevelGrids[lv...
Definition CD_EBHelmholtzOpFactory.H:436
AmrIrreData m_amrBcoefIrreg
Helmholtz B-coefficient (on EB faces.
Definition CD_EBHelmholtzOpFactory.H:375
AmrCoarseners m_amrCoarseners
Data coarseners.
Definition CD_EBHelmholtzOpFactory.H:350
EBHelmholtzOp * MGnewOp(const ProblemDomain &a_fineDomain, int a_depth, bool a_homogeneousOnly=true) final
Create multigrid operator.
Definition CD_EBHelmholtzOpFactory.cpp:303
AmrResolutions m_amrResolutions
Resolutions one each level.
Definition CD_EBHelmholtzOpFactory.H:360
Vector< RefCountedPtr< EBMultigridInterpolator > > AmrInterpolators
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:65
std::vector< bool > m_hasMgLevels
For checking if an AMR level has multigrid levels.
Definition CD_EBHelmholtzOpFactory.H:400
EBHelmholtzOpFactory()=delete
Disallowed constructor. Use the full constructor.
int refToFiner(const ProblemDomain &a_domain) const final
Get refinement ratio to next finest level.
Definition CD_EBHelmholtzOpFactory.cpp:539
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_EBHelmholtzOpFactory.H:412
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_EBHelmholtzOpFactory.cpp:104
int findAmrLevel(const ProblemDomain &a_domain) const
Find level corresponding to amr level.
Definition CD_EBHelmholtzOpFactory.cpp:562
IntVect m_ghostRhs
Number of ghost cells that are used. Need because of Chombo prolongation objects.
Definition CD_EBHelmholtzOpFactory.H:298
EBBCFactory m_ebBcFactory
EB BC factory.
Definition CD_EBHelmholtzOpFactory.H:385
EBHelmholtzOpFactory(const EBHelmholtzOpFactory &&a_otherFactory)=delete
Disallowed move constructor. Use the full constructor.
AmrFluxRegisters m_amrFluxRegisters
Flux registers.
Definition CD_EBHelmholtzOpFactory.H:345
void operator=(const EBHelmholtzOpFactory &&a_opin)=delete
Disallowed move assignment.
static constexpr int m_comp
Component number that is solved for.
Definition CD_EBHelmholtzOpFactory.H:252
Vector< AmrLevelGrids > m_mgLevelGrids
Deeper grids. Always weird to write this but e.g. m_mgLevelGrids[0] corresponds to the the multigrid ...
Definition CD_EBHelmholtzOpFactory.H:406
bool m_refluxFree
Use reflux-free AMR operator.
Definition CD_EBHelmholtzOpFactory.H:318
static bool isCoarser(const ProblemDomain &a_domainOne, const ProblemDomain &B)
Check if a domain is coarser than the other.
Definition CD_EBHelmholtzOpFactory.cpp:287
EBHelmholtzOp * AMRnewOp(const ProblemDomain &a_domain) final
Create AMR operator for specified domain.
Definition CD_EBHelmholtzOpFactory.cpp:450
Real m_chebyEigRatio
Chebyshev eigenvalue ratio lambda_max/lambda_min (only used when m_smoother is Smoother::Chebyshev).
Definition CD_EBHelmholtzOpFactory.H:277
Vector< RefCountedPtr< LevelData< BaseIVFAB< Real > > > > AmrIrreData
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:90
Vector< RefCountedPtr< EBCoarAve > > AmrCoarseners
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:75
void operator=(const EBHelmholtzOpFactory &a_opin)=delete
Disallowed assignment operator.
ProblemDomain m_bottomDomain
Bottom domain, i.e. the coarsest domain which will be used in multigrid.
Definition CD_EBHelmholtzOpFactory.H:390
Smoother m_smoother
Smoother.
Definition CD_EBHelmholtzOpFactory.H:267
int m_numAmrLevels
Number of AMR levels.
Definition CD_EBHelmholtzOpFactory.H:288
EBHelmholtzOpFactory(const EBHelmholtzOpFactory &a_otherFactory)=delete
Disallowed constructor. Use the full constructor.
Location::Cell m_dataLocation
Data location.
Definition CD_EBHelmholtzOpFactory.H:262
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_EBHelmholtzOpFactory.H:418
IntVect m_ghostPhi
Number of ghost cells that are used. Need because of Chombo prolongation objects.
Definition CD_EBHelmholtzOpFactory.H:293
AmrLevelGrids m_amrLevelGridsCoFi
Coarsened grids between AMR levels. Entry lvl is AMR level lvl+1 coarsened to AMR level lvl.
Definition CD_EBHelmholtzOpFactory.H:395
RefCountedPtr< EBHelmholtzEBBCFactory > EBBCFactory
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:110
static constexpr int m_nComp
Number of components that we solve for.
Definition CD_EBHelmholtzOpFactory.H:257
AmrFluxData m_amrBcoef
Helmholtz B-coefficient.
Definition CD_EBHelmholtzOpFactory.H:370
Vector< RefCountedPtr< LevelData< EBFluxFAB > > > AmrFluxData
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:85
Vector< RefCountedPtr< LevelData< EBCellFAB > > > AmrCellData
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:80
EBHelmholtzOp::Smoother Smoother
Smoother type alias.
Definition CD_EBHelmholtzOpFactory.H:50
~EBHelmholtzOpFactory() override
Destructor. Does nothing.
Definition CD_EBHelmholtzOpFactory.cpp:98
Real m_relaxFactor
Relaxation factor.
Definition CD_EBHelmholtzOpFactory.H:313
Vector< RefCountedPtr< EBLevelGrid > > AmrLevelGrids
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:55
AmrLevelGrids m_amrLevelGrids
AMR grids.
Definition CD_EBHelmholtzOpFactory.H:330
Vector< RefCountedPtr< EBReflux > > AmrFluxRegisters
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:70
AmrMask m_validCells
Valid cells.
Definition CD_EBHelmholtzOpFactory.H:335
AmrCellData m_amrAcoef
Helmholtz A-coefficient.
Definition CD_EBHelmholtzOpFactory.H:365
void coarsenCoefficientsMG()
Go through all MG levels and coarsen the coefficients from the finer levels.
Definition CD_EBHelmholtzOpFactory.cpp:241
Real m_beta
Operator beta.
Definition CD_EBHelmholtzOpFactory.H:308
static bool isFiner(const ProblemDomain &a_domainOne, const ProblemDomain &B)
Check if a domain is finer than the other.
Definition CD_EBHelmholtzOpFactory.cpp:295
DomainBCFactory m_domainBcFactory
Domain BC factory.
Definition CD_EBHelmholtzOpFactory.H:380
AmrRefRatios m_amrRefRatios
Refinement ratios.
Definition CD_EBHelmholtzOpFactory.H:355
int m_rasInnerSweeps
Number of inner frozen-ghost sweeps per restricted-additive-Schwarz iteration (only used when m_smoot...
Definition CD_EBHelmholtzOpFactory.H:283
RealVect m_probLo
Lower-left corner of computational domain.
Definition CD_EBHelmholtzOpFactory.H:323
Vector< AmrCoarseners > m_mgCoarseners
Coarse averaging between consecutive multigrid levels. m_mgCoarseners[lvl][k] averages from m_mgLevel...
Definition CD_EBHelmholtzOpFactory.H:430
Real m_alpha
Operator alpha.
Definition CD_EBHelmholtzOpFactory.H:303
Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > AmrMask
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:60
Vector< Real > AmrResolutions
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:95
RefCountedPtr< EBHelmholtzDomainBCFactory > DomainBCFactory
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:105
Vector< int > AmrRefRatios
alias type alias.
Definition CD_EBHelmholtzOpFactory.H:100
AmrInterpolators m_amrInterpolators
Ghost cell interpolations.
Definition CD_EBHelmholtzOpFactory.H:340
int m_chebyOrder
Chebyshev polynomial degree (only used when m_smoother is Smoother::Chebyshev).
Definition CD_EBHelmholtzOpFactory.H:272
Helmholtz operator for equations like alpha*a(x)*phi(x) + beta*div(b(x)*grad(phi(x))) = rho.
Definition CD_EBHelmholtzOp.H:42
Smoother
Relaxation method for the operators.
Definition CD_EBHelmholtzOp.H:48
Namespace for encapsulating various data centerings.
Definition CD_Location.H:25
Cell
Enum for distinguishing between cell locations.
Definition CD_Location.H:31