Class HypreABec
-
class HypreABec
Public Functions
-
HypreABec(const amrex::BoxArray &grids, const amrex::DistributionMapping &dmap, const amrex::Geometry &geom, int solver_flag = 0)
solver_flag = 0 for SMG solver_flag = 1 for PFMG
- Parameters:
grids –
dmap –
geom –
solver_flag –
-
~HypreABec()
-
inline void setVerbose(int v)
- Parameters:
v –
- inline nodiscard amrex::Real getAlpha () const
- inline nodiscard amrex::Real getBeta () const
-
void boundaryFlux(amrex::MultiFab *Flux, amrex::MultiFab &Er, int icomp, BC_Mode inhom)
The argument inhom in the following methods formerly defaulted to 1. For greater type safety (to avoid confusion with icomp) it is now an enum with no default. The argument icomp is always a component number for the independent variable, whether it is called Er, vector, or dest.
- Parameters:
Flux –
Er –
icomp –
inhom –
-
void hacoef(const amrex::Box &bx, amrex::Array4<amrex::GpuArray<amrex::Real, AMREX_SPACEDIM + 1>> const &mat, amrex::Array4<amrex::Real const> const &a, amrex::Real alpha)
-
void hbcoef(const amrex::Box &bx, amrex::Array4<amrex::GpuArray<amrex::Real, AMREX_SPACEDIM + 1>> const &mat, amrex::Array4<amrex::Real const> const &b, amrex::Real beta, const amrex::Real *dx, int idir)
-
void hbmat(const amrex::Box &bx, amrex::Array4<amrex::GpuArray<amrex::Real, AMREX_SPACEDIM + 1>> const &mat, int cdir, int bct, amrex::Real bcl, amrex::Array4<int const> const &mask, amrex::Array4<amrex::Real const> const &b, amrex::Real beta, const amrex::Real *dx)
-
void hbmat3(const amrex::Box &bx, int ori_lo, int idir, amrex::Array4<amrex::GpuArray<amrex::Real, AMREX_SPACEDIM + 1>> const &mat, int cdir, int bctype, amrex::Array4<int const> const &tf, amrex::Real bcl, amrex::Array4<int const> const &mask, amrex::Array4<amrex::Real const> const &b, amrex::Real beta, const amrex::GeometryData &geomdata, amrex::Real c, amrex::Array4<amrex::Real const> const &spa)
-
void setupSolver(amrex::Real _reltol, amrex::Real _abstol, int maxiter)
Three steps separated so that multiple calls to solve can be made
- Parameters:
_reltol –
_abstol –
maxiter –
-
void solve(amrex::MultiFab &dest, int icomp, amrex::MultiFab &rhs, BC_Mode inhom)
- Parameters:
dest –
icomp –
rhs –
inhom –
-
amrex::Real getAbsoluteResidual()
This is the 2-norm of the complete rhs, including b.c. contributions
-
void clearSolver()
Public Static Functions
-
static void getFaceMetric(amrex::Vector<amrex::Real> &r, const amrex::Box ®, const amrex::Orientation &ori, const amrex::Geometry &geom)
- Parameters:
r –
reg –
ori –
geom –
-
static void hbvec(const amrex::Box &bx, amrex::Array4<amrex::Real> const &vec, int cdir, int bct, int bho, amrex::Real bcl, amrex::Array4<amrex::Real const> const &bcval, amrex::Array4<int const> const &mask, amrex::Array4<amrex::Real const> const &b, amrex::Real beta, const amrex::Real *dx)
-
static void hbvec3(const amrex::Box &bx, int ori_lo, int idir, amrex::Array4<amrex::Real> const &vec, int cdir, int bct, amrex::Array4<int const> const &tf, int bho, amrex::Real bcl, amrex::Array4<amrex::Real const> const &bcval, amrex::Array4<int const> const &mask, amrex::Array4<amrex::Real const> const &b, amrex::Real beta, const amrex::GeometryData &geomdata)
Protected Functions
- std::unique_ptr< amrex::MultiFab > bcoefs (\AMREX_SPACEDIM\)
- amrex::Real dx (\AMREX_SPACEDIM\)
Protected Attributes
-
int bdcomp
component number used for bdp
-
int solver_flag
-
int verbose
-
int verbose_threshold
-
int pfmg_relax_type
-
int bho
-
HYPRE_StructGrid hgrid
-
HYPRE_StructMatrix A
-
HYPRE_StructMatrix A0
-
HYPRE_StructVector b
-
HYPRE_StructVector x
-
HYPRE_StructSolver solver
-
HYPRE_StructSolver precond
-
HypreABec(const amrex::BoxArray &grids, const amrex::DistributionMapping &dmap, const amrex::Geometry &geom, int solver_flag = 0)