deal.II version GIT relicensing-6809-ge913b9bb34 2026-09-25 17:20:01+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
lapack_support.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2005 - 2025 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_lapack_support_h
14#define dealii_lapack_support_h
15
16
17#include <deal.II/base/config.h>
18
20#include <deal.II/base/types.h>
21
23
24namespace types
25{
26#ifdef LAPACK_WITH_64BIT_BLAS_INDICES
30 using blas_int = long long;
31#else
35 using blas_int = int;
36#endif
37} // namespace types
38
44{
72
76 inline const char *
78 {
79 switch (s)
80 {
81 case matrix:
82 return "matrix";
83 case inverse_matrix:
84 return "inverse matrix";
85 case lu:
86 return "lu decomposition";
87 case cholesky:
88 return "cholesky decomposition";
89 case eigenvalues:
90 return "eigenvalues";
91 case svd:
92 return "svd";
93 case inverse_svd:
94 return "inverse_svd";
95 case unusable:
96 return "unusable";
97 default:
98 return "unknown";
99 }
100 }
101
121
125 inline const char *
127 {
128 switch (s)
129 {
130 case general:
131 return "general";
132 case symmetric:
133 return "symmetric";
134 case upper_triangular:
135 return "upper triangular";
136 case lower_triangular:
137 return "lower triangular";
138 case diagonal:
139 return "diagonal";
140 case hessenberg:
141 return "Hessenberg";
142 }
143
145 return "invalid";
146 }
147
151 constexpr char A = 'A';
155 constexpr char N = 'N';
159 constexpr char O = 'O';
163 constexpr char T = 'T';
167 constexpr char U = 'U';
171 constexpr char L = 'L';
175 constexpr char V = 'V';
179 constexpr types::blas_int zero = 0;
183 constexpr types::blas_int one = 1;
184
189 std::string,
191 << "The function " << arg1 << " returned with an error code "
192 << arg2);
193
200 ExcState,
201 State,
202 << "The function cannot be called while the matrix is in state "
203 << state_name(arg1));
204
210 Property,
211 << "The function cannot be called with a "
212 << property_name(arg1) << " matrix.");
213
220 std::string,
221 << "When you ran 'cmake' during installation of deal.II, no suitable "
222 << "installation of the BLAS or LAPACK library could be found. "
223 << "Consequently, the function <" << arg1 << "> can not be called. "
224 << "Refer to the readme at https://dealii.org/current/readme.html for "
225 << "information on how to ensure that deal.II picks up an existing "
226 << "BLAS and LAPACK installation at configuration time.");
227} // namespace LAPACKSupport
228
229
231
232#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DEAL_II_NOT_IMPLEMENTED()
static ::ExceptionBase & ExcMissing(std::string arg1)
static ::ExceptionBase & ExcErrorCode(std::string arg1, types::blas_int arg2)
static ::ExceptionBase & ExcProperty(Property arg1)
#define DeclException2(Exception2, type1, type2, outsequence)
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcState(State arg1)
constexpr char O
@ 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)
@ 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)
constexpr char L
constexpr char N
constexpr char U
constexpr char T
constexpr char V
constexpr types::blas_int zero
constexpr char A
constexpr types::blas_int one
Definition types.h:30
int blas_int