My Project
Loading...
Searching...
No Matches
ILU0Kernels.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_ILU0_KERNELS_HPP
20#define OPM_ILU0_KERNELS_HPP
21#include <cstddef>
22#include <vector>
23#include <opm/simulators/linalg/gpuistl/detail/kernel_enums.hpp>
24namespace Opm::gpuistl::detail::ILU0
25{
26
41template <class T, int blocksize>
42void solveUpperLevelSet(T* reorderedMat,
43 int* rowIndices,
44 int* colIndices,
45 int* indexConversion,
46 int startIdx,
48 T* v,
50 cudaStream_t stream);
51
67template <class T, int blocksize>
68void solveLowerLevelSet(T* reorderedMat,
69 int* rowIndices,
70 int* colIndices,
71 int* indexConversion,
72 int startIdx,
74 const T* d,
75 T* v,
77 cudaStream_t stream);
78
95template <int blocksize, class LinearSolverScalar, class MatrixScalar, class DiagonalScalar>
96void solveUpperLevelSetSplit(MatrixScalar* reorderedMat,
97 int* rowIndices,
98 int* colIndices,
99 int* indexConversion,
100 int startIdx,
101 int rowsInLevelSet,
102 const DiagonalScalar* dInv,
103 LinearSolverScalar* v,
104 int threadBlockSize,
105 cudaStream_t stream);
106
124template <int blocksize, class LinearSolverScalar, class MatrixScalar>
125void solveLowerLevelSetSplit(MatrixScalar* reorderedLowerMat,
126 int* rowIndices,
127 int* colIndices,
128 int* indexConversion,
129 int startIdx,
130 int rowsInLevelSet,
131 const LinearSolverScalar* d,
132 LinearSolverScalar* v,
133 int threadBlockSize,
134 cudaStream_t stream);
135
152template <class T, int blocksize>
153void LUFactorization(T* reorderedMat,
154 int* rowIndices,
155 int* columnIndices,
158 size_t rowsInLevelSet,
159 int startIdx,
160 int threadBlockSize);
161
184template <int blocksize, class InputScalar, class OutputScalar, MatrixStorageMPScheme mixedPrecisionScheme>
185void LUFactorizationSplit(InputScalar* srcReorderedLowerMat,
186 int* lowerRowIndices,
187 int* lowerColIndices,
189 int* upperRowIndices,
190 int* upperColIndices,
197 int startIdx,
198 int rowsInLevelSet,
199 int threadBlockSize);
200
201} // namespace Opm::gpuistl::detail::ILU0
202#endif
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242