Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
lapack_support.h
1 // ---------------------------------------------------------------------
2 // @f$Id: lapack_support.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2005 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__lapack_support_h
18 #define __deal2__lapack_support_h
19 
20 
21 #include <deal.II/base/config.h>
23 
24 DEAL_II_NAMESPACE_OPEN
25 
26 
27 namespace LAPACKSupport
28 {
37  enum State
38  {
40  matrix,
42  inverse_matrix,
44  lu,
46  eigenvalues,
48  svd,
50  inverse_svd,
52  unusable = 0x8000
53  };
54 
58  inline const char *state_name(State s)
59  {
60  switch (s)
61  {
62  case matrix:
63  return "matrix";
64  case inverse_matrix:
65  return "inverse matrix";
66  case lu:
67  return "lu decomposition";
68  case eigenvalues:
69  return "eigenvalues";
70  case svd:
71  return "svd";
72  case inverse_svd:
73  return "inverse_svd";
74  case unusable:
75  return "unusable";
76  default:
77  return "unknown";
78  }
79  return "internal error";
80  }
81 
86  enum Properties
87  {
89  general = 0,
91  symmetric = 1,
93  upper_triangle = 2,
95  lower_triangle = 4,
97  diagonal = 6,
99  hessenberg = 8
100  };
101 
105  static const char A = 'A';
109  static const char N = 'N';
113  static const char T = 'T';
117  static const char U = 'U';
121  static const char V = 'V';
125  static const int zero = 0;
129  static const int one = 1;
130 
135  DeclException2(ExcErrorCode, char *, int,
136  << "The function " << arg1 << " returned with an error code " << arg2);
137 
147  DeclException1(ExcState, State,
148  << "The function cannot be called while the matrix is in state "
149  << state_name(arg1));
150 
157  DeclException1(ExcMissing, char *,
158  << "The function "
159  << arg1
160  << " required here is missing in your LAPACK installation");
161 }
162 
163 
164 DEAL_II_NAMESPACE_CLOSE
165 
166 #endif
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:525
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:515