1#ifndef AMREX_HYPRE_ML_NODELAP_H_
2#define AMREX_HYPRE_ML_NODELAP_H_
3#include <AMReX_Config.H>
81 std::string a_prefix =
"hypre_mlnodelap",
105 Real a_reltol,
Real a_abstol,
int a_maxiter);
125 void numberUnknowns ();
128 void dumpSystem (
int k,
bool solution);
130 void fail (std::string
const& msg)
const;
133 [[nodiscard]]
int neumannScale (
int lev,
IntVect const& iv)
const;
135 [[nodiscard]]
bool onDirichletFace (
int lev,
IntVect const& iv)
const;
140 std::string m_prefix;
162 bool m_eb_scaling =
true;
163 bool m_has_dirichlet =
false;
164 bool m_throw_exception =
false;
167 struct DirichletCoupling {
Long row;
Real coef;
int lev;
int li;
IntVect node; };
168 Vector<DirichletCoupling> m_dbc;
170 Vector<Long> m_rank_offset;
176 enum class Backend { hypre, algmg };
177 Backend m_backend = Backend::hypre;
181 std::string m_dump_prefix;
182 Long m_dump_gather_max = 50000000;
185 composite::OwnedCSR m_csr;
186 std::unique_ptr<SpMatrix<Real>> m_spA;
187 std::unique_ptr<AlgMG<Real>> m_algmg;
193 std::unique_ptr<HypreIJIface> m_ij;
194 HYPRE_IJMatrix m_A =
nullptr;
195 HYPRE_IJVector m_b =
nullptr;
196 HYPRE_IJVector m_x =
nullptr;
199 Real m_final_res = 0.0;
A FortranArrayBox(FAB)-like object.
Definition AMReX_BaseFab.H:222
An Array of FortranArrayBox(FAB)-like Objects.
Definition AMReX_FabArray.H:356
Abstract factory interface for creating, aliasing, and destroying FAB objects.
Definition AMReX_FabFactory.H:73
HypreMLNodeLap & operator=(HypreMLNodeLap const &)=delete
Real getFinalResidualNorm() const
Definition AMReX_HypreMLNodeLap.H:113
HypreMLNodeLap(MLNodeLaplacian const &a_linop, std::string a_prefix="hypre_mlnodelap", int a_verbose=0)
Assemble the composite matrix from a prepared linear operator.
Definition AMReX_HypreMLNodeLap.cpp:240
HypreMLNodeLap(HypreMLNodeLap const &)=delete
void setThrowException(bool t) noexcept
Definition AMReX_HypreMLNodeLap.H:109
int getNumIters() const
Iterations and final relative residual of the last solve.
Definition AMReX_HypreMLNodeLap.H:112
void buildMatrix()
Internal: called by the constructor (public only for CUDA extended lambdas).
Definition AMReX_HypreMLNodeLap.cpp:514
HYPRE_BigInt BigInt
Definition AMReX_HypreMLNodeLap.H:70
BigInt numUnknowns() const
Number of composite unknowns.
Definition AMReX_HypreMLNodeLap.H:116
HypreMLNodeLap(HypreMLNodeLap &&)=delete
void solve(Vector< MultiFab * > const &a_sol, Vector< MultiFab const * > const &a_rhs, Real a_reltol, Real a_abstol, int a_maxiter)
Solve the composite system.
Definition AMReX_HypreMLNodeLap.cpp:1192
Definition AMReX_MLNodeLaplacian.H:33
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:29
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:80
amrex_long Long
Definition AMReX_INT.H:30
int MPI_Comm
Definition AMReX_ccse-mpi.H:51
static constexpr int MPI_COMM_NULL
Definition AMReX_ccse-mpi.H:59
Definition AMReX_Amr.cpp:50
IntVectND< 3 > IntVect
IntVect is an alias for amrex::IntVectND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:38