DFT-EFE
 
Loading...
Searching...
No Matches
LapackSupport.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2005 - 2018 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 dftefeLapackSupport_h
17#define dftefeLapackSupport_h
18
19namespace dftefe
20{
21 namespace linearAlgebra
22 {
23 namespace types
24 {
25 using LapackInt = int64_t;
26 } // namespace types
27
28 namespace LAPACKSupport
29 {
38 enum State
39 {
55 unusable = 0x8000
56 };
57
61 inline const char *
63 {
64 switch (s)
65 {
66 case matrix:
67 return "matrix";
68 case inverse_matrix:
69 return "inverse matrix";
70 case lu:
71 return "lu decomposition";
72 case cholesky:
73 return "cholesky decomposition";
74 case eigenvalues:
75 return "eigenvalues";
76 case svd:
77 return "svd";
78 case inverse_svd:
79 return "inverse_svd";
80 case unusable:
81 return "unusable";
82 default:
83 return "unknown";
84 }
85 }
86
92 {
104 hessenberg = 8
105 };
106
110 inline const char *
112 {
113 switch (s)
114 {
115 case general:
116 return "general";
117 case hermitian:
118 return "hermitian";
119 case upper_triangular:
120 return "upper triangular";
121 case lower_triangular:
122 return "lower triangular";
123 case diagonal:
124 return "diagonal";
125 case hessenberg:
126 return "Hessenberg";
127 }
128
129 DFTEFE_Assert(false);
130 return "invalid";
131 }
132
136 static const char A = 'A';
140 static const char N = 'N';
144 static const char O = 'O';
148 static const char T = 'T';
152 static const char C = 'C';
156 static const char U = 'U';
160 static const char L = 'L';
164 static const char V = 'V';
168 static const types::LapackInt zero = 0;
172 static const types::LapackInt one = 1;
173
174 } // namespace LAPACKSupport
175 } // namespace linearAlgebra
176} // namespace dftefe
177#endif
#define DFTEFE_Assert(expr)
provides an interface for exception handling. It two overrides on the assert(expr) function in C/C++ ...
Definition: Exceptions.h:105
static const char U
Definition: LapackSupport.h:156
const char * state_name(State s)
Definition: LapackSupport.h:62
Property
Definition: LapackSupport.h:92
@ lower_triangular
Matrix is lower triangular.
Definition: LapackSupport.h:100
@ upper_triangular
Matrix is upper triangular.
Definition: LapackSupport.h:98
@ general
No special properties.
Definition: LapackSupport.h:94
@ hessenberg
Matrix is in upper Hessenberg form.
Definition: LapackSupport.h:104
@ hermitian
Matrix is symmetric.
Definition: LapackSupport.h:96
@ diagonal
Matrix is diagonal.
Definition: LapackSupport.h:102
static const char C
Definition: LapackSupport.h:152
static const char N
Definition: LapackSupport.h:140
static const char T
Definition: LapackSupport.h:148
const char * property_name(const Property s)
Definition: LapackSupport.h:111
static const char O
Definition: LapackSupport.h:144
State
Definition: LapackSupport.h:39
@ cholesky
Contents is a Cholesky decomposition.
Definition: LapackSupport.h:47
@ lu
Contents is an LU decomposition.
Definition: LapackSupport.h:45
@ matrix
Contents is actually a matrix.
Definition: LapackSupport.h:41
@ svd
Matrix contains singular value decomposition,.
Definition: LapackSupport.h:51
@ eigenvalues
Eigenvalue vector is filled.
Definition: LapackSupport.h:49
@ inverse_matrix
Contents is the inverse of a matrix.
Definition: LapackSupport.h:43
@ unusable
Contents is something useless.
Definition: LapackSupport.h:55
@ inverse_svd
Matrix is the inverse of a singular value decomposition.
Definition: LapackSupport.h:53
static const char A
Definition: LapackSupport.h:136
static const char L
Definition: LapackSupport.h:160
static const types::LapackInt one
Definition: LapackSupport.h:172
static const types::LapackInt zero
Definition: LapackSupport.h:168
static const char V
Definition: LapackSupport.h:164
int64_t LapackInt
Definition: LapackSupport.h:25
dealii includes
Definition: AtomFieldDataSpherical.cpp:31