deal.II version GIT relicensing-2642-g417c8935ea 2025-02-14 17:30:00+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#include <deal.II/base/types.h>
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{
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
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
147 return "invalid";
148 }
149
153 constexpr char A = 'A';
157 constexpr char N = 'N';
161 constexpr char O = 'O';
165 constexpr char T = 'T';
169 constexpr char U = 'U';
173 constexpr char L = 'L';
177 constexpr char V = 'V';
181 constexpr types::blas_int zero = 0;
185 constexpr 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, no suitable "
224 << "installation of the BLAS or LAPACK library could be found. "
225 << "Consequently, the function <" << arg1 << "> can not be called. "
226 << "Refer to the readme at https://dealii.org/current/readme.html for "
227 << "information on how to ensure that deal.II picks up an existing "
228 << "BLAS and LAPACK installation at configuration time.");
229} // namespace LAPACKSupport
230
231
233
234#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:518
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:519
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:536
#define DeclException1(Exception1, type1, outsequence)
Definition exceptions.h:513
static ::ExceptionBase & ExcState(State arg1)
#define DEAL_II_NOT_IMPLEMENTED()
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:32
int blas_int