Spectral Integral Suite in C++
sis::SingularValueDecomposition< std::complex< T > > Class Template Reference

This class computes various SingularValues of a differential block matrix operator using using it's adjoint. Class has various utilities, like computing the adjoint, adjoint boundary conditions, and also computing singular values of the frequency response operator. More...

#include <sis.hpp>

Inheritance diagram for sis::SingularValueDecomposition< std::complex< T > >:
Collaboration diagram for sis::SingularValueDecomposition< std::complex< T > >:

Public Member Functions

 SingularValueDecomposition ()
 
void compute (const LinopMat< std::complex< T > > &A_, const BcMat< std::complex< T > > &Lbc_, const BcMat< std::complex< T > > &Rbc_, int num_vals)
 Computes the singular values/functions of a Linear block matrix operator. More...
 
void compute (const LinopMat< std::complex< T > > &A_, const LinopMat< std::complex< T > > &B_, const LinopMat< std::complex< T > > &C_, const BcMat< std::complex< T > > &Lbc_, const BcMat< std::complex< T > > &Rbc_, int num_vals)
 Computes singular values of the frequency response operator of a system in the input-output form,

\begin{align} [\mathcal{A}\,\psi(\cdot)](y) \;&=\; [\mathcal{B}\,\boldmath{d}(\cdot)](y)\\ \phi(y) \;&=\; \mathcal{C}\,\psi(y), \end{align}

. More...

 
std::complex< T > PowerSpectralDensity (const LinopMat< std::complex< T > > &A_, const LinopMat< std::complex< T > > &B_, const LinopMat< std::complex< T > > &C_, const BcMat< std::complex< T > > &Lbc_, const BcMat< std::complex< T > > &Rbc_)
 Computes power spectral density from the frequency response operator of a system in the input-output form,

\begin{align} [\mathcal{A}\,\psi(\cdot)](y) \;&=\; [\mathcal{B}\,\boldmath{d}(\cdot)](y)\\ \phi(y) \;&=\; \mathcal{C}\,\psi(y), \end{align}

. Power spectral density is the sum of squares of the singular values. More...

 
std::complex< T > PowerSpectralDensity (const LinopMat< std::complex< T > > &A_, const LinopMat< std::complex< T > > &B_, const LinopMat< std::complex< T > > &C_, const BcMat< std::complex< T > > &Lbc_, const BcMat< std::complex< T > > &Rbc_, const BcMat< std::complex< T > > &Lbc_adjoint_, const BcMat< std::complex< T > > &Rbc_adjoint_)
 
std::valarray< std::complex< T > > PowerSpectralDensityIndividual (const LinopMat< std::complex< T > > &A_, const LinopMat< std::complex< T > > &B_, const LinopMat< std::complex< T > > &C1_, const LinopMat< std::complex< T > > &C2_, const LinopMat< std::complex< T > > &C3_, const BcMat< std::complex< T > > &Lbc_, const BcMat< std::complex< T > > &Rbc_)
 
void compute (const LinopMat< std::complex< T > > &A_, const LinopMat< std::complex< T > > &B_, const LinopMat< std::complex< T > > &C_, const BcMat< std::complex< T > > &Lbc_, const BcMat< std::complex< T > > &Rbc_, const BcMat< std::complex< T > > &Lbc_adjoint_, const BcMat< std::complex< T > > &Rbc_adjoint_, int num_vals)
 Computes singular values of the frequency response operator of a system in the input-output form,

\begin{align} [\mathcal{A}\,\psi(\cdot)](y) \;&=\; [\mathcal{B}\,\boldmath{d}(\cdot)](y)\\ \phi(y) \;&=\; \mathcal{C}\,\psi(y), \end{align}

. When using this, you need to explicitly specify the adjoint boundary conditions. This is useful in certain discriptor systems. More...

 
void HinfNorm (const LinopMat< std::complex< T > > &E_, const LinopMat< std::complex< T > > &A_, const LinopMat< std::complex< T > > &B_, const LinopMat< std::complex< T > > &C_, const BcMat< std::complex< T > > &Lbc_, const BcMat< std::complex< T > > &Rbc_, const BcMat< std::complex< T > > &Lbc_adjoint_, const BcMat< std::complex< T > > &Rbc_adjoint_)
 Computes the H-infinity norm of a system in the input-output form,

\begin{align} [\mathcal{I\omega E - A}\,\psi(\cdot)](y) \;&=\; [\mathcal{B}\,\boldmath{d}(\cdot)](y) \phi(y) \;&=\; \mathcal{C}\,\psi(y), \end{align}

. Still needs validation and improvement. Works only for the evolution form. More...

 
LinopMat< std::complex< T > > Adjoint (const LinopMat< std::complex< T > > &Lmat_)
 Computes the formal adjoint of a Linear operator. This is a differential adjoint, and not the conjugate transpose of the operators in the LinopMat. To get the latter, use cTranspose(); Adjoints are for generic discriptor systems, like \(M\partial_{t}\phi(y) = L\phi(y)\). More...
 
BcMat< std::complex< T > > AdjointBc_analytical (const LinopMat< std::complex< T > > &Lmat_, const BcMat< std::complex< T > > &Lbc_, const BcMat< std::complex< T > > &Rbc_)
 Computes adjoint boundary conditions analytically, needs boundary conditions all right boundary conditions in rbc, and all left boundary conditions in lbc. All dependent variables need not have boundary conditions specified, but it is essential that the number of boundary conditions be equal to the sum of derivatives of all independent variables, and all the boundary conditions be linearly independent. The adjoint boundary conditions will be returned in the output, as BcMat, will all boundary conditions for left and right in it, in the orders left followed by right. More...
 
- Public Member Functions inherited from sis::GeneralizedEigenSolver< std::complex< T > >
 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

int svd_flag
 
int isSingular
 
double gamma_opt
 This is the H-infinity norm. More...
 
double omega_opt
 This is the value of \(\omega\) at which H-infinity norm occurs. More...
 
- Public Attributes inherited from sis::GeneralizedEigenSolver< std::complex< T > >
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...
 

Detailed Description

template<class T>
class sis::SingularValueDecomposition< std::complex< T > >

This class computes various SingularValues of a differential block matrix operator using using it's adjoint. Class has various utilities, like computing the adjoint, adjoint boundary conditions, and also computing singular values of the frequency response operator.

Definition at line 10278 of file sis.hpp.

Constructor & Destructor Documentation

◆ SingularValueDecomposition()

template<class T >
sis::SingularValueDecomposition< std::complex< T > >::SingularValueDecomposition ( )
inline

Definition at line 10292 of file sis.hpp.

Member Function Documentation

◆ Adjoint()

template<class T >
LinopMat<std::complex<T> > sis::SingularValueDecomposition< std::complex< T > >::Adjoint ( const LinopMat< std::complex< T > > &  Lmat_)
inline

Computes the formal adjoint of a Linear operator. This is a differential adjoint, and not the conjugate transpose of the operators in the LinopMat. To get the latter, use cTranspose(); Adjoints are for generic discriptor systems, like \(M\partial_{t}\phi(y) = L\phi(y)\).

Definition at line 11327 of file sis.hpp.

References sis::diff(), sis::pow(), and sis::LinopMat< T >::resize().

◆ AdjointBc_analytical()

template<class T >
BcMat<std::complex<T> > sis::SingularValueDecomposition< std::complex< T > >::AdjointBc_analytical ( const LinopMat< std::complex< T > > &  Lmat_,
const BcMat< std::complex< T > > &  Lbc_,
const BcMat< std::complex< T > > &  Rbc_ 
)
inline

Computes adjoint boundary conditions analytically, needs boundary conditions all right boundary conditions in rbc, and all left boundary conditions in lbc. All dependent variables need not have boundary conditions specified, but it is essential that the number of boundary conditions be equal to the sum of derivatives of all independent variables, and all the boundary conditions be linearly independent. The adjoint boundary conditions will be returned in the output, as BcMat, will all boundary conditions for left and right in it, in the orders left followed by right.

Definition at line 11505 of file sis.hpp.

References sis::diff(), sis::feval2D(), sis::N, sis::pow(), sis::setChebPts(), and SIS_PHYS_SPACE.

◆ compute() [1/3]

template<class T >
void sis::SingularValueDecomposition< std::complex< T > >::compute ( const LinopMat< std::complex< T > > &  A_,
const BcMat< std::complex< T > > &  Lbc_,
const BcMat< std::complex< T > > &  Rbc_,
int  num_vals 
)
inline

Computes the singular values/functions of a Linear block matrix operator.

Definition at line 10295 of file sis.hpp.

References sis::SingularValueDecomposition< T >::Adjoint(), sis::SingularValueDecomposition< T >::AdjointBc_analytical(), and sis::SingularValueDecomposition< T >::compute().

◆ compute() [2/3]

template<class T >
void sis::SingularValueDecomposition< std::complex< T > >::compute ( const LinopMat< std::complex< T > > &  A_,
const LinopMat< std::complex< T > > &  B_,
const LinopMat< std::complex< T > > &  C_,
const BcMat< std::complex< T > > &  Lbc_,
const BcMat< std::complex< T > > &  Rbc_,
int  num_vals 
)
inline

Computes singular values of the frequency response operator of a system in the input-output form,

\begin{align} [\mathcal{A}\,\psi(\cdot)](y) \;&=\; [\mathcal{B}\,\boldmath{d}(\cdot)](y)\\ \phi(y) \;&=\; \mathcal{C}\,\psi(y), \end{align}

.

Definition at line 10404 of file sis.hpp.

References sis::SingularValueDecomposition< T >::Adjoint(), sis::SingularValueDecomposition< T >::AdjointBc_analytical(), sis::SingularValueDecomposition< T >::compute(), sis::N, SIS_SVD, SIS_SVD_LEFT, and SIS_SVD_RIGHT.

◆ compute() [3/3]

template<class T >
void sis::SingularValueDecomposition< std::complex< T > >::compute ( const LinopMat< std::complex< T > > &  A_,
const LinopMat< std::complex< T > > &  B_,
const LinopMat< std::complex< T > > &  C_,
const BcMat< std::complex< T > > &  Lbc_,
const BcMat< std::complex< T > > &  Rbc_,
const BcMat< std::complex< T > > &  Lbc_adjoint_,
const BcMat< std::complex< T > > &  Rbc_adjoint_,
int  num_vals 
)
inline

Computes singular values of the frequency response operator of a system in the input-output form,

\begin{align} [\mathcal{A}\,\psi(\cdot)](y) \;&=\; [\mathcal{B}\,\boldmath{d}(\cdot)](y)\\ \phi(y) \;&=\; \mathcal{C}\,\psi(y), \end{align}

. When using this, you need to explicitly specify the adjoint boundary conditions. This is useful in certain discriptor systems.

Definition at line 10901 of file sis.hpp.

References sis::SingularValueDecomposition< T >::Adjoint(), sis::SingularValueDecomposition< T >::compute(), sis::N, SIS_SVD, SIS_SVD_LEFT, and SIS_SVD_RIGHT.

◆ HinfNorm()

template<class T >
void sis::SingularValueDecomposition< std::complex< T > >::HinfNorm ( const LinopMat< std::complex< T > > &  E_,
const LinopMat< std::complex< T > > &  A_,
const LinopMat< std::complex< T > > &  B_,
const LinopMat< std::complex< T > > &  C_,
const BcMat< std::complex< T > > &  Lbc_,
const BcMat< std::complex< T > > &  Rbc_,
const BcMat< std::complex< T > > &  Lbc_adjoint_,
const BcMat< std::complex< T > > &  Rbc_adjoint_ 
)
inline

Computes the H-infinity norm of a system in the input-output form,

\begin{align} [\mathcal{I\omega E - A}\,\psi(\cdot)](y) \;&=\; [\mathcal{B}\,\boldmath{d}(\cdot)](y) \phi(y) \;&=\; \mathcal{C}\,\psi(y), \end{align}

. Still needs validation and improvement. Works only for the evolution form.

Definition at line 11167 of file sis.hpp.

◆ PowerSpectralDensity() [1/2]

template<class T >
std::complex<T> sis::SingularValueDecomposition< std::complex< T > >::PowerSpectralDensity ( const LinopMat< std::complex< T > > &  A_,
const LinopMat< std::complex< T > > &  B_,
const LinopMat< std::complex< T > > &  C_,
const BcMat< std::complex< T > > &  Lbc_,
const BcMat< std::complex< T > > &  Rbc_ 
)
inline

Computes power spectral density from the frequency response operator of a system in the input-output form,

\begin{align} [\mathcal{A}\,\psi(\cdot)](y) \;&=\; [\mathcal{B}\,\boldmath{d}(\cdot)](y)\\ \phi(y) \;&=\; \mathcal{C}\,\psi(y), \end{align}

. Power spectral density is the sum of squares of the singular values.

Definition at line 10580 of file sis.hpp.

References sis::SingularValueDecomposition< T >::Adjoint(), and sis::SingularValueDecomposition< T >::AdjointBc_analytical().

◆ PowerSpectralDensity() [2/2]

template<class T >
std::complex<T> sis::SingularValueDecomposition< std::complex< T > >::PowerSpectralDensity ( const LinopMat< std::complex< T > > &  A_,
const LinopMat< std::complex< T > > &  B_,
const LinopMat< std::complex< T > > &  C_,
const BcMat< std::complex< T > > &  Lbc_,
const BcMat< std::complex< T > > &  Rbc_,
const BcMat< std::complex< T > > &  Lbc_adjoint_,
const BcMat< std::complex< T > > &  Rbc_adjoint_ 
)
inline

Definition at line 10676 of file sis.hpp.

References sis::SingularValueDecomposition< T >::Adjoint().

◆ PowerSpectralDensityIndividual()

template<class T >
std::valarray<std::complex<T> > sis::SingularValueDecomposition< std::complex< T > >::PowerSpectralDensityIndividual ( const LinopMat< std::complex< T > > &  A_,
const LinopMat< std::complex< T > > &  B_,
const LinopMat< std::complex< T > > &  C1_,
const LinopMat< std::complex< T > > &  C2_,
const LinopMat< std::complex< T > > &  C3_,
const BcMat< std::complex< T > > &  Lbc_,
const BcMat< std::complex< T > > &  Rbc_ 
)
inline

Member Data Documentation

◆ gamma_opt

template<class T >
double sis::SingularValueDecomposition< std::complex< T > >::gamma_opt

This is the H-infinity norm.

Definition at line 10289 of file sis.hpp.

◆ isSingular

template<class T >
int sis::SingularValueDecomposition< std::complex< T > >::isSingular

Definition at line 10286 of file sis.hpp.

◆ omega_opt

template<class T >
double sis::SingularValueDecomposition< std::complex< T > >::omega_opt

This is the value of \(\omega\) at which H-infinity norm occurs.

Definition at line 10291 of file sis.hpp.

◆ svd_flag

template<class T >
int sis::SingularValueDecomposition< std::complex< T > >::svd_flag

Definition at line 10285 of file sis.hpp.


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