12 #ifndef CD_FieldSolverMultigrid_H
13 #define CD_FieldSolverMultigrid_H
16 #include <AMRMultiGrid.H>
17 #include <BiCGStabSolver.H>
18 #include <MFSimpleSolver.H>
19 #include <GMRESSolver.H>
24 #include <CD_NamespaceHeader.H>
85 const bool a_zeroPhi =
false)
override;
123 const phase::which_phase a_phase,
134 const phase::which_phase a_phase,
143 preRegrid(
const int a_lbase,
const int a_oldFinestLevel)
override;
154 regrid(
const int a_lmin,
const int a_oldFinestLevel,
const int a_newFinestLevel)
override;
185 virtual Vector<long long>
186 computeLoads(
const DisjointBoxLayout& a_dbl,
const int a_level)
override;
403 #include <CD_NamespaceFooter.H>
Contains declaration of a base electrostatics solver class.
Declaration of a factory class for making multifluid Helmholtz operators for multigrid.
Implementation of FieldSolver which uses multigrid.
Definition: CD_FieldSolverMultigrid.H:33
virtual void parseMultigridSettings()
Parse multigrid settings.
Definition: CD_FieldSolverMultigrid.cpp:91
RefCountedPtr< AMRMultiGrid< LevelData< MFCellFAB > > > m_multigridSolver
Geometric multigrid solver.
Definition: CD_FieldSolverMultigrid.H:347
virtual void setupHelmholtzFactory()
Set up the multigrid operator factory.
Definition: CD_FieldSolverMultigrid.cpp:530
virtual void parseJumpBC()
Parse JumpBC type.
Definition: CD_FieldSolverMultigrid.cpp:192
MFSimpleSolver m_mfsolver
multi-fluid simple solver
Definition: CD_FieldSolverMultigrid.H:362
int m_multigridMinIterations
Minimum number of iterations.
Definition: CD_FieldSolverMultigrid.H:290
int m_multigridMaxIterations
Maximum number of iterations.
Definition: CD_FieldSolverMultigrid.H:285
RefCountedPtr< MFHelmholtzOpFactory > m_helmholtzOpFactory
Multigrid operator factory.
Definition: CD_FieldSolverMultigrid.H:342
int m_numSmoothingsForSimpleSolver
Number of smoothing for bottom solver.
Definition: CD_FieldSolverMultigrid.H:295
FieldSolverMultigrid(const FieldSolverMultigrid &a_other)=delete
Disallowed copy constructor.
int m_multigridBottomSmooth
Number of smoothing before bottom solver.
Definition: CD_FieldSolverMultigrid.H:280
virtual void setupSolver() override
Set up multigrid solver.
Definition: CD_FieldSolverMultigrid.cpp:400
virtual ~FieldSolverMultigrid()
Constructor (does nothing)
Definition: CD_FieldSolverMultigrid.cpp:40
int m_multigridJumpOrder
Set bc jump order.
Definition: CD_FieldSolverMultigrid.H:320
virtual void preRegrid(const int a_lbase, const int a_oldFinestLevel) override
Cache state before regridding.
Definition: CD_FieldSolverMultigrid.cpp:347
FieldSolverMultigrid & operator=(const FieldSolverMultigrid &a_other)=delete
Disallowed copy assignment operator.
MFHelmholtzOp::Smoother m_multigridRelaxMethod
Relaxation type for gmg.
Definition: CD_FieldSolverMultigrid.H:230
FieldSolverMultigrid(const FieldSolverMultigrid &&a_other)=delete
Disallowed move constructor.
virtual void setSolverPermittivities(const MFAMRCellData &a_permittivityCell, const MFAMRFluxData &a_permittivityFace, const MFAMRIVData &a_permittivityEB) override
Set new permittivities for the multigrid solver.
Definition: CD_FieldSolverMultigrid.cpp:414
bool m_isSolverSetup
Needs setup.
Definition: CD_FieldSolverMultigrid.H:255
int m_multigridBcWeight
Set bc weight (used for weighted least squares)
Definition: CD_FieldSolverMultigrid.H:315
Real m_multigridExitTolerance
Exit tolerance for multigrid.
Definition: CD_FieldSolverMultigrid.H:331
virtual void setPermittivities() override
Set the permittivities.
Definition: CD_FieldSolverMultigrid.cpp:461
virtual Vector< long long > computeLoads(const DisjointBoxLayout &a_dbl, const int a_level) override
Compute grid loads.
Definition: CD_FieldSolverMultigrid.cpp:764
virtual void registerOperators() override
Registers required operators for AMR for this class.
Definition: CD_FieldSolverMultigrid.cpp:374
int m_multigridSmooth
Number of smoothing for multigrid.
Definition: CD_FieldSolverMultigrid.H:265
virtual void parseRuntimeOptions() override
Parse runtime options from command line or input script.
Definition: CD_FieldSolverMultigrid.cpp:63
BottomSolverType
Enum class for supported bottom solvers in multigrid.
Definition: CD_FieldSolverMultigrid.H:203
JumpBCType m_jumpBcType
JumpBC type.
Definition: CD_FieldSolverMultigrid.H:245
MultigridType m_multigridType
GMG multigrid type.
Definition: CD_FieldSolverMultigrid.H:235
FieldSolverMultigrid()
Weak constructor.
Definition: CD_FieldSolverMultigrid.cpp:31
JumpBCType
Jump BC type.
Definition: CD_FieldSolverMultigrid.H:222
static constexpr Real m_alpha
alpha-coefficient (for Helmholtz operator)
Definition: CD_FieldSolverMultigrid.H:192
MultigridType
Enum for multigrid cycle types.
Definition: CD_FieldSolverMultigrid.H:213
int m_multigridPreSmooth
Number of smoothings before averaging.
Definition: CD_FieldSolverMultigrid.H:270
BiCGStabSolver< LevelData< MFCellFAB > > m_bicgstab
Conjugate gradient solver bottom MG level.
Definition: CD_FieldSolverMultigrid.H:352
int m_multigridJumpWeight
Set bc jump weight (used for weighted least squares)
Definition: CD_FieldSolverMultigrid.H:325
int m_multigridBcOrder
Set bc order.
Definition: CD_FieldSolverMultigrid.H:310
virtual void regrid(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
Regrid method.
Definition: CD_FieldSolverMultigrid.cpp:361
virtual void parseOptions() override
Parse all class options from command-line or input script.
Definition: CD_FieldSolverMultigrid.cpp:46
int m_minCellsBottom
Set bottom drop depth.
Definition: CD_FieldSolverMultigrid.H:300
virtual bool solve(MFAMRCellData &a_potential, const MFAMRCellData &a_rho, const EBAMRIVData &a_sigma, const bool a_zeroPhi=false) override
Solves Poisson equation onto a_phi using a_rho and a_sigma as right-hand sides.
Definition: CD_FieldSolverMultigrid.cpp:218
int m_domainDropOrder
Domain drop order.
Definition: CD_FieldSolverMultigrid.H:305
static constexpr Real m_beta
Beta-coefficient (for Helmholtz operator)
Definition: CD_FieldSolverMultigrid.H:197
bool m_kappaSource
Scale by kappa or not.
Definition: CD_FieldSolverMultigrid.H:250
virtual void parseKappaSource()
Parse m_kappaSource.
Definition: CD_FieldSolverMultigrid.cpp:78
virtual void setupMultigrid()
Set up AMRMultiGrid.
Definition: CD_FieldSolverMultigrid.cpp:664
GMRESSolver< LevelData< MFCellFAB > > m_gmres
GMRES solver.
Definition: CD_FieldSolverMultigrid.H:357
FieldSolverMultigrid & operator=(const FieldSolverMultigrid &&a_other)=delete
Disallowed move assignment operator.
BottomSolverType m_bottomSolverType
Bottom solver type.
Definition: CD_FieldSolverMultigrid.H:240
int m_multigridPostSmooth
Number of smoothings before averaging.
Definition: CD_FieldSolverMultigrid.H:275
int m_multigridVerbosity
Verbosity for geometric multigrid.
Definition: CD_FieldSolverMultigrid.H:260
Real m_multigridExitHang
Exit hang for multigrid.
Definition: CD_FieldSolverMultigrid.H:337
Base class for electrostatic solvers.
Definition: CD_FieldSolver.H:32
virtual void computeElectricField()
Compute the cell-centered electric field.
Definition: CD_FieldSolver.cpp:128
Smoother
Relaxation methods for this operator.
Definition: CD_MFHelmholtzOp.H:49