Spectral Integral Suite in C++
sis::GeneralizedEigenSolver< T > Class Template Reference

This class will solve the generalized eigenvalue problem for two linear operators. One of them can be singular. More...

#include <sis.hpp>

Inheritance diagram for sis::GeneralizedEigenSolver< T >:

Public Member Functions

 GeneralizedEigenSolver ()
 Null constructor. More...
 
void compute (Linop< T > L, Linop< T > M, int num_vals)
 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. More...
 
void compute (const LinopMat< T > &Lmat_, const LinopMat< T > &Mmat_, int num_vals, const BcMat< T > &Lbc_)
 This will use do the same work as compute(), but will overide all boundary conditions specified through BcVec and use the input BcMat instead. 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 compute_with_constraints (const LinopMat< T > &Lmat_, const LinopMat< T > &Mmat_, int num_vals, const BcMat< T > &Lbc_, const BcMat< T > &Mbc_)
 
void compute_with_constraints (const LinopMat< T > &Lmat_, const LinopMat< T > &Mmat_, int num_vals, const BcMat< T > &Lbc_embed_, const BcMat< T > &Lbc_append_, const BcMat< T > &Mbc_append_)
 

Public Attributes

std::vector< ChebfunMat< std::complex< T > > > eigenvectorsMat
 
Eigen::Matrix< std::complex< T >, Eigen::Dynamic, 1 > eigenvalues
 

Detailed Description

template<class T>
class sis::GeneralizedEigenSolver< T >

This class will solve the generalized eigenvalue problem for two linear operators. One of them can be singular.

Solves for

\[ \boldmath{L}\phi = \lambda \boldmath{M} \phi \]

.

Definition at line 3253 of file sis.hpp.

Constructor & Destructor Documentation

◆ GeneralizedEigenSolver()

template<class T>
sis::GeneralizedEigenSolver< T >::GeneralizedEigenSolver ( )
inline

Null constructor.

Definition at line 3259 of file sis.hpp.

Member Function Documentation

◆ compute() [1/2]

template<class T>
void sis::GeneralizedEigenSolver< T >::compute ( Linop< T >  L,
Linop< T >  M,
int  num_vals 
)
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.

Definition at line 3267 of file sis.hpp.

Referenced by sis::GeneralizedEigenSolver< std::complex< T > >::compute(), sis::SingularValueDecomposition< T >::compute(), and main().

◆ compute() [2/2]

template<class T>
void sis::GeneralizedEigenSolver< T >::compute ( const LinopMat< T > &  Lmat_,
const LinopMat< T > &  Mmat_,
int  num_vals,
const BcMat< T > &  Lbc_ 
)
inline

This will use do the same work as compute(), but will overide all boundary conditions specified through BcVec and use the input BcMat instead. 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 3276 of file sis.hpp.

References sis::LinopMat< T >::c, sis::MatGen< T >::compute(), sis::GeneralizedEigenSolver< T >::eigenvalues, sis::GeneralizedEigenSolver< T >::eigenvectorsMat, sis::MatGen< T >::mats2, sis::N, sis::LinopMat< T >::r, std::real(), and SIS_CHEB_SPACE.

◆ compute_with_constraints() [1/2]

template<class T>
void sis::GeneralizedEigenSolver< T >::compute_with_constraints ( const LinopMat< T > &  Lmat_,
const LinopMat< T > &  Mmat_,
int  num_vals,
const BcMat< T > &  Lbc_,
const BcMat< T > &  Mbc_ 
)
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.

Definition at line 3827 of file sis.hpp.

References sis::LinopMat< T >::c, sis::MatGen< T >::compute(), sis::MatGen< T >::con_mats, sis::GeneralizedEigenSolver< T >::eigenvalues, sis::GeneralizedEigenSolver< T >::eigenvectorsMat, sis::MatGen< T >::mats, sis::MatGen< T >::mats2, sis::N, sis::LinopMat< T >::r, std::real(), sis::LinopMat< T >::resize(), sis::LinopMat< T >::setConstant(), and SIS_CHEB_SPACE.

◆ compute_with_constraints() [2/2]

template<class T>
void sis::GeneralizedEigenSolver< T >::compute_with_constraints ( const LinopMat< T > &  Lmat_,
const LinopMat< T > &  Mmat_,
int  num_vals,
const BcMat< T > &  Lbc_embed_,
const BcMat< T > &  Lbc_append_,
const BcMat< T > &  Mbc_append_ 
)
inline

This is the most generic form of the eigenvalue solver, in which boundary conditions that don't have an associated eigenvalue are to be embedded ( using Lbc_embed_), and boundary conditions that have an associated eigevalue associated are to be appended. This means that you can go about solving problems where you would append boundary conditions anyway, instead of embedding them, see the example in our paper, and example/Ex_19.cpp.

Definition at line 4603 of file sis.hpp.

References sis::LinopMat< T >::c, sis::MatGen< T >::compute(), sis::GeneralizedEigenSolver< T >::eigenvalues, sis::GeneralizedEigenSolver< T >::eigenvectorsMat, sis::MatGen< T >::mats2, sis::N, sis::LinopMat< T >::r, std::real(), and SIS_CHEB_SPACE.

Member Data Documentation

◆ eigenvalues

◆ eigenvectorsMat

template<class T>
std::vector<ChebfunMat<std::complex<T> > > sis::GeneralizedEigenSolver< T >::eigenvectorsMat

The documentation for this class was generated from the following file: