Spectral Integral Suite in C++
|
#include <sis.hpp>
Public Member Functions | |
GeneralizedEigenSolver () | |
Null constructor. More... | |
void | compute (const LinopMat< std::complex< T > > &Lmat_, int num_vals, const BcMat< std::complex< T > > &bc_) |
Call this with an input Linear operator to solve for eigenvalues and vectors. The number of Eigen values/vectors is num_vals, num_vals has to be less than N*r. More... | |
void | compute (const LinopMat< std::complex< T > > &Lmat_, const BcMat< std::complex< T > > &bc_) |
Call this with an input Linear operator to solve for eigenvalues and vectors. More... | |
void | compute (const LinopMat< std::complex< T > > &Lmat_, const LinopMat< std::complex< T > > &Mmat_, int num_vals, const BcMat< std::complex< T > > &Lbc_) |
The main solver for LinopMat. Read about class BcMat to see how this works, also see examples example/Ex_16.cpp and test/Visco_3D_pipe.cpp of how this is applied. This function is useful when boundary conditions are mixed between variables. Also, if you have boundary conditions that have an associated eigenvalue, see compute_with_constraints. More... | |
void | computeAppend (const LinopMat< std::complex< T > > &Lmat_, const LinopMat< std::complex< T > > &Mmat_, int num_vals, const BcMat< std::complex< T > > &Lbc_) |
Another main solver for LinopMat, a minimal solver for eigenvalues only. LAPACK needs to be linked to use this, and SIS_USE_LAPACK has to be defined. More... | |
void | compute_with_constraints (const LinopMat< std::complex< T > > &Lmat_, const LinopMat< std::complex< T > > &Mmat_, int num_vals, const BcMat< std::complex< T > > &Lbc_, const BcMat< std::complex< T > > &Mbc_) |
void | sortByLargestReal () |
This function will sort the eigenvalues and vectors by the largest real part. More... | |
void | keepConverged () |
This will remove all unconverged and infinite eigenvalues from the list. More... | |
void | keep (int n) |
This will keep only n and remove the rest. Use this carefully. Only first n will be kept, irrespective of convergence. More... | |
void | removeInf () |
This will remove all infinite eigenvalues. Useful when solving generalized eigenvalue problems. More... | |
void | compute (const Eigen::Matrix< std::complex< T >, Eigen::Dynamic, Eigen::Dynamic > &L_, const Eigen::Matrix< std::complex< T >, Eigen::Dynamic, Eigen::Dynamic > &M_, Discretize< std::complex< T > > Dis) |
This is used to use a discretization to compute eigenvalues. More... | |
Public Attributes | |
ChebfunMat< std::complex< T > > | eigenvectors |
Eigen::Matrix< std::complex< T >, Eigen::Dynamic, 1 > | eigenvalues |
Eigen::Matrix< int, Eigen::Dynamic, 1 > | MPorNot |
int | converged |
Number of eigenvalues that have converged to machine precision. More... | |
|
inline |
|
inline |
Call this with an input Linear operator to solve for eigenvalues and vectors. The number of Eigen values/vectors is num_vals, num_vals has to be less than N*r.
Definition at line 5248 of file sis.hpp.
References sis::GeneralizedEigenSolver< T >::compute(), and sis::LinopMat< T >::setIdentity().
|
inline |
Call this with an input Linear operator to solve for eigenvalues and vectors.
Definition at line 5257 of file sis.hpp.
References sis::GeneralizedEigenSolver< T >::compute(), sis::N, and sis::LinopMat< T >::setIdentity().
|
inline |
The main solver for LinopMat. Read about class BcMat to see how this works, also see examples example/Ex_16.cpp and test/Visco_3D_pipe.cpp of how this is applied. This function is useful when boundary conditions are mixed between variables. Also, if you have boundary conditions that have an associated eigenvalue, see compute_with_constraints.
Definition at line 5270 of file sis.hpp.
References sis::LinopMat< T >::c, sis::ChebfunMat< T >::c2p(), sis::MatGen< T >::compute(), sis::GeneralizedEigenSolver< T >::eigenvalues, sis::MatGen< T >::mats2, sis::N, sis::LinopMat< T >::r, std::real(), sis::ChebfunMat< T >::resize(), and SIS_CHEB_SPACE.
|
inline |
This is used to use a discretization to compute eigenvalues.
Definition at line 7556 of file sis.hpp.
References sis::ChebfunMat< T >::c2p(), sis::MatGen< T >::compute(), sis::GeneralizedEigenSolver< T >::eigenvalues, sis::MatGen< T >::mats2, sis::N, std::real(), sis::ChebfunMat< T >::resize(), and SIS_CHEB_SPACE.
|
inline |
Use this to solve eigenvalue problems where eigenvalues appears in the boundary condition, example, in eigenvalue problems with fluid-fluid interfaces. Again solvability must hold. That total of all the highest orders of every independent variable has to be equal to the total number of boundary conditions specified + the number of constraints. Further, please ensure that the boundary conditions and constraints are linearly independent, else this will throw an error.
|
inline |
Another main solver for LinopMat, a minimal solver for eigenvalues only. LAPACK needs to be linked to use this, and SIS_USE_LAPACK has to be defined.
This appends constraints instead of embedding them, useful for large matrix problems. Also this routine does not compute eigenvectors (may be updated in the future).
Read about class BcMat to see how this works, also see examples example/Ex_16.cpp and test/Visco_3D_pipe.cpp of how this is applied.
Definition at line 5970 of file sis.hpp.
References sis::LinopMat< T >::c, sis::MatGen< T >::compute(), sis::GeneralizedEigenSolver< T >::eigenvalues, sis::MatGen< T >::mats2, sis::N, sis::LinopMat< T >::r, and std::real().
|
inline |
This will keep only n and remove the rest. Use this carefully. Only first n will be kept, irrespective of convergence.
Definition at line 7468 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::GeneralizedEigenSolver< T >::eigenvalues, sis::ChebfunMat< T >::r, and sis::ChebfunMat< T >::resize().
|
inline |
This will remove all unconverged and infinite eigenvalues from the list.
Definition at line 7431 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::GeneralizedEigenSolver< T >::eigenvalues, sis::ChebfunMat< T >::r, and sis::ChebfunMat< T >::resize().
|
inline |
This will remove all infinite eigenvalues. Useful when solving generalized eigenvalue problems.
Definition at line 7501 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::GeneralizedEigenSolver< T >::eigenvalues, std::imag(), sis::ChebfunMat< T >::r, std::real(), and sis::ChebfunMat< T >::resize().
|
inline |
This function will sort the eigenvalues and vectors by the largest real part.
Definition at line 7387 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::GeneralizedEigenSolver< T >::eigenvalues, and sis::ChebfunMat< T >::r.
int sis::GeneralizedEigenSolver< std::complex< T > >::converged |
Eigen::Matrix<std::complex<T>, Eigen::Dynamic, 1> sis::GeneralizedEigenSolver< std::complex< T > >::eigenvalues |
ChebfunMat<std::complex<T> > sis::GeneralizedEigenSolver< std::complex< T > >::eigenvectors |
Eigen::Matrix<int, Eigen::Dynamic, 1> sis::GeneralizedEigenSolver< std::complex< T > >::MPorNot |