HypreSetup.hpp
Go to the documentation of this file.
71setupSparsityPatternFromCpuMatrix(const MatrixType& matrix, const ParallelInfo& par_info, bool owner_first);
138 HYPRE_SAFE_CALL(HYPRE_BoomerAMGSetStrongThreshold(solver, prm.get<double>("strong_threshold", 0.5)));
139 HYPRE_SAFE_CALL(HYPRE_BoomerAMGSetAggTruncFactor(solver, prm.get<double>("agg_trunc_factor", 0.3)));
180 HYPRE_IJMatrixCreate(mpi_comm, dof_offset, dof_offset + (N - 1), dof_offset, dof_offset + (N - 1), &matrix));
377 Dune::Amg::MatrixGraph<MatrixType> graph(const_cast<MatrixType&>(matrix)); // do not know why not const ref is sufficient
487setupSparsityPatternFromCpuMatrix(const MatrixType& matrix, const ParallelInfo& par_info, bool owner_first)
681computeRowIndexesWithMappingCpu(const MatrixType& matrix, const std::vector<int>& local_dune_to_local_hypre)
684 local_dune_to_local_hypre.begin(), local_dune_to_local_hypre.end(), [](int val) { return val >= 0; });
717computeRowIndexesWithMappingGpu(const GpuSparseMatrix<T>& gpu_matrix, const std::vector<int>& local_dune_to_local_hypre)
720 local_dune_to_local_hypre.begin(), local_dune_to_local_hypre.end(), [](int val) { return val >= 0; });
#define OPM_HYPRE_SAFE_CALL(expr) Macro to wrap Hypre function calls with error checking. Definition: HypreErrorHandling.hpp:96 #define HYPRE_SAFE_CALL(expr) Short form macro for Hypre function calls (for backward compatibility) Definition: HypreErrorHandling.hpp:102 T get(const std::string &key) const The GpuSparseMatrix class simple wrapper class for a CuSparse matrix. Definition: GpuSparseMatrix.hpp:60 GpuVector< int > & getRowIndices() getRowIndices returns the row indices used to represent the BSR structure. Definition: GpuSparseMatrix.hpp:207 size_t nonzeroes() const nonzeroes behaves as the Dune::BCRSMatrix::nonzeros() function and returns the number of non zero blo... Definition: GpuSparseMatrix.hpp:166 size_t N() const N returns the number of rows (which is equal to the number of columns) Definition: GpuSparseMatrix.hpp:152 GpuVector< int > & getColumnIndices() getColumnIndices returns the column indices used to represent the BSR structure. Definition: GpuSparseMatrix.hpp:233 Unified interface for Hypre operations with both CPU and GPU data structures. Definition: HypreInterface.hpp:61 void destroySolver(HYPRE_Solver solver) Destroy Hypre solver. Definition: HypreSetup.hpp:219 std::vector< HYPRE_Int > computeRowIndexesWithMappingCpu(const MatrixType &matrix, const std::vector< HYPRE_Int > &ncols, const std::vector< int > &local_dune_to_local_hypre, bool owner_first) SparsityPattern setupSparsityPatternFromCpuMatrix(const MatrixType &matrix, const ParallelInfo &par_info, bool owner_first) Setup sparsity pattern from CPU matrix (BCRSMatrix) Definition: HypreSetup.hpp:487 ParallelInfo setupHypreParallelInfo(const CommType &comm, const MatrixType &matrix) Setup parallel information for Hypre (automatically detects serial/parallel) Definition: HypreSetup.hpp:263 void destroyMatrix(HYPRE_IJMatrix matrix) Destroy Hypre matrix. Definition: HypreSetup.hpp:233 HYPRE_Solver createAMGSolver() Create Hypre solver (BoomerAMG) Definition: HypreSetup.hpp:117 std::vector< HYPRE_Int > computeRowIndexesWithMappingGpu(const GpuSparseMatrix< T > &gpu_matrix, const std::vector< int > &local_dune_to_local_hypre) std::vector< HYPRE_Int > 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. Definition: HypreSetup.hpp:634 HYPRE_IJMatrix createMatrix(HYPRE_Int N, HYPRE_Int dof_offset, const CommType &comm) Create Hypre matrix. Definition: HypreSetup.hpp:170 ParallelInfo setupHypreParallelInfoParallel(const CommType &comm, const MatrixType &matrix) Create mappings between Dune and HYPRE indexing for parallel decomposition. Definition: HypreSetup.hpp:363 SparsityPattern setupSparsityPattern(const MatrixType &matrix, const ParallelInfo &par_info, bool owner_first) Setup sparsity pattern from matrix (automatically detects CPU/GPU type) Definition: HypreSetup.hpp:465 void initialize(bool use_gpu_backend) Initialize the Hypre library and set memory/execution policy. Definition: HypreSetup.hpp:89 HYPRE_IJVector createVector(HYPRE_Int N, HYPRE_Int dof_offset, const CommType &comm) Create Hypre vector. Definition: HypreSetup.hpp:197 SparsityPattern setupSparsityPatternFromGpuMatrix(const GpuSparseMatrix< T > &gpu_matrix, const ParallelInfo &par_info, bool owner_first) void destroyVector(HYPRE_IJVector vector) Destroy Hypre vector. Definition: HypreSetup.hpp:247 void setSolverParameters(HYPRE_Solver solver, const PropertyTree &prm, bool use_gpu_backend) Set solver parameters from property tree. Definition: HypreSetup.hpp:133 ParallelInfo setupHypreParallelInfoSerial(HYPRE_Int N) Setup parallel information for Hypre in serial case. Definition: HypreSetup.hpp:279 Parallel domain decomposition information for HYPRE-Dune interface. Definition: HypreDataStructures.hpp:37 bool owner_first Whether owned DOFs appear first in local Dune ordering. Definition: HypreDataStructures.hpp:77 std::vector< int > local_dune_to_global_hypre Mapping from local Dune indices to global HYPRE indices. Definition: HypreDataStructures.hpp:51 std::vector< int > local_dune_to_local_hypre Mapping from local Dune indices to local HYPRE indices. Definition: HypreDataStructures.hpp:44 std::vector< int > local_hypre_to_local_dune Mapping from local HYPRE indices to local Dune indices. Definition: HypreDataStructures.hpp:59 HYPRE_Int dof_offset Global index offset for this process's owned DOFs. Definition: HypreDataStructures.hpp:69 HYPRE_Int N_owned Number of DOFs owned by this MPI process. Definition: HypreDataStructures.hpp:62 Compressed Sparse Row (CSR) sparsity pattern for HYPRE matrix assembly. Definition: HypreDataStructures.hpp:86 std::vector< HYPRE_BigInt > rows Global row indices for owned rows (size: N_owned) Definition: HypreDataStructures.hpp:91 std::vector< HYPRE_Int > ncols Non-zero entries per owned row (size: N_owned) Definition: HypreDataStructures.hpp:88 HYPRE_Int nnz Number of non-zero entries in matrix. Definition: HypreDataStructures.hpp:97 std::vector< HYPRE_BigInt > cols Global column indices in CSR format (size: nnz) Definition: HypreDataStructures.hpp:94 Type trait to detect if a type is a GPU type. Definition: gpu_type_detection.hpp:40 |