1 #ifndef AMREX_HYPRE_NODE_LAP_H_
2 #define AMREX_HYPRE_NODE_LAP_H_
3 #include <AMReX_Config.H>
15 #include <type_traits>
28 std::string options_namespace_);
36 using Int = HYPRE_Int;
41 using AtomicInt = std::conditional_t<
sizeof(
Int) == 4,
unsigned int,
unsigned long long>;
44 Real rel_tol, Real abs_tol,
int max_iter);
64 HYPRE_IJMatrix
A =
nullptr;
65 HYPRE_IJVector
b =
nullptr;
66 HYPRE_IJVector
x =
nullptr;
int MPI_Comm
Definition: AMReX_ccse-mpi.H:47
static constexpr int MPI_COMM_NULL
Definition: AMReX_ccse-mpi.H:55
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:550
Calculates the distribution of FABs to MPI processes.
Definition: AMReX_DistributionMapping.H:41
An Array of FortranArrayBox(FAB)-like Objects.
Definition: AMReX_FabArray.H:344
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
Definition: AMReX_HypreNodeLap.H:22
std::conditional_t< sizeof(Int)==4, unsigned int, unsigned long long > AtomicInt
Definition: AMReX_HypreNodeLap.H:41
Int fill_local_node_id()
Definition: AMReX_HypreNodeLap.cpp:156
MultiFab tmpsoln
Definition: AMReX_HypreNodeLap.H:73
void fill_global_node_id()
Definition: AMReX_HypreNodeLap.cpp:253
HypreNodeLap(HypreNodeLap &&)=delete
LayoutData< Gpu::DeviceVector< Int > > node_id_vec
Definition: AMReX_HypreNodeLap.H:69
iMultiFab local_node_id
Definition: AMReX_HypreNodeLap.H:71
FabFactory< FArrayBox > const * factory
Definition: AMReX_HypreNodeLap.H:54
Geometry geom
Definition: AMReX_HypreNodeLap.H:53
HypreNodeLap & operator=(HypreNodeLap const &)=delete
int verbose
Definition: AMReX_HypreNodeLap.H:59
HypreNodeLap(const BoxArray &grids_, const DistributionMapping &dmap_, const Geometry &geom_, const FabFactory< FArrayBox > &factory_, const iMultiFab &owner_mask_, const iMultiFab &dirichlet_mask_, MPI_Comm comm_, MLNodeLinOp const *linop_, int verbose_, std::string options_namespace_)
Definition: AMReX_HypreNodeLap.cpp:12
Int fill_local_node_id_cpu()
Definition: AMReX_HypreNodeLap.cpp:215
HYPRE_Int Int
Definition: AMReX_HypreNodeLap.H:36
LayoutData< Int > id_offset
Definition: AMReX_HypreNodeLap.H:72
void getSolution(MultiFab &soln)
Definition: AMReX_HypreNodeLap.cpp:335
std::string options_namespace
Definition: AMReX_HypreNodeLap.H:75
BoxArray grids
Definition: AMReX_HypreNodeLap.H:51
HYPRE_IJMatrix A
Definition: AMReX_HypreNodeLap.H:64
void solve(MultiFab &soln, const MultiFab &rhs, Real rel_tol, Real abs_tol, int max_iter)
Definition: AMReX_HypreNodeLap.cpp:137
HYPRE_IJVector b
Definition: AMReX_HypreNodeLap.H:65
void loadVectors(MultiFab &soln, const MultiFab &rhs)
Definition: AMReX_HypreNodeLap.cpp:294
DistributionMapping dmap
Definition: AMReX_HypreNodeLap.H:52
std::unique_ptr< HypreIJIface > hypre_ij
Definition: AMReX_HypreNodeLap.H:61
void setHypreOptionsNamespace(const std::string &ns)
Definition: AMReX_HypreNodeLap.H:46
Int fill_local_node_id_gpu()
Definition: AMReX_HypreNodeLap.cpp:171
LayoutData< Int > nnodes_grid
Definition: AMReX_HypreNodeLap.H:68
iMultiFab const * owner_mask
Definition: AMReX_HypreNodeLap.H:55
MLNodeLinOp const * linop
Definition: AMReX_HypreNodeLap.H:58
HypreNodeLap(HypreNodeLap const &)=delete
MPI_Comm comm
Definition: AMReX_HypreNodeLap.H:57
iMultiFab const * dirichlet_mask
Definition: AMReX_HypreNodeLap.H:56
FabArray< BaseFab< AtomicInt > > node_id
Definition: AMReX_HypreNodeLap.H:70
static void adjust_singular_matrix(Int const *ncols, Int const *cols, Int const *rows, Real *mat)
Definition: AMReX_HypreNodeLap.cpp:281
HYPRE_IJVector x
Definition: AMReX_HypreNodeLap.H:66
Definition: AMReX_MLNodeLinOp.H:16
A collection (stored as an array) of FArrayBox objects.
Definition: AMReX_MultiFab.H:38
Definition: AMReX_iMultiFab.H:32
Definition: AMReX_Amr.cpp:49