Factory class for making MFHelmholtzOp.
More...
#include <CD_MFHelmholtzOpFactory.H>
|
|
using | MFIS = RefCountedPtr<MultiFluidIndexSpace> |
| | alias type alias.
|
|
using | AmrLevelGrids = Vector<MFLevelGrid> |
| | alias type alias.
|
|
using | AmrInterpolators = Vector<MFMultigridInterpolator> |
| | alias type alias.
|
|
using | AmrFluxRegisters = Vector<MFReflux> |
| | alias type alias.
|
|
using | AmrCoarseners = Vector<MFCoarAve> |
| | alias type alias.
|
|
using | AmrResolutions = Vector<Real> |
| | alias type alias.
|
|
using | AmrRefRatios = Vector<int> |
| | alias type alias.
|
|
using | AmrMask = Vector<RefCountedPtr<LevelData<BaseFab<bool>>>> |
| | alias type alias.
|
|
using | AmrCellData = Vector<RefCountedPtr<LevelData<MFCellFAB>>> |
| | alias type alias.
|
|
using | AmrFluxData = Vector<RefCountedPtr<LevelData<MFFluxFAB>>> |
| | alias type alias.
|
|
using | AmrIrreData = Vector<RefCountedPtr<LevelData<MFBaseIVFAB>>> |
| | alias type alias.
|
|
using | DomainBCFactory = RefCountedPtr<MFHelmholtzDomainBCFactory> |
| | alias type alias.
|
|
using | EBBCFactory = RefCountedPtr<MFHelmholtzEBBCFactory> |
| | alias type alias.
|
|
using | JumpBCFactory = RefCountedPtr<MFHelmholtzJumpBCFactory> |
| | alias type alias.
|
|
using | Smoother = MFHelmholtzOp::Smoother |
| | Smoother type alias.
|
|
|
| MFHelmholtzOpFactory ()=delete |
| | Disallowed constructor.
|
|
| MFHelmholtzOpFactory (const MFHelmholtzOpFactory &a_otherFactory)=delete |
| | Disallowed constructor.
|
| | MFHelmholtzOpFactory (const MFIS &a_mfis, const Location::Cell a_dataLocation, const Real &a_alpha, const Real &a_beta, const RealVect &a_probLo, const AmrLevelGrids &a_amrLevelGrids, const AmrMask &a_validCells, 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 JumpBCFactory &a_jumpBcFactory, const IntVect &a_ghostPhi, const IntVect &a_ghostRhs, const Smoother &a_smoother, const Real &a_relaxFactor, const int &a_chebyOrder, const Real &a_chebyEigRatio, const int &a_rasInnerSweeps, const int &a_jumpOrder, const int &a_jumpWeight, const int &a_preCondSmooth, const Vector< AmrLevelGrids > &a_mgLevelGrids, const Vector< AmrLevelGrids > &a_mgLevelGridsCoFi, const Vector< AmrCoarseners > &a_mgCoarseners, const AmrLevelGrids &a_amrLevelGridsCoFi, const ProblemDomain &a_bottomDomain, const bool a_refluxFree) |
| | Full constructor.
|
|
virtual | ~MFHelmholtzOpFactory () |
| | Destructor. Does nothing.
|
| void | setJump (const EBAMRIVData &a_sigma, const Real &a_scale) |
| | Set jump condition. This is passed to the operators by reference.
|
| void | setJump (const Real &a_sigma, const Real &a_scale) |
| const EBAMRIVData & | getSigma () const |
| | Get the BC jump factor.
|
|
void | coarsenCoefficientsMG () |
| | Go through all MG levels and coarsen the coefficients from the finer levels.
|
| MFHelmholtzOp * | MGnewOp (const ProblemDomain &a_fineDomain, int a_depth, bool a_homogeneousOnly=true) override final |
| | Create multigrid operator.
|
| MFHelmholtzOp * | AMRnewOp (const ProblemDomain &a_domain) override final |
| | Create AMR operator for specified domain.
|
| int | refToFiner (const ProblemDomain &a_domain) const override final |
| | Get refinement ratio to next finest level.
|
|
| 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.
|
|
void | defineJump () |
| | Define jump data.
|
| int | findAmrLevel (const ProblemDomain &a_domain) const |
| | Find level corresponding to amr level.
|
|
| static bool | isCoarser (const ProblemDomain &a_domainOne, const ProblemDomain &B) |
| | Check if a domain is coarser than the other.
|
| static bool | isFiner (const ProblemDomain &a_domainOne, const ProblemDomain &B) |
| | Check if a domain is finer than the other.
|
|
|
MFIS | m_mfis |
| | Index space.
|
|
Location::Cell | m_dataLocation |
| | Data centering.
|
|
Smoother | m_smoother |
| | Smoother.
|
|
int | m_chebyOrder |
| | Chebyshev polynomial degree (only used when m_smoother is Smoother::Chebyshev).
|
|
Real | m_chebyEigRatio |
| | Chebyshev eigenvalue ratio lambda_max/lambda_min (only used when m_smoother is Smoother::Chebyshev).
|
|
int | m_rasInnerSweeps |
| | Number of inner frozen-ghost sweeps per restricted-additive-Schwarz iteration (only used when m_smoother is Smoother::RestrictedAdditiveSchwarz).
|
|
int | m_numAmrLevels |
| | Number of AMR levels.
|
|
int | m_numPreCondSmooth |
| | Number of smoothings in the preconditioner. Passed directly to the operators.
|
|
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.
|
|
Real | m_relaxFactor |
| | Relaxation factor.
|
|
bool | m_refluxFree |
| | Use reflux-free AMR operator.
|
|
RealVect | m_probLo |
| | Lower-left corner of computational domain.
|
|
AmrLevelGrids | m_amrLevelGrids |
| | AMR grids.
|
|
AmrMask | m_validCells |
| | Valid cells.
|
|
AmrInterpolators | m_amrInterpolators |
| | Multigrid interpolators.
|
|
AmrFluxRegisters | m_amrFluxRegisters |
| | Flux registers.
|
|
AmrCoarseners | m_amrCoarseners |
| | Data coarseners.
|
|
AmrRefRatios | m_amrRefRatios |
| | Refinement ratios.
|
|
AmrResolutions | m_amrResolutions |
| | Grid resolutions.
|
|
AmrCellData | m_amrAcoef |
| | Operator A-coefficient.
|
|
AmrFluxData | m_amrBcoef |
| | Operator B-coefficient.
|
|
AmrIrreData | m_amrBcoefIrreg |
| | Operator B-coefficient.
|
|
DomainBCFactory | m_domainBcFactory |
| | Domain BC factory.
|
|
EBBCFactory | m_ebBcFactory |
| | EB BC factory.
|
|
JumpBCFactory | m_jumpBcFactory |
| | Jump BC factory.
|
|
EBAMRIVData | m_amrJump |
| | Jump on multiphase cells.
|
|
ProblemDomain | m_bottomDomain |
| | Coarsest level where we run multigrid.
|
|
AmrLevelGrids | m_amrLevelGridsCoFi |
| | Coarsened grids between AMR levels. Entry lvl is AMR level lvl+1 coarsened to AMR level lvl.
|
|
int | m_jumpOrder |
| | Stencil order in jump cells.
|
|
int | m_jumpWeight |
| | Weighting for least squares reconstruction in jump cells.
|
|
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.
|
|
Vector< EBAMRIVData > | m_mgJump |
| | Jump coefficient on deeper grids.
|
|
Vector< AmrCoarseners > | m_mgCoarseners |
| | Coarse averaging between consecutive multigrid levels. m_mgCoarseners[lvl][k] averages from m_mgLevelGrids[lvl][k] onto m_mgLevelGrids[lvl][k+1].
|
|
Vector< AmrLevelGrids > | m_mgLevelGridsCoFi |
| | Coarsened grids between consecutive multigrid levels. m_mgLevelGridsCoFi[lvl][k] is m_mgLevelGrids[lvl][k] coarsened by 2.
|
|
|
static constexpr int | m_comp = 0 |
| | Component that this operator solves for.
|
|
static constexpr int | m_nComp = 1 |
| | Number of components that this operator solves for.
|
|
static constexpr int | m_mainPhase = 0 |
| | Main phase.
|
Factory class for making MFHelmholtzOp.
- Note
- This factory is designed for coupling EBHelmholtzOps across EBIS levels
-
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. If you need new coefficients you will have to set up multigrid again.
◆ MFHelmholtzOpFactory()
| MFHelmholtzOpFactory::MFHelmholtzOpFactory |
( |
const MFIS & | a_mfis, |
|
|
const Location::Cell | a_dataLocation, |
|
|
const Real & | a_alpha, |
|
|
const Real & | a_beta, |
|
|
const RealVect & | a_probLo, |
|
|
const AmrLevelGrids & | a_amrLevelGrids, |
|
|
const AmrMask & | a_validCells, |
|
|
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 JumpBCFactory & | a_jumpBcFactory, |
|
|
const IntVect & | a_ghostPhi, |
|
|
const IntVect & | a_ghostRhs, |
|
|
const Smoother & | a_smoother, |
|
|
const Real & | a_relaxFactor, |
|
|
const int & | a_chebyOrder, |
|
|
const Real & | a_chebyEigRatio, |
|
|
const int & | a_rasInnerSweeps, |
|
|
const int & | a_jumpOrder, |
|
|
const int & | a_jumpWeight, |
|
|
const int & | a_preCondSmooth, |
|
|
const Vector< AmrLevelGrids > & | a_mgLevelGrids, |
|
|
const Vector< AmrLevelGrids > & | a_mgLevelGridsCoFi, |
|
|
const Vector< AmrCoarseners > & | a_mgCoarseners, |
|
|
const AmrLevelGrids & | a_amrLevelGridsCoFi, |
|
|
const ProblemDomain & | a_bottomDomain, |
|
|
const bool | a_refluxFree ) |
Full constructor.
- Parameters
-
| [in] | a_mfis | Multi-fluid index space |
| [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_validCells | Valid grid cells |
| [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_ghostPhi | Number of ghost cells in solution vector. |
| [in] | a_ghostRhs | Number of ghost cells in right-hand side. |
| [in] | a_jumpOrder | Stencil order in multiphase cells |
| [in] | a_jumpWeight | Equation weighting in multiphase cells |
| [in] | a_preCondSmooth | Number of smoothings in the preconditioner |
| [in] | a_relaxFactor | Relaxation factor |
| [in] | a_mgLevelGrids | Multigrid levels under each AMR level, as built by the realm (see Realm::getMultigridMFLevelGrids). The factory uses the entries that are not coarser than a_bottomDomain. |
| [in] | a_mgLevelGridsCoFi | Coarsened grids between consecutive multigrid levels, as built by the realm (see Realm::getMultigridMFLevelGridsCoFi). |
| [in] | a_mgCoarseners | Coarse averaging between consecutive multigrid levels, as built by the realm (see Realm::getMultigridCoarseAverage). |
| [in] | a_amrLevelGridsCoFi | Coarsened grids between AMR levels. Entry lvl is AMR level lvl+1 coarsened to AMR level lvl (see Realm::getMFLevelGridCoFi). |
| [in] | a_bottomDomain | Coarsest domain on which we run multigrid. Must be a coarsening of the AMR problem domains. |
| [in] | a_refluxFree | If true, use the reflux-free AMR operator (skips coarse-fine flux refluxing) |
| [in] | a_amrLevelGrids | Amr level grids |
| [in] | a_amrRefRatios | Amr ref ratios |
| [in] | a_domainBcFactory | Domain bc factory |
| [in] | a_ebBcFactory | Eb bc factory |
| [in] | a_jumpBcFactory | Jump bc factory |
| [in] | a_smoother | Smoother |
| [in] | a_chebyOrder | Chebyshev polynomial degree (only used when a_smoother is Smoother::Chebyshev) |
| [in] | a_chebyEigRatio | Chebyshev eigenvalue ratio lambda_max/lambda_min (only used when a_smoother is Smoother::Chebyshev) |
| [in] | a_rasInnerSweeps | Number of inner frozen-ghost sweeps per restricted-additive-Schwarz iteration (only used when a_smoother is Smoother::RestrictedAdditiveSchwarz) |
◆ AMRnewOp()
| MFHelmholtzOp * MFHelmholtzOpFactory::AMRnewOp |
( |
const ProblemDomain & | a_domain | ) |
|
|
finaloverride |
Create AMR operator for specified domain.
- Parameters
-
- Returns
- Return value
◆ defineMultigridLevels()
| void MFHelmholtzOpFactory::defineMultigridLevels |
( |
const Vector< AmrLevelGrids > & | a_mgLevelGrids, |
|
|
const Vector< AmrLevelGrids > & | a_mgLevelGridsCoFi, |
|
|
const Vector< AmrCoarseners > & | a_mgCoarseners ) |
|
protected |
Define the multigrid levels for this operator factory, and the coefficients on them.
Takes the entries of the realm's multigrid levels that are not coarser than the bottom domain.
- Parameters
-
| [in] | a_mgLevelGrids | Multigrid levels under each AMR level, as built by the realm. |
| [in] | a_mgLevelGridsCoFi | Coarsened grids between consecutive multigrid levels, as built by the realm. |
| [in] | a_mgCoarseners | Coarse averaging between consecutive multigrid levels, as built by the realm. |
◆ findAmrLevel()
| int MFHelmholtzOpFactory::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.
◆ getSigma()
| const EBAMRIVData & MFHelmholtzOpFactory::getSigma |
( |
| ) |
const |
Get the BC jump factor.
- Returns
- Sigma
◆ isCoarser()
| bool MFHelmholtzOpFactory::isCoarser |
( |
const ProblemDomain & | a_domainOne, |
|
|
const ProblemDomain & | B ) |
|
staticprotected |
Check if a domain is coarser than the other.
- Parameters
-
| [in] | a_domainOne | The first domain |
| [in] | B | The second domain |
- Returns
- Returns true of a_domainOne has fewer grid points than B
◆ isFiner()
| bool MFHelmholtzOpFactory::isFiner |
( |
const ProblemDomain & | a_domainOne, |
|
|
const ProblemDomain & | B ) |
|
staticprotected |
Check if a domain is finer than the other.
- Parameters
-
| [in] | a_domainOne | The first domain |
| [in] | B | The second domain |
- Returns
- Returns true of a_domainOne has more grid points than B
◆ MGnewOp()
| MFHelmholtzOp * MFHelmholtzOpFactory::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. |
- Returns
- Return value
◆ refToFiner()
| int MFHelmholtzOpFactory::refToFiner |
( |
const ProblemDomain & | a_domain | ) |
const |
|
finaloverride |
Get refinement ratio to next finest level.
- Note
- Returns -1 when there are no finer levels.
- Returns
- Return value
- Parameters
-
◆ setJump() [1/2]
| void MFHelmholtzOpFactory::setJump |
( |
const EBAMRIVData & | a_sigma, |
|
|
const Real & | a_scale ) |
Set jump condition. This is passed to the operators by reference.
- Parameters
-
| [in] | a_sigma | Jump (must be defined on gas phase) |
| [in] | a_scale | Scaling factor |
◆ setJump() [2/2]
| void MFHelmholtzOpFactory::setJump |
( |
const Real & | a_sigma, |
|
|
const Real & | a_scale ) |
- Parameters
-
| [in] | a_sigma | Jump |
| [in] | a_scale | Scaling factor |
The documentation for this class was generated from the following files: