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
28
namespace
Opm::gpuistl::detail::DILU
29
{
30
47
template
<
class
T,
int
blocksize>
48
void
solveLowerLevelSet(T*
reorderedMat
,
49
int
* rowIndices,
50
int
* colIndices,
51
int
*
indexConversion
,
52
int
startIdx
,
53
int
rowsInLevelSet
,
54
const
T*
dInv
,
55
const
T*
d
,
56
T*
v
,
57
int
threadBlockSize
,
58
cudaStream_t
stream);
59
76
template
<
int
blocksize,
class
LinearSolverScalar,
class
MatrixScalar,
class
DiagonalScalar>
77
void
solveLowerLevelSetSplit(
MatrixScalar
*
reorderedUpperMat
,
78
int
* rowIndices,
79
int
* colIndices,
80
int
*
indexConversion
,
81
int
startIdx
,
82
int
rowsInLevelSet
,
83
const
DiagonalScalar
*
dInv
,
84
const
LinearSolverScalar*
d
,
85
LinearSolverScalar*
v
,
86
int
threadBlockSize
,
87
cudaStream_t
stream);
88
104
template
<
class
T,
int
blocksize>
105
void
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
131
template
<
int
blocksize,
class
LinearSolverScalar,
class
MatrixScalar,
class
DiagonalScalar>
132
void
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
159
template
<
class
T,
int
blocksize>
160
void
computeDiluDiagonal(T*
reorderedMat
,
161
int
* rowIndices,
162
int
* colIndices,
163
int
*
reorderedToNatural
,
164
int
*
naturalToReordered
,
165
int
startIdx
,
166
int
rowsInLevelSet
,
167
T*
dInv
,
168
int
threadBlockSize
);
169
191
template
<
int
blocksize,
class
InputScalar,
class
OutputScalar, MatrixStorageMPScheme>
192
void
computeDiluDiagonalSplit(
const
InputScalar
*
srcReorderedLowerMat
,
193
int
*
lowerRowIndices
,
194
int
*
lowerColIndices
,
195
const
InputScalar
*
srcReorderedUpperMat
,
196
int
*
upperRowIndices
,
197
int
*
upperColIndices
,
198
const
InputScalar
*
srcDiagonal
,
199
int
*
reorderedToNatural
,
200
int
*
naturalToReordered
,
201
int
startIdx
,
202
int
rowsInLevelSet
,
203
InputScalar
*
dInv
,
204
OutputScalar
*
dstDiagonal
,
205
OutputScalar
*
dstLowerMat
,
206
OutputScalar
*
dstUpperMat
,
207
int
threadBlockSize
);
208
209
}
// namespace Opm::gpuistl::detail::DILU
210
#endif
Opm::getPropValue
constexpr auto getPropValue()
get the value data member of a property
Definition
propertysystem.hh:242
opm
simulators
linalg
gpuistl
detail
preconditionerKernels
DILUKernels.hpp
Generated by
1.9.8