Reference documentation for deal.II version GIT relicensing-1062-gc06da148b8 2024-07-15 19:20:02+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: LGPL-2.1-or-later
4// Copyright (C) 2005 - 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_lapack_support_h
16#define dealii_lapack_support_h
17
18
19#include <deal.II/base/config.h>
20
22
24
25namespace types
26{
27#ifdef LAPACK_WITH_64BIT_BLAS_INDICES
31 using blas_int = long long;
32#else
36 using blas_int = int;
37#endif
38} // namespace types
39
45{
73
77 inline const char *
79 {
80 switch (s)
81 {
82 case matrix:
83 return "matrix";
84 case inverse_matrix:
85 return "inverse matrix";
86 case lu:
87 return "lu decomposition";
88 case cholesky:
89 return "cholesky decomposition";
90 case eigenvalues:
91 return "eigenvalues";
92 case svd:
93 return "svd";
94 case inverse_svd:
95 return "inverse_svd";
96 case unusable:
97 return "unusable";
98 default:
99 return "unknown";
100 }
101 }
102
122
126 inline const char *
128 {
129 switch (s)
130 {
131 case general:
132 return "general";
133 case symmetric:
134 return "symmetric";
135 case upper_triangular:
136 return "upper triangular";
137 case lower_triangular:
138 return "lower triangular";
139 case diagonal:
140 return "diagonal";
141 case hessenberg:
142 return "Hessenberg";
143 }
144
146 return "invalid";
147 }
148
152 static const char A = 'A';
156 static const char N = 'N';
160 static const char O = 'O';
164 static const char T = 'T';
168 static const char U = 'U';
172 static const char L = 'L';
176 static const char V = 'V';
180 static const types::blas_int zero = 0;
184 static const types::blas_int one = 1;
185
190 std::string,
192 << "The function " << arg1 << " returned with an error code "
193 << arg2);
194
201 ExcState,
202 State,
203 << "The function cannot be called while the matrix is in state "
204 << state_name(arg1));
205
211 Property,
212 << "The function cannot be called with a "
213 << property_name(arg1) << " matrix.");
214
221 std::string,
222 << "When you ran 'cmake' during installation of deal.II, no suitable "
223 << "installation of the BLAS or LAPACK library could be found. "
224 << "Consequently, the function <" << arg1 << "> can not be called. "
225 << "Refer to the readme at https://dealii.org/current/readme.html for "
226 << "information on how to ensure that deal.II picks up an existing "
227 << "BLAS and LAPACK installation at configuration time.");
228} // namespace LAPACKSupport
229
230
232
233#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
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)
Definition exceptions.h:539
#define DeclException1(Exception1, type1, outsequence)
Definition exceptions.h:516
static ::ExceptionBase & ExcState(State arg1)
#define DEAL_II_NOT_IMPLEMENTED()
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