My Project
Loading...
Searching...
No Matches
DILUKernels.hpp
1/*
2 Copyright 2024 SINTEF AS
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef OPM_DILU_KERNELS_HPP
20#define OPM_DILU_KERNELS_HPP
21
22#include <cstddef>
23#include <cuda.h>
24#include <cuda_runtime.h>
25#include <opm/simulators/linalg/gpuistl/detail/kernel_enums.hpp>
26#include <vector>
27
28namespace Opm::gpuistl::detail::DILU
29{
30
47template <class T, int blocksize>
48void solveLowerLevelSet(T* reorderedMat,
49 int* rowIndices,
50 int* colIndices,
51 int* indexConversion,
52 int startIdx,
54 const T* dInv,
55 const T* d,
56 T* v,
58 cudaStream_t stream);
59
76template <int blocksize, class LinearSolverScalar, class MatrixScalar, class DiagonalScalar>
77void solveLowerLevelSetSplit(MatrixScalar* reorderedUpperMat,
78 int* rowIndices,
79 int* colIndices,
80 int* indexConversion,
81 int startIdx,
83 const DiagonalScalar* dInv,
84 const LinearSolverScalar* d,
85 LinearSolverScalar* v,
87 cudaStream_t stream);
88
104template <class T, int blocksize>
105void solveUpperLevelSet(T* reorderedMat,
106 int* rowIndices,
107 int* colIndices,
108 int* indexConversion,
109 int startIdx,
110 int rowsInLevelSet,
111 const T* dInv,
112 T* v,
113 int threadBlockSize,
114 cudaStream_t stream);
115
131template <int blocksize, class LinearSolverScalar, class MatrixScalar, class DiagonalScalar>
132void solveUpperLevelSetSplit(MatrixScalar* reorderedUpperMat,
133 int* rowIndices,
134 int* colIndices,
135 int* indexConversion,
136 int startIdx,
137 int rowsInLevelSet,
138 const DiagonalScalar* dInv,
139 LinearSolverScalar* v,
140 int threadBlockSize,
141 cudaStream_t stream);
142
159template <class T, int blocksize>
160void computeDiluDiagonal(T* reorderedMat,
161 int* rowIndices,
162 int* colIndices,
165 int startIdx,
166 int rowsInLevelSet,
167 T* dInv,
168 int threadBlockSize);
169
191template <int blocksize, class InputScalar, class OutputScalar, MatrixStorageMPScheme>
192void computeDiluDiagonalSplit(const InputScalar* srcReorderedLowerMat,
193 int* lowerRowIndices,
194 int* lowerColIndices,
196 int* upperRowIndices,
197 int* upperColIndices,
201 int startIdx,
202 int rowsInLevelSet,
207 int threadBlockSize);
208
209} // namespace Opm::gpuistl::detail::DILU
210#endif
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242