File HypreABec.H
-
class HypreABec
- #include <HypreABec.H>
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()
-
HypreABec(const HypreABec &a) = delete
-
HypreABec(const HypreABec &&a) = delete
-
inline void setVerbose(int v)
- Parameters:
v –
- inline nodiscard amrex::Real getAlpha () const
- inline nodiscard amrex::Real getBeta () const
-
void aCoefficients(const amrex::MultiFab &a)
- Parameters:
&a –
-
void bCoefficients(const amrex::MultiFab &b, int dir)
- Parameters:
&b –
dir –
-
void SPalpha(const amrex::MultiFab &Spa)
- Parameters:
&Spa –
-
inline const amrex::MultiFab &aCoefficients()
-
inline const amrex::MultiFab &bCoefficients(int dir)
- Parameters:
dir –
-
inline void setBndry(const NGBndry &bd, int _comp = 0)
- Parameters:
bd –
_comp –
-
inline const NGBndry &getBndry()
-
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 inline amrex::Real &fluxFactor()
-
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
-
const amrex::Geometry &geom
-
std::unique_ptr<amrex::MultiFab> acoefs
-
amrex::Real alpha
-
amrex::Real beta
-
amrex::Real reltol
-
amrex::Real abstol
-
std::unique_ptr<amrex::MultiFab> SPa
LO_SANCHEZ_POMRANING alpha.
-
const NGBndry *bdp
-
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
Protected Static Attributes
-
static amrex::Real flux_factor
-
HypreABec(const amrex::BoxArray &grids, const amrex::DistributionMapping &dmap, const amrex::Geometry &geom, int solver_flag = 0)