Factory class for making variable-coefficient Helmholtz operators.
More...
#include <CD_EBHelmholtzOpFactory.H>
|
using | Smoother = EBHelmholtzOp::Smoother |
|
using | AmrLevelGrids = Vector< RefCountedPtr< EBLevelGrid > > |
|
using | AmrInterpolators = Vector< RefCountedPtr< EBMultigridInterpolator > > |
|
using | AmrFluxRegisters = Vector< RefCountedPtr< EBReflux > > |
|
using | AmrCoarseners = Vector< RefCountedPtr< EBCoarAve > > |
|
using | AmrCellData = Vector< RefCountedPtr< LevelData< EBCellFAB > >> |
|
using | AmrFluxData = Vector< RefCountedPtr< LevelData< EBFluxFAB > >> |
|
using | AmrIrreData = Vector< RefCountedPtr< LevelData< BaseIVFAB< Real > >> > |
|
using | AmrResolutions = Vector< Real > |
|
using | AmrRefRatios = Vector< int > |
|
using | DomainBCFactory = RefCountedPtr< EBHelmholtzDomainBCFactory > |
|
using | EBBCFactory = RefCountedPtr< EBHelmholtzEBBCFactory > |
|
|
| EBHelmholtzOpFactory ()=delete |
| Disallowed constructor. Use the full constructor.
|
|
| EBHelmholtzOpFactory (const EBHelmholtzOpFactory &a_otherFactory)=delete |
| Disallowed constructor. Use the full constructor.
|
|
| EBHelmholtzOpFactory (const EBHelmholtzOpFactory &&a_otherFactory)=delete |
| Disallowed move constructor. Use the full constructor.
|
|
| EBHelmholtzOpFactory (const Location::Cell a_dataLocation, const Real &a_alpha, const Real &a_beta, const RealVect &a_probLo, const AmrLevelGrids &a_amrLevelGrids, const AmrInterpolators &a_amrInterpolators, const AmrFluxRegisters &a_amrFluxRegisters, const AmrCoarseners &a_amrCoarseners, const AmrRefRatios &a_amrRefRatios, const AmrResolutions &a_amrResolutions, const AmrCellData &a_amrAcoef, const AmrFluxData &a_amrBcoef, const AmrIrreData &a_amrBcoefIrreg, const DomainBCFactory &a_domainBcFactory, const EBBCFactory &a_ebbcFactory, const IntVect &a_ghostPhi, const IntVect &a_ghostRHS, const Smoother &a_relaxationMethod, const ProblemDomain &a_bottomDomain, const int &a_mgBlockingFactor, const AmrLevelGrids &a_deeperLevelGrids=AmrLevelGrids()) |
| Full constructor. More...
|
|
| ~EBHelmholtzOpFactory () |
| Destructor. Does nothing.
|
|
void | operator= (const EBHelmholtzOpFactory &a_opin)=delete |
| Disallowed assignment operator.
|
|
void | operator= (const EBHelmholtzOpFactory &&a_opin)=delete |
| Disallowed move assignment.
|
|
void | coarsenCoefficientsMG () |
| Go through all MG levels and coarsen the coefficients from the finer levels.
|
|
EBHelmholtzOp * | MGnewOp (const ProblemDomain &a_fineDomain, int a_depth, bool a_homogeneousOnly=true) override final |
| Create multigrid operator. More...
|
|
EBHelmholtzOp * | AMRnewOp (const ProblemDomain &a_domain) override final |
| Create AMR operator for specified domain. More...
|
|
int | refToFiner (const ProblemDomain &a_indexspace) const override final |
| Get refinement ratio to next finest level. More...
|
|
|
void | defineMultigridLevels () |
| Function which defines the multigrid levels for this operator factory.
|
|
bool | isCoarser (const ProblemDomain &a_domainOne, const ProblemDomain &a_domainTwo) const |
| Check if a domain is coarser than the other. More...
|
|
bool | isFiner (const ProblemDomain &a_domainOne, const ProblemDomain &a_domainTwo) const |
| Check if a domain is finer than the other. More...
|
|
bool | getCoarserLayout (EBLevelGrid &a_coarseGrid, const EBLevelGrid &a_fineGrid, const int a_refRat, const int a_blockingFactor) const |
| Construct coarsening of a grid level. More...
|
|
void | coarsenCoefficients (LevelData< EBCellFAB > &a_coarAcoef, LevelData< EBFluxFAB > &a_coarBcoef, LevelData< BaseIVFAB< Real >> &a_coarBcoefIrreg, const LevelData< EBCellFAB > &a_fineAcoef, const LevelData< EBFluxFAB > &a_fineBcoef, const LevelData< BaseIVFAB< Real >> &a_fineBcoefIrreg, const EBLevelGrid &a_eblgCoar, const EBLevelGrid &a_eblgFine, const int a_refRat) |
| Coarsen coefficients (conservatively) More...
|
|
int | findAmrLevel (const ProblemDomain &a_domain) const |
| Find level corresponding to amr level. More...
|
|
|
Location::Cell | m_dataLocation |
| Data location.
|
|
Smoother | m_smoother |
| Smoother.
|
|
int | m_numAmrLevels |
| Number of AMR levels.
|
|
IntVect | m_ghostPhi |
| Number of ghost cells that are used. Need because of Chombo prolongation objects.
|
|
IntVect | m_ghostRhs |
| Number of ghost cells that are used. Need because of Chombo prolongation objects.
|
|
Real | m_alpha |
| Operator alpha.
|
|
Real | m_beta |
| Operator beta.
|
|
RealVect | m_probLo |
| Lower-left corner of computational domain.
|
|
AmrLevelGrids | m_amrLevelGrids |
| AMR grids.
|
|
AmrInterpolators | m_amrInterpolators |
| Ghost cell interpolations.
|
|
AmrFluxRegisters | m_amrFluxRegisters |
| Flux registers.
|
|
AmrCoarseners | m_amrCoarseners |
| Data coarseners.
|
|
AmrRefRatios | m_amrRefRatios |
| Refinement ratios.
|
|
AmrResolutions | m_amrResolutions |
| Resolutions one each level.
|
|
AmrCellData | m_amrAcoef |
| Helmholtz A-coefficient.
|
|
AmrFluxData | m_amrBcoef |
| Helmholtz B-coefficient.
|
|
AmrIrreData | m_amrBcoefIrreg |
| Helmholtz B-coefficient (on EB faces.
|
|
DomainBCFactory | m_domainBcFactory |
| Domain BC factory.
|
|
EBBCFactory | m_ebBcFactory |
| EB BC factory.
|
|
ProblemDomain | m_bottomDomain |
| Bottom domain, i.e. the coarsest domain which will be used in multigrid.
|
|
int | m_mgBlockingFactor |
| Blocking factor for when we create intermediate and deep multigrid levels.
|
|
AmrLevelGrids | m_deeperLevelGrids |
| This is for using pre-defined grids for the deeper multigrid levels, i.e. for the levels that are coarsenings of m_amrLevelGrids[0].
|
|
std::vector< bool > | m_hasMgLevels |
| For checking if an AMR level has multigrid levels.
|
|
Vector< AmrLevelGrids > | m_mgLevelGrids |
| Deeper grids. Always weird to write this but e.g. m_mgLevelGrids[0] corresponds to the the multigrid levels below amr level 0.
|
|
Vector< AmrCellData > | m_mgAcoef |
| A-coefficient on deeper grids. Always weird to write this but e.g. m_mgLevelGrids[0] corresponds to the the multigrid levels below amr level 0.
|
|
Vector< AmrFluxData > | m_mgBcoef |
| B-coefficient on deeper grids. Always weird to write this but e.g. m_mgLevelGrids[0] corresponds to the the multigrid levels below amr level 0.
|
|
Vector< AmrIrreData > | m_mgBcoefIrreg |
| B-coefficient on deeper grids. Always weird to write this but e.g. m_mgLevelGrids[0] corresponds to the the multigrid levels below amr level 0.
|
|
|
static constexpr int | m_comp = 0 |
| Component number that is solved for.
|
|
static constexpr int | m_nComp = 1 |
| Number of components that we solve for.
|
|
Factory class for making variable-coefficient Helmholtz operators.
- Note
- This factory is designed for making EBHelmholtzOps which have time-independent coefficients. If you need new coefficients you better set up multigrid again.
-
This factory is designed without time-dependence in BCs. Time-dependent BCs are still doable by letting the boundary condition classes carry a reference to an externally updated time.
◆ EBHelmholtzOpFactory()
EBHelmholtzOpFactory::EBHelmholtzOpFactory |
( |
const Location::Cell |
a_dataLocation, |
|
|
const Real & |
a_alpha, |
|
|
const Real & |
a_beta, |
|
|
const RealVect & |
a_probLo, |
|
|
const AmrLevelGrids & |
a_amrLevelGrids, |
|
|
const AmrInterpolators & |
a_amrInterpolators, |
|
|
const AmrFluxRegisters & |
a_amrFluxRegisters, |
|
|
const AmrCoarseners & |
a_amrCoarseners, |
|
|
const AmrRefRatios & |
a_amrRefRatios, |
|
|
const AmrResolutions & |
a_amrResolutions, |
|
|
const AmrCellData & |
a_amrAcoef, |
|
|
const AmrFluxData & |
a_amrBcoef, |
|
|
const AmrIrreData & |
a_amrBcoefIrreg, |
|
|
const DomainBCFactory & |
a_domainBcFactory, |
|
|
const EBBCFactory & |
a_ebbcFactory, |
|
|
const IntVect & |
a_ghostPhi, |
|
|
const IntVect & |
a_ghostRHS, |
|
|
const Smoother & |
a_relaxationMethod, |
|
|
const ProblemDomain & |
a_bottomDomain, |
|
|
const int & |
a_mgBlockingFactor, |
|
|
const AmrLevelGrids & |
a_deeperLevelGrids = AmrLevelGrids() |
|
) |
| |
Full constructor.
- Parameters
-
[in] | a_dataLocation | Assumed data centering |
[in] | a_alpha | alpha-coefficient in Helmholtz operator. |
[in] | a_beta | beta-coefficient in Helmholtz operator. |
[in] | a_probLo | Lower-left corner of domain |
[in] | a_amrInterpolators | Interpolator objects between AMR levels. |
[in] | a_amrCoarseners | Conservative coarseners between AMR levels. |
[in] | a_amrFluxRegisters | Flux registers between AMR levels. |
[in] | a_amrResolutions | Grid resolutions for AMR levels. |
[in] | a_amrAcoef | A-coefficient in Helmholtz operator. |
[in] | a_amrBcoef | B-coefficient in Helmholtz operator. |
[in] | a_amrBcoefIrreg | B-coefficient in Helmholtz operator. This one is defined on EB faces. |
[in] | a_domainBCFactory | Factory class for making domain BC objects. |
[in] | a_ebbcFactory | Factory class for making BC objects for EB boundary conditions. |
[in] | a_ghostPhi | Number of ghost cells in solution vector. |
[in] | a_ghostRhs | Number of ghost cells in right-hand side. |
[in] | a_relaxationMethod | Relaxation method. |
[in] | a_bottomDomain | Coarsest domain on which we run multigrid. Must be a coarsening of the AMR problem domains. |
[in] | a_deeperLevelGrids | Optional object in case you want to pre-define the deeper multigrid levels. |
- Note
- a_deeperLevelGrids exists because the default behavior in this factory is to use direct coarsening for deeper AMR levels. However, this can prevent reaching "deep enough" into the multigrid hierarchy if you use small boxes (e.g. 16^3). So, a_deeperLevelGrids provide an option for using aggregation. The first entry a_deeperLevelGrids[0] should be a a factor 2 coarsening of the coarsest AMR level.
-
This operator is for time-independent a- and b-coefficients.
◆ AMRnewOp()
EBHelmholtzOp * EBHelmholtzOpFactory::AMRnewOp |
( |
const ProblemDomain & |
a_domain | ) |
|
|
finaloverride |
Create AMR operator for specified domain.
- Parameters
-
◆ coarsenCoefficients()
void EBHelmholtzOpFactory::coarsenCoefficients |
( |
LevelData< EBCellFAB > & |
a_coarAcoef, |
|
|
LevelData< EBFluxFAB > & |
a_coarBcoef, |
|
|
LevelData< BaseIVFAB< Real >> & |
a_coarBcoefIrreg, |
|
|
const LevelData< EBCellFAB > & |
a_fineAcoef, |
|
|
const LevelData< EBFluxFAB > & |
a_fineBcoef, |
|
|
const LevelData< BaseIVFAB< Real >> & |
a_fineBcoefIrreg, |
|
|
const EBLevelGrid & |
a_eblgCoar, |
|
|
const EBLevelGrid & |
a_eblgFine, |
|
|
const int |
a_refRat |
|
) |
| |
|
protected |
Coarsen coefficients (conservatively)
- Parameters
-
[out] | a_coarAcoef | Coarse A-coefficient |
[out] | a_coarBcoef | Coarse B-coefficient |
[out] | a_coarBcoefIrreg | Coarse B-coefficient on EB faces |
[in] | a_fineAcoef | Fine A-coefficient |
[in] | a_fineBcoef | Fine B-coefficient |
[in] | a_fineBcoefIrreg | Fine B-coefficient on EB faces |
[in] | a_eblgCoar | Coarse grids |
[in] | a_eblgFine | Fine grids |
[in] | a_refRat | Coarsening factor |
◆ findAmrLevel()
int EBHelmholtzOpFactory::findAmrLevel |
( |
const ProblemDomain & |
a_domain | ) |
const |
|
protected |
Find level corresponding to amr level.
- Parameters
-
[in] | a_domain | Problem domain. |
- Returns
- Depth in m_amrLevelGrids corresponding to a_domain.
- Note
- Run-time error if no level was found.
◆ getCoarserLayout()
bool EBHelmholtzOpFactory::getCoarserLayout |
( |
EBLevelGrid & |
a_coarseGrid, |
|
|
const EBLevelGrid & |
a_fineGrid, |
|
|
const int |
a_refRat, |
|
|
const int |
a_blockingFactor |
|
) |
| const |
|
protected |
Construct coarsening of a grid level.
- Parameters
-
[out] | a_coarseGrid | The coarse grid layout. Must be a pointer to an undefined EBLevelGrid on input |
[in] | a_fineGrid | The coarse grid layout. Must be a pointer to an undefined EBLevelGrid on input |
[in] | a_refRat | Refinement ratio |
[in] | a_blockingFactor | Blocking factor to use for grid aggregation |
- Returns
- This will return a multigrid level (i.e. one that is completely overlapping) the fine level. If we can, we coarsen directly.
◆ isCoarser()
bool EBHelmholtzOpFactory::isCoarser |
( |
const ProblemDomain & |
a_domainOne, |
|
|
const ProblemDomain & |
a_domainTwo |
|
) |
| const |
|
protected |
Check if a domain is coarser than the other.
- Parameters
-
[in] | a_domainOne | The first domain |
[in] | a_domainTwo | The second domain |
- Returns
- Returns true of a_domainOne has fewer grid points than a_domainTwo
◆ isFiner()
bool EBHelmholtzOpFactory::isFiner |
( |
const ProblemDomain & |
a_domainOne, |
|
|
const ProblemDomain & |
a_domainTwo |
|
) |
| const |
|
protected |
Check if a domain is finer than the other.
- Parameters
-
[in] | a_domainOne | The first domain |
[in] | a_domainTwo | The second domain |
- Returns
- Returns true of a_domainOne has more grid points than a_domainTwo
◆ MGnewOp()
EBHelmholtzOp * EBHelmholtzOpFactory::MGnewOp |
( |
const ProblemDomain & |
a_fineDomain, |
|
|
int |
a_depth, |
|
|
bool |
a_homogeneousOnly = true |
|
) |
| |
|
finaloverride |
Create multigrid operator.
- Parameters
-
[in] | a_fineDomain | Domain |
[in] | a_depth | Depth. This specifies that the operator will be created at depth coarsen(a_fineDomain, 2^a_depth); |
[in] | a_homogeneousOnly | If true, only homogeneous boundary conditions will be needed. |
◆ refToFiner()
int EBHelmholtzOpFactory::refToFiner |
( |
const ProblemDomain & |
a_indexspace | ) |
const |
|
finaloverride |
Get refinement ratio to next finest level.
- Note
- Returns -1 when there are no finer levels.
The documentation for this class was generated from the following files: