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::gpuistl
 
namespace  Opm::gpuistl::HypreInterface
 Unified interface for Hypre operations with both CPU and GPU data structures.
 

Typedefs

using Opm::gpuistl::HypreInterface::HostArrays = ::Opm::gpuistl::HypreHostDataArrays
 
using Opm::gpuistl::HypreInterface::DeviceArrays = ::Opm::gpuistl::HypreDeviceDataArrays
 
using Opm::gpuistl::HypreInterface::ParallelInfo = ::Opm::gpuistl::ParallelInfo
 
using Opm::gpuistl::HypreInterface::SparsityPattern = ::Opm::gpuistl::SparsityPattern
 

Functions

void Opm::gpuistl::HypreInterface::initialize (bool use_gpu_backend)
 Initialize the Hypre library and set memory/execution policy. More...
 
HYPRE_Solver Opm::gpuistl::HypreInterface::createAMGSolver ()
 Create Hypre solver (BoomerAMG) More...
 
void Opm::gpuistl::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::gpuistl::HypreInterface::createMatrix (HYPRE_Int N, HYPRE_Int dof_offset, const CommType &comm)
 Create Hypre matrix. More...
 
template<typename CommType >
HYPRE_IJVector Opm::gpuistl::HypreInterface::createVector (HYPRE_Int N, HYPRE_Int dof_offset, const CommType &comm)
 Create Hypre vector. More...
 
void Opm::gpuistl::HypreInterface::destroySolver (HYPRE_Solver solver)
 Destroy Hypre solver. More...
 
void Opm::gpuistl::HypreInterface::destroyMatrix (HYPRE_IJMatrix matrix)
 Destroy Hypre matrix. More...
 
void Opm::gpuistl::HypreInterface::destroyVector (HYPRE_IJVector vector)
 Destroy Hypre vector. More...
 
template<typename CommType , typename MatrixType >
ParallelInfo Opm::gpuistl::HypreInterface::setupHypreParallelInfo (const CommType &comm, const MatrixType &matrix)
 Setup parallel information for Hypre (automatically detects serial/parallel) More...
 
template<typename MatrixType >
SparsityPattern Opm::gpuistl::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::gpuistl::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::gpuistl::HypreInterface::transferVectorToHypre (const VectorType &vec, HYPRE_IJVector hypre_vec, HostArrays &host_arrays, const DeviceArrays &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::gpuistl::HypreInterface::transferVectorFromHypre (HYPRE_IJVector hypre_vec, VectorType &vec, HostArrays &host_arrays, const DeviceArrays &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::gpuistl::HypreInterface::updateMatrixValues (const MatrixType &matrix, HYPRE_IJMatrix hypre_matrix, const SparsityPattern &sparsity_pattern, const HostArrays &host_arrays, const DeviceArrays &device_arrays, bool use_gpu_backend)
 Update matrix values in Hypre. More...