DILUKernels.hpp
Go to the documentation of this file.
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 <vector>
26
28{
29
46template <class T, int blocksize>
47void solveLowerLevelSet(T* reorderedMat,
48 int* rowIndices,
49 int* colIndices,
50 int* indexConversion,
51 int startIdx,
52 int rowsInLevelSet,
53 const T* dInv,
54 const T* d,
55 T* v,
56 int threadBlockSize);
57
74template <class T, int blocksize>
75void solveLowerLevelSetSplit(T* reorderedUpperMat,
76 int* rowIndices,
77 int* colIndices,
78 int* indexConversion,
79 int startIdx,
80 int rowsInLevelSet,
81 const T* dInv,
82 const T* d,
83 T* v,
84 int threadBlockSize);
85
101template <class T, int blocksize>
102void solveUpperLevelSet(T* reorderedMat,
103 int* rowIndices,
104 int* colIndices,
105 int* indexConversion,
106 int startIdx,
107 int rowsInLevelSet,
108 const T* dInv,
109 T* v,
110 int threadBlockSize);
111
127template <class T, int blocksize>
128void solveUpperLevelSetSplit(T* reorderedUpperMat,
129 int* rowIndices,
130 int* colIndices,
131 int* indexConversion,
132 int startIdx,
133 int rowsInLevelSet,
134 const T* dInv,
135 T* v,
136 int threadBlockSize);
137
154template <class T, int blocksize>
155void computeDiluDiagonal(T* reorderedMat,
156 int* rowIndices,
157 int* colIndices,
158 int* reorderedToNatural,
159 int* naturalToReordered,
160 int startIdx,
161 int rowsInLevelSet,
162 T* dInv,
163 int threadBlockSize);
164template <class T, int blocksize>
165
187void computeDiluDiagonalSplit(T* reorderedLowerMat,
188 int* lowerRowIndices,
189 int* lowerColIndices,
190 T* reorderedUpperMat,
191 int* upperRowIndices,
192 int* upperColIndices,
193 T* diagonal,
194 int* reorderedToNatural,
195 int* naturalToReordered,
196 int startIdx,
197 int rowsInLevelSet,
198 T* dInv,
199 int threadBlockSize);
200
201} // namespace Opm::gpuistl::detail::DILU
202#endif
Definition: DILUKernels.hpp:28
void computeDiluDiagonalSplit(T *reorderedLowerMat, int *lowerRowIndices, int *lowerColIndices, T *reorderedUpperMat, int *upperRowIndices, int *upperColIndices, T *diagonal, int *reorderedToNatural, int *naturalToReordered, int startIdx, int rowsInLevelSet, T *dInv, int threadBlockSize)
Computes the ILU0 of the diagonal elements of the split reordered matrix and stores it in a reordered...
void solveUpperLevelSetSplit(T *reorderedUpperMat, int *rowIndices, int *colIndices, int *indexConversion, int startIdx, int rowsInLevelSet, const T *dInv, T *v, int threadBlockSize)
Perform an upper solve on certain rows in a matrix that can safely be computed in parallel.
void solveUpperLevelSet(T *reorderedMat, int *rowIndices, int *colIndices, int *indexConversion, int startIdx, int rowsInLevelSet, const T *dInv, T *v, int threadBlockSize)
Perform an upper solve on certain rows in a matrix that can safely be computed in parallel.
void solveLowerLevelSet(T *reorderedMat, int *rowIndices, int *colIndices, int *indexConversion, int startIdx, int rowsInLevelSet, const T *dInv, const T *d, T *v, int threadBlockSize)
Perform a lower solve on certain rows in a matrix that can safely be computed in parallel.
void computeDiluDiagonal(T *reorderedMat, int *rowIndices, int *colIndices, int *reorderedToNatural, int *naturalToReordered, int startIdx, int rowsInLevelSet, T *dInv, int threadBlockSize)
Computes the ILU0 of the diagonal elements of the reordered matrix and stores it in a reordered vecto...
void solveLowerLevelSetSplit(T *reorderedUpperMat, int *rowIndices, int *colIndices, int *indexConversion, int startIdx, int rowsInLevelSet, const T *dInv, const T *d, T *v, int threadBlockSize)
Perform a lower solve on certain rows in a matrix that can safely be computed in parallel.