Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __deal2__lapack_support_h
00013 #define __deal2__lapack_support_h
00014
00015
00016 #include <deal.II/base/config.h>
00017 #include <deal.II/base/exceptions.h>
00018
00019 DEAL_II_NAMESPACE_OPEN
00020
00021
00022 namespace LAPACKSupport
00023 {
00032 enum State
00033 {
00035 matrix,
00037 inverse_matrix,
00039 lu,
00041 eigenvalues,
00043 svd,
00045 inverse_svd,
00047 unusable = 0x8000
00048 };
00049
00053 inline const char* state_name(State s)
00054 {
00055 switch (s)
00056 {
00057 case matrix:
00058 return "matrix";
00059 case inverse_matrix:
00060 return "inverse matrix";
00061 case lu:
00062 return "lu decomposition";
00063 case eigenvalues:
00064 return "eigenvalues";
00065 case svd:
00066 return "svd";
00067 case inverse_svd:
00068 return "inverse_svd";
00069 case unusable:
00070 return "unusable";
00071 default:
00072 return "unknown";
00073 }
00074 return "internal error";
00075 }
00076
00081 enum Properties
00082 {
00084 general = 0,
00086 symmetric = 1,
00088 upper_triangle = 2,
00090 lower_triangle = 4,
00092 diagonal = 6,
00094 hessenberg = 8
00095 };
00096
00100 static const char A = 'A';
00104 static const char N = 'N';
00108 static const char T = 'T';
00112 static const char U = 'U';
00116 static const char V = 'V';
00120 static const int zero = 0;
00124 static const int one = 1;
00125
00130 DeclException2(ExcErrorCode, char*, int,
00131 << "The function " << arg1 << " returned with an error code " << arg2);
00132
00142 DeclException1(ExcState, State,
00143 << "The function cannot be called while the matrix is in state "
00144 << state_name(arg1));
00145
00152 DeclException1(ExcMissing, char*,
00153 << "The function "
00154 << arg1
00155 << " required here is missing in your LAPACK installation");
00156 }
00157
00158
00159 DEAL_II_NAMESPACE_CLOSE
00160
00161 #endif
00162