CppNoddy  0.92
Loading...
Searching...
No Matches
DenseLinearEigenSystem.h
Go to the documentation of this file.
1/// \file DenseLinearEigenSystem.h
2/// Specification of the dense linear eigensystem class.
3/// This class links to LAPACK to perform the solver phase.
4
5#ifndef DENSELINEAREIGENSYSTEM_BASE_H
6#define DENSELINEAREIGENSYSTEM_BASE_H
7
8#include <Types.h>
10
11namespace CppNoddy {
12
13 /// A linear Nth-order generalised eigensystem class.
14 /// Here we can construct a linear eigenproblem in the form
15 /// \f[ A_{NxN} \,{\underline x}_i = \lambda_i\, B_{NxN}\, {\underline x}_i \f]
16 /// for dense double/complex matrices \f$ A \f$ and \f$ B \f$. The eigenvalues
17 /// and eigenvectors can be tagged and retrieved as required.
18 template <typename _Type>
20
21 public:
22
23 /// Constructor for a linear system object.
24 /// \param Aptr A pointer to a typed A matrix
25 /// \param Bptr A pointer to a typed B matrix
27
28 /// Destructor for a linear system object.
30
31 /// Solve the matrix linear eigensystem
32 void eigensolve();
33
34 // BECAUSE OF THE WAY THE DENSE LAPACK QZ ROUTINE
35 // RETURNS EIGENVALUES (in alpha/beta format) WE WILL NOT USE THE BASE
36 // CLASS'S TAGGING METHODS, BUT INSTEAD DEFINE NEW VERSIONS.
37
38 /// Tag those eigenvalues that are to the right of a specified
39 /// point.
40 /// \param val Tags are added or removed for val +ve or -ve
41 void tag_eigenvalues_right(const int &val);
42
43 /// Tag those eigenvalues that are to the left of a specified
44 /// point.
45 /// \param val Tags are added or removed for val +ve or -ve
46 void tag_eigenvalues_left(const int &val);
47
48 /// Tag those eigenvalues that are in the upper half-plane above a
49 /// specified point.
50 /// \param val Tags are added or removed for val +ve or -ve
51 void tag_eigenvalues_upper(const int &val);
52
53 /// Tag those eigenvalues that are in the lower half-plane below a specified
54 /// point.
55 /// \param val Tags are added or removed for val +ve or -ve
56 void tag_eigenvalues_lower(const int &val);
57
58 /// Tag those eigenvalues that are within a disc centred
59 /// at a point in the complex plane.
60 /// \param val Tags are added or removed for val +ve or -ve
61 /// \param radius The radius of the disc to be considered
62 void tag_eigenvalues_disc(const int &val,
63 const double &radius);
64
65 /// Get the the tagged eigenvalues. All of the tagged eigenvalues
66 /// are returned in a complex vector, with no ordering guaranteed.
67 /// \return The tagged eigenvalues as a complex vector
69
70 /// Get the the tagged eigenvectors. All of the eigenvectors associated
71 /// with the tagged eigenvalues are returned, with the i-th eigenvector corresponding
72 /// to the i-th eigenvalue as returned by the get_tagged_eigenvalues method.
73 /// The i-th eigenvector is returned in row i of the complex dense matrix.
74 /// \return The tagged eigenvectors as a complex matrix
76
77 private:
78
79 /// Solve the generalised eigenproblem and compute eigenvectors
80 void eigensolve_lapack_with_vectors();
81
82 /// Solve the generalised eigenproblem without eigenvectors
83 void eigensolve_lapack_without_vectors();
84
85 /// storage for eigenvectors and eigenvalues
86 DenseVector<D_complex> m_eigenvalues_alpha;
87 DenseVector<D_complex> m_eigenvalues_beta;
88
89 /// pointers to the associated matrices
92
93 };
94
95} //end namepsace
96#endif
Specification of the linear eigensystem base class.
Some standard typedefs.
A linear Nth-order generalised eigensystem class.
void tag_eigenvalues_right(const int &val)
Tag those eigenvalues that are to the right of a specified point.
void tag_eigenvalues_disc(const int &val, const double &radius)
Tag those eigenvalues that are within a disc centred at a point in the complex plane.
DenseVector< D_complex > get_tagged_eigenvalues() const
Get the the tagged eigenvalues.
void eigensolve()
Solve the matrix linear eigensystem.
void tag_eigenvalues_lower(const int &val)
Tag those eigenvalues that are in the lower half-plane below a specified point.
void tag_eigenvalues_left(const int &val)
Tag those eigenvalues that are to the left of a specified point.
void tag_eigenvalues_upper(const int &val)
Tag those eigenvalues that are in the upper half-plane above a specified point.
DenseMatrix< D_complex > get_tagged_eigenvectors() const
Get the the tagged eigenvectors.
~DenseLinearEigenSystem()
Destructor for a linear system object.
A matrix class that constructs a DENSE matrix as a row major std::vector of DenseVectors.
Definition: DenseMatrix.h:25
An DenseVector class – a dense vector object.
Definition: DenseVector.h:34
A linear Nth-order generalised eigensystem base class.
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...

© 2012

R.E. Hewitt