dune-istl 2.9.0
Loading...
Searching...
No Matches
superlufunctions.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 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
10#define int_t SUPERLU_INT_TYPE
11#include "supermatrix.h"
12#include "slu_util.h"
13#undef int_t
14
15#if __has_include("slu_sdefs.h")
16extern "C" {
17 extern void
18 sgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
19 char *, float *, float *, SuperMatrix *, SuperMatrix *,
20 void *, int, SuperMatrix *, SuperMatrix *,
21 float *, float *, float *, float *,
22 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
23
24 extern void
25 sCreate_Dense_Matrix(SuperMatrix *, int, int, float *, int,
26 Stype_t, Dtype_t, Mtype_t);
27 extern void
28 sCreate_CompCol_Matrix(SuperMatrix *, int, int, int, float *,
29 int *, int *, Stype_t, Dtype_t, Mtype_t);
30 extern int sQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
31
32 extern void sPrint_CompCol_Matrix(char *, SuperMatrix *);
33}
34#endif
35
36#if __has_include("slu_ddefs.h")
37extern "C" {
38 extern void
39 dgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
40 char *, double *, double *, SuperMatrix *, SuperMatrix *,
41 void *, int, SuperMatrix *, SuperMatrix *,
42 double *, double *, double *, double *,
43 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
44
45 extern void
46 dCreate_CompCol_Matrix(SuperMatrix *, int, int, int, double *,
47 int *, int *, Stype_t, Dtype_t, Mtype_t);
48
49 extern void
50 dCreate_Dense_Matrix(SuperMatrix *, int, int, double *, int,
51 Stype_t, Dtype_t, Mtype_t);
52
53 extern int dQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
54
55 extern void dPrint_CompCol_Matrix(char *, SuperMatrix *);
56}
57#endif
58
59#if __has_include("slu_cdefs.h")
60#ifndef SUPERLU_TYPEDEF_COMPLEX
61// For now let's keep backwards compatible and let
62// complex be a typedef of doublecomplex
63#define SUPERLU_TYPEDEF_COMPLEX
64#endif
65#include "slu_scomplex.h"
66
67extern "C" {
68 extern void
69 cgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
70 char *, float *, float *, SuperMatrix *, SuperMatrix *,
71 void *, int, SuperMatrix *, SuperMatrix *,
72 float *, float *, float *, float *,
73 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
74
75
76 extern void
77 cCreate_Dense_Matrix(SuperMatrix *, int, int, ::complex *, int,
78 Stype_t, Dtype_t, Mtype_t);
79
80
81 extern void
82 cCreate_CompCol_Matrix(SuperMatrix *, int, int, int, ::complex *,
83 int *, int *, Stype_t, Dtype_t, Mtype_t);
84
85 extern int cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
86
87 extern void cPrint_CompCol_Matrix(char *, SuperMatrix *);
88}
89#endif
90
91#if __has_include("slu_zdefs.h")
92#include "slu_dcomplex.h"
93extern "C" {
94 extern void
95 zgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
96 char *, double *, double *, SuperMatrix *, SuperMatrix *,
97 void *, int, SuperMatrix *, SuperMatrix *,
98 double *, double *, double *, double *,
99 GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
100
101
102 extern void
103 zCreate_CompCol_Matrix(SuperMatrix *, int, int, int, doublecomplex *,
104 int *, int *, Stype_t, Dtype_t, Mtype_t);
105
106 extern void
107 zCreate_Dense_Matrix(SuperMatrix *, int, int, doublecomplex *, int,
108 Stype_t, Dtype_t, Mtype_t);
109
110 extern int zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
111
112 extern void zPrint_CompCol_Matrix(char *, SuperMatrix *);
113}
114#endif
115
116
117#endif
118#endif