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

Go to the source code of this file.

Namespaces

namespace  Opm
 
namespace  Opm::linalg
 
namespace  Opm::linalg::HypreInterface
 Unified interface for Hypre operations with both CPU and GPU data structures.
 

Functions

void Opm::linalg::HypreInterface::initialize (bool use_gpu_backend)
 Initialize the Hypre library and set memory/execution policy. More...
 
HYPRE_Solver Opm::linalg::HypreInterface::createAMGSolver ()
 Create Hypre solver (BoomerAMG) More...
 
void Opm::linalg::HypreInterface::setSolverParameters (HYPRE_Solver solver, const PropertyTree &prm, bool use_gpu_backend)
 Set solver parameters from property tree. More...
 
template<typename CommType >
HYPRE_IJMatrix Opm::linalg::HypreInterface::createMatrix (HYPRE_Int N, HYPRE_Int dof_offset, const CommType &comm)
 Create Hypre matrix. More...
 
template<typename CommType >
HYPRE_IJVector Opm::linalg::HypreInterface::createVector (HYPRE_Int N, HYPRE_Int dof_offset, const CommType &comm)
 Create Hypre vector. More...
 
void Opm::linalg::HypreInterface::destroySolver (HYPRE_Solver solver)
 Destroy Hypre solver. More...
 
void Opm::linalg::HypreInterface::destroyMatrix (HYPRE_IJMatrix matrix)
 Destroy Hypre matrix. More...
 
void Opm::linalg::HypreInterface::destroyVector (HYPRE_IJVector vector)
 Destroy Hypre vector. More...
 
template<typename CommType , typename MatrixType >
ParallelInfo Opm::linalg::HypreInterface::setupHypreParallelInfo (const CommType &comm, const MatrixType &matrix)
 Setup parallel information for Hypre (automatically detects serial/parallel) More...
 
template<typename MatrixType >
SparsityPattern Opm::linalg::HypreInterface::setupSparsityPattern (const MatrixType &matrix, const ParallelInfo &par_info, bool owner_first)
 Setup sparsity pattern from matrix (automatically detects CPU/GPU type) More...
 
template<typename MatrixType >
std::vector< HYPRE_Int > Opm::linalg::HypreInterface::computeRowIndexes (const MatrixType &matrix, const std::vector< HYPRE_Int > &ncols, const std::vector< int > &local_dune_to_local_hypre, bool owner_first)
 Compute row indexes for HYPRE_IJMatrixSetValues2. More...
 
template<typename VectorType >
void Opm::linalg::HypreInterface::transferVectorToHypre (const VectorType &vec, HYPRE_IJVector hypre_vec, HostDataArrays &host_arrays, const DeviceDataArrays &device_arrays, const ParallelInfo &par_info, bool use_gpu_backend)
 Transfer vector to Hypre from any vector type (CPU or GPU) More...
 
template<typename VectorType >
void Opm::linalg::HypreInterface::transferVectorFromHypre (HYPRE_IJVector hypre_vec, VectorType &vec, HostDataArrays &host_arrays, const DeviceDataArrays &device_arrays, const ParallelInfo &par_info, bool use_gpu_backend)
 Transfer vector from Hypre to any vector type (CPU or GPU) More...
 
template<typename MatrixType >
void Opm::linalg::HypreInterface::updateMatrixValues (const MatrixType &matrix, HYPRE_IJMatrix hypre_matrix, const SparsityPattern &sparsity_pattern, const HostDataArrays &host_arrays, const DeviceDataArrays &device_arrays, bool use_gpu_backend)
 Update matrix values in Hypre. More...