Reference documentation for deal.II version 9.3.3
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
lapack_support.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2005 - 2021 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_lapack_support_h
17#define dealii_lapack_support_h
18
19
20#include <deal.II/base/config.h>
21
23
25
26namespace types
27{
28#ifdef LAPACK_WITH_64BIT_BLAS_INDICES
32 using blas_int = long long;
33#else
37 using blas_int = int;
38#endif
39} // namespace types
40
46{
55 enum State
56 {
72 unusable = 0x8000
73 };
74
78 inline const char *
80 {
81 switch (s)
82 {
83 case matrix:
84 return "matrix";
85 case inverse_matrix:
86 return "inverse matrix";
87 case lu:
88 return "lu decomposition";
89 case cholesky:
90 return "cholesky decomposition";
91 case eigenvalues:
92 return "eigenvalues";
93 case svd:
94 return "svd";
95 case inverse_svd:
96 return "inverse_svd";
97 case unusable:
98 return "unusable";
99 default:
100 return "unknown";
101 }
102 }
103
109 {
121 hessenberg = 8
122 };
123
127 inline const char *
129 {
130 switch (s)
131 {
132 case general:
133 return "general";
134 case symmetric:
135 return "symmetric";
136 case upper_triangular:
137 return "upper triangular";
138 case lower_triangular:
139 return "lower triangular";
140 case diagonal:
141 return "diagonal";
142 case hessenberg:
143 return "Hessenberg";
144 }
145
146 Assert(false, ExcNotImplemented());
147 return "invalid";
148 }
149
153 static const char A = 'A';
157 static const char N = 'N';
161 static const char O = 'O';
165 static const char T = 'T';
169 static const char U = 'U';
173 static const char L = 'L';
177 static const char V = 'V';
181 static const types::blas_int zero = 0;
185 static const types::blas_int one = 1;
186
191 std::string,
193 << "The function " << arg1 << " returned with an error code "
194 << arg2);
195
202 ExcState,
203 State,
204 << "The function cannot be called while the matrix is in state "
205 << state_name(arg1));
206
212 Property,
213 << "The function cannot be called with a "
214 << property_name(arg1) << " matrix.");
215
222 std::string,
223 << "When you ran 'cmake' during installation of deal.II, "
224 << "no suitable installation of the BLAS or LAPACK library could "
225 << "be found. Consequently, the function <" << arg1
226 << "> can not be called. Refer to the doc/readme.html "
227 << "file for information on how to ensure that deal.II "
228 << "picks up an existing BLAS and LAPACK installation at "
229 << "configuration time.");
230} // namespace LAPACKSupport
231
232
234
235#endif
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
static ::ExceptionBase & ExcMissing(std::string arg1)
static ::ExceptionBase & ExcNotImplemented()
static ::ExceptionBase & ExcErrorCode(std::string arg1, types::blas_int arg2)
static ::ExceptionBase & ExcProperty(Property arg1)
#define Assert(cond, exc)
Definition: exceptions.h:1465
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:538
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:515
static ::ExceptionBase & ExcState(State arg1)
static const char L
static const types::blas_int zero
@ cholesky
Contents is a Cholesky decomposition.
@ lu
Contents is an LU decomposition.
@ matrix
Contents is actually a matrix.
@ unusable
Contents is something useless.
@ inverse_matrix
Contents is the inverse of a matrix.
@ svd
Matrix contains singular value decomposition,.
@ inverse_svd
Matrix is the inverse of a singular value decomposition.
@ eigenvalues
Eigenvalue vector is filled.
const char * state_name(State s)
static const char U
static const char A
@ symmetric
Matrix is symmetric.
@ hessenberg
Matrix is in upper Hessenberg form.
@ diagonal
Matrix is diagonal.
@ upper_triangular
Matrix is upper triangular.
@ lower_triangular
Matrix is lower triangular.
@ general
No special properties.
const char * property_name(const Property s)
static const char T
static const char N
static const types::blas_int one
static const char O
static const char V
Definition: types.h:32
int blas_int