OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
KokkosAmgPreconditioner.hpp File Reference

hypre BoomerAMG preconditioner for the Kokkos GPU plugin (PRECONDITIONER=AMG) — host (OpenMP) and device (CUDA/HIP) paths. More...

Include dependency graph for KokkosAmgPreconditioner.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmm::twoD::gpu::KokkosAmgPreconditioner
 BoomerAMG preconditioner over the Kokkos surface Newton matrix. More...
 

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 
namespace  openswmm::twoD::gpu
 

Detailed Description

hypre BoomerAMG preconditioner for the Kokkos GPU plugin (PRECONDITIONER=AMG) — host (OpenMP) and device (CUDA/HIP) paths.

Mirrors the serial HypreAmgPreconditioner but assembles M = I − γ·J directly from the plugin's Kokkos mesh/state Views (a Kokkos kernel that runs in the active ExecSpace), and drives hypre in the matching memory location:

  • OpenMP backend → MemSpace is host → HYPRE_MEMORY_HOST / EXEC_HOST
  • CUDA/HIP backend → MemSpace is device→ HYPRE_MEMORY_DEVICE / EXEC_DEVICE so the IJ matrix/vectors and the BoomerAMG V-cycle live in the same space as the Kokkos N_Vector data, avoiding host↔device round-trips inside the linear solve. Only compiled when OPENSWMM_WITH_HYPRE is ON.

The static CSR sparsity (diagonal + up to three neighbours per row) is built once on the host from the mesh topology and mirrored to the ExecSpace; only the values are refreshed each setup.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License