1#ifndef AMREX_HYPRE_NODE_LAP_H_
2#define AMREX_HYPRE_NODE_LAP_H_
3#include <AMReX_Config.H>
51 std::string options_namespace_);
59 using Int = HYPRE_Int;
64 using AtomicInt = std::conditional_t<
sizeof(
Int) == 4,
unsigned int,
unsigned long long>;
76 Real rel_tol,
Real abs_tol,
int max_iter);
80 { options_namespace = ns; }
89 iMultiFab const* dirichlet_mask =
nullptr;
94 std::unique_ptr<HypreIJIface> hypre_ij;
97 HYPRE_IJMatrix A =
nullptr;
98 HYPRE_IJVector b =
nullptr;
99 HYPRE_IJVector x =
nullptr;
108 std::string options_namespace{
"hypre"};
135 void loadVectors (MultiFab& soln,
const MultiFab& rhs);
Boundary data container that owns masks, boundary values, and metadata.
A collection of Boxes stored in an Array.
Definition AMReX_BoxArray.H:568
Calculates the distribution of FABs to MPI processes.
Definition AMReX_DistributionMapping.H:43
An Array of FortranArrayBox(FAB)-like Objects.
Definition AMReX_FabArray.H:349
Definition AMReX_FabFactory.H:50
Rectangular problem domain geometry.
Definition AMReX_Geometry.H:74
IJ-based nodal Laplacian that mirrors MLNodeLinOp's discretization.
Definition AMReX_HypreNodeLap.H:31
std::conditional_t< sizeof(Int)==4, unsigned int, unsigned long long > AtomicInt
Definition AMReX_HypreNodeLap.H:64
Int fill_local_node_id()
Assign local ids to each owned node.
Definition AMReX_HypreNodeLap.cpp:156
void fill_global_node_id()
Convert local ids to globally unique ids recognized by HYPRE.
Definition AMReX_HypreNodeLap.cpp:253
HypreNodeLap(HypreNodeLap &&)=delete
HypreNodeLap & operator=(HypreNodeLap const &)=delete
Int fill_local_node_id_cpu()
CPU fallback local-id fill routine; returns the owned-node count.
Definition AMReX_HypreNodeLap.cpp:215
HYPRE_Int Int
Definition AMReX_HypreNodeLap.H:59
void getSolution(MultiFab &soln)
Copy the solved data soln out of HYPRE and back into AMReX storage.
Definition AMReX_HypreNodeLap.cpp:336
void solve(MultiFab &soln, const MultiFab &rhs, Real rel_tol, Real abs_tol, int max_iter)
Solve the nodal Laplacian using HYPRE's IJ interface.
Definition AMReX_HypreNodeLap.cpp:137
void loadVectors(MultiFab &soln, const MultiFab &rhs)
Copy AMReX solution guess soln and RHS rhs into HYPRE's IJ vectors prior to solving.
Definition AMReX_HypreNodeLap.cpp:294
void setHypreOptionsNamespace(const std::string &ns)
Override the ParmParse namespace used when configuring HYPRE (ns).
Definition AMReX_HypreNodeLap.H:79
Int fill_local_node_id_gpu()
GPU-specific local-id fill routine; returns the owned-node count.
Definition AMReX_HypreNodeLap.cpp:171
HypreNodeLap(HypreNodeLap const &)=delete
static void adjust_singular_matrix(Int const *ncols, Int const *cols, Int const *rows, Real *mat)
Apply the fix-up HYPRE expects for singular matrices (Dirichlet pinning).
Definition AMReX_HypreNodeLap.cpp:281
a one-thingy-per-box distributed object
Definition AMReX_LayoutData.H:13
Definition AMReX_MLNodeLinOp.H:17
A collection (stored as an array) of FArrayBox objects.
Definition AMReX_MultiFab.H:40
A Collection of IArrayBoxes.
Definition AMReX_iMultiFab.H:34
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:79
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:49