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#include "slu_scomplex.h"
62
63extern "C" {
64 extern void
65 cgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
66 char *, float *, float *, SuperMatrix *, SuperMatrix *,
67 void *, int, SuperMatrix *, SuperMatrix *,
68 float *, float *, float *, float *,
69 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
70
71
72 extern void
73 cCreate_Dense_Matrix(SuperMatrix *, int, int, ::complex *, int,
74 Stype_t, Dtype_t, Mtype_t);
75
76
77 extern void
78 cCreate_CompCol_Matrix(SuperMatrix *, int, int, int, ::complex *,
79 int *, int *, Stype_t, Dtype_t, Mtype_t);
80
81 extern int cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
82
83 extern void cPrint_CompCol_Matrix(char *, SuperMatrix *);
84}
85#endif
86
87#if __has_include("slu_zdefs.h")
88#include "slu_dcomplex.h"
89extern "C" {
90 extern void
91 zgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
92 char *, double *, double *, SuperMatrix *, SuperMatrix *,
93 void *, int, SuperMatrix *, SuperMatrix *,
94 double *, double *, double *, double *,
95 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
96
97
98 extern void
99 zCreate_CompCol_Matrix(SuperMatrix *, int, int, int, doublecomplex *,
100 int *, int *, Stype_t, Dtype_t, Mtype_t);
101
102 extern void
103 zCreate_Dense_Matrix(SuperMatrix *, int, int, doublecomplex *, int,
104 Stype_t, Dtype_t, Mtype_t);
105
106 extern int zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
107
108 extern void zPrint_CompCol_Matrix(char *, SuperMatrix *);
109}
110#endif
111
112
113#endif
114#endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)