DUNE PDELab (git)

superlufunctions.hh
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5#ifndef DUNE_ISTL_SUPERLUFUNCTIONS_HH
6#define DUNE_ISTL_SUPERLUFUNCTIONS_HH
7#if HAVE_SUPERLU
8
9#include <dune-istl-config.hh> // SUPERLU_INT_TYPE
10
11#define int_t SUPERLU_INT_TYPE
12#include <supermatrix.h>
13#include <slu_util.h>
14#undef int_t
15
16#if __has_include("slu_sdefs.h")
17extern "C" {
18 extern void
19 sgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
20 char *, float *, float *, SuperMatrix *, SuperMatrix *,
21 void *, int, SuperMatrix *, SuperMatrix *,
22 float *, float *, float *, float *,
23 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
24
25 extern void
26 sCreate_Dense_Matrix(SuperMatrix *, int, int, float *, int,
27 Stype_t, Dtype_t, Mtype_t);
28 extern void
29 sCreate_CompCol_Matrix(SuperMatrix *, int, int, int, float *,
30 int *, int *, Stype_t, Dtype_t, Mtype_t);
31 extern int sQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
32
33 extern void sPrint_CompCol_Matrix(char *, SuperMatrix *);
34}
35#endif
36
37#if __has_include("slu_ddefs.h")
38extern "C" {
39 extern void
40 dgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
41 char *, double *, double *, SuperMatrix *, SuperMatrix *,
42 void *, int, SuperMatrix *, SuperMatrix *,
43 double *, double *, double *, double *,
44 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
45
46 extern void
47 dCreate_CompCol_Matrix(SuperMatrix *, int, int, int, double *,
48 int *, int *, Stype_t, Dtype_t, Mtype_t);
49
50 extern void
51 dCreate_Dense_Matrix(SuperMatrix *, int, int, double *, int,
52 Stype_t, Dtype_t, Mtype_t);
53
54 extern int dQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
55
56 extern void dPrint_CompCol_Matrix(char *, SuperMatrix *);
57}
58#endif
59
60#if __has_include("slu_cdefs.h")
61#ifndef SUPERLU_TYPEDEF_COMPLEX
62// Per default SuperLU >= 7.0.0. does not provide
63// a type complex anymore. By setting SUPERLU_TYPEDEF_COMPLEX
64// we tell SuperLU to define complex to be the same as the
65// new type singlecomplex
66#define SUPERLU_TYPEDEF_COMPLEX
67#endif
68#include "slu_scomplex.h"
69
70extern "C" {
71 extern void
72 cgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
73 char *, float *, float *, SuperMatrix *, SuperMatrix *,
74 void *, int, SuperMatrix *, SuperMatrix *,
75 float *, float *, float *, float *,
76 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
77
78
79 extern void
80 cCreate_Dense_Matrix(SuperMatrix *, int, int, ::complex *, int,
81 Stype_t, Dtype_t, Mtype_t);
82
83
84 extern void
85 cCreate_CompCol_Matrix(SuperMatrix *, int, int, int, ::complex *,
86 int *, int *, Stype_t, Dtype_t, Mtype_t);
87
88 extern int cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
89
90 extern void cPrint_CompCol_Matrix(char *, SuperMatrix *);
91}
92#endif
93
94#if __has_include("slu_zdefs.h")
95#include "slu_dcomplex.h"
96extern "C" {
97 extern void
98 zgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
99 char *, double *, double *, SuperMatrix *, SuperMatrix *,
100 void *, int, SuperMatrix *, SuperMatrix *,
101 double *, double *, double *, double *,
102 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
103
104
105 extern void
106 zCreate_CompCol_Matrix(SuperMatrix *, int, int, int, doublecomplex *,
107 int *, int *, Stype_t, Dtype_t, Mtype_t);
108
109 extern void
110 zCreate_Dense_Matrix(SuperMatrix *, int, int, doublecomplex *, int,
111 Stype_t, Dtype_t, Mtype_t);
112
113 extern int zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
114
115 extern void zPrint_CompCol_Matrix(char *, SuperMatrix *);
116}
117#endif
118
119
120#endif
121#endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)