Spectral Integral Suite in C++
|
This class holds a matrix of Chebfuns. More...
#include <sis.hpp>
Public Member Functions | |
ChebfunMat () | |
Null constructor. More... | |
ChebfunMat (int r_, int c_) | |
Initializes a Chebfun Matrix of r_ rows and c_ columns. More... | |
ChebfunMat (const ChebfunMat< T > &in) | |
Copy constructor. More... | |
void | operator= (const ChebfunMat &in) |
Assignment operator. More... | |
void | operator= (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &in) |
Assigning a ChebfunMat using a Eigen-matrix. Eigen-Matrix should be of size (r*(N+1), c), else an error is thrown. This implies that one must have called the resize(r,c) function before using this. More... | |
ChebfunMat< T > & | operator<< (T b) |
Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type of constant. More... | |
Chebfun< T > & | operator[] (int i) |
Use this to to refer to Chebfuns. For 1D Matrices, we use the Row major format when refering to [i]. See wiki for row-major format. More... | |
Chebfun< T > & | operator() (int i, int j) |
Use this to to refer to Chebfuns. For 2D Matrices, refer to matrix element Chebfun by (i,j) with the row and column index. Indices start from 0. More... | |
void | p2c () |
Converts every element to Cheb-space, if not already in Cheb-space. More... | |
void | c2p () |
Converts every element to phys-space, if not already in phys-space. More... | |
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | operator() (T p) |
Use this to evaluate the whole ChebfunMat at a given point. Point must lie in the domain, [-1,1]. More... | |
ChebfunMat< T > & | operator<< (Eigen::Array< T, Eigen::Dynamic, 1 > b) |
Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type Eigen array. More... | |
ChebfunMat< T > & | operator<< (std::valarray< T > b) |
Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type valarray. More... | |
ChebfunMat< T > & | operator<< (Chebfun< T > b) |
Use this to input multiple Chebfuns to the ChebfunMat using comma. More... | |
void | resize (int r_, int c_) |
This clears all contents in the ChebfunMat, and then creates a fresh ChebfunMat of size r_ x c_. More... | |
ChebfunMat< T > & | operator, (T b) |
Overloads comma separator to input Chebfuns into a ChebfunMat. Input type constant. More... | |
ChebfunMat< T > & | operator, (Eigen::Array< T, Eigen::Dynamic, 1 > b) |
Overloads comma separator to input Chebfuns into a ChebfunMat. Input type Eigen array. More... | |
ChebfunMat< T > & | operator, (std::valarray< T > b) |
Overloads comma separator to input Chebfuns into a ChebfunMat. Input type valarray. More... | |
ChebfunMat< T > & | operator, (Chebfun< T > b) |
Overloads comma separator to input Chebfuns into a ChebfunMat. Input type Chebfun. More... | |
void | setConstant (double in) |
sets the all the Chebfuns in the ChebfunMat to constant More... | |
ChebfunMat< T > | cTranspose () |
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | ChebfunMat2EigenMat () |
Returns an Eigen matrix representing the ChebfunMat. More... | |
Public Attributes | |
int | r |
Number of rows. More... | |
int | c |
Number of columns. More... | |
std::valarray< Chebfun< T > > | ChebfunVec |
This 1D vector of Chebfuns holds all Chebfuns of the ChebfunMat in the row-major format. More... | |
This class holds a matrix of Chebfuns.
|
inline |
|
inline |
Initializes a Chebfun Matrix of r_ rows and c_ columns.
Definition at line 2023 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::ChebfunVec, and sis::ChebfunMat< T >::r.
|
inline |
Copy constructor.
Definition at line 2031 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::ChebfunVec, sis::ChebfunMat< T >::r, and sis::ChebfunMat< T >::resize().
|
inline |
Converts every element to phys-space, if not already in phys-space.
Definition at line 2104 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< T >::r, and SIS_CHEB_SPACE.
Referenced by sis::GeneralizedEigenSolver< std::complex< T > >::compute(), and sis::linSolve().
|
inline |
Returns an Eigen matrix representing the ChebfunMat.
Definition at line 2227 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::N, sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< T >::r, and SIS_CHEB_SPACE.
Referenced by sis::linSolve().
|
inline |
Definition at line 2214 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::conj(), sis::ChebfunMat< T >::r, and sis::ChebfunMat< T >::resize().
|
inline |
Use this to to refer to Chebfuns. For 2D Matrices, refer to matrix element Chebfun by (i,j) with the row and column index. Indices start from 0.
Definition at line 2090 of file sis.hpp.
References sis::ChebfunMat< T >::c, and sis::ChebfunMat< T >::ChebfunVec.
Referenced by sis::ChebfunMat< T >::c2p(), sis::ChebfunMat< std::complex< T > >::c2p(), sis::ChebfunMat< T >::ChebfunMat2EigenMat(), sis::ChebfunMat< std::complex< T > >::ChebfunMat2EigenMat(), sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< std::complex< T > >::operator()(), sis::ChebfunMat< T >::operator=(), sis::ChebfunMat< std::complex< T > >::operator=(), sis::ChebfunMat< T >::p2c(), sis::ChebfunMat< std::complex< T > >::p2c(), sis::ChebfunMat< T >::setConstant(), and sis::ChebfunMat< std::complex< T > >::setConstant().
|
inline |
Use this to evaluate the whole ChebfunMat at a given point. Point must lie in the domain, [-1,1].
Definition at line 2118 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::operator()(), and sis::ChebfunMat< T >::r.
|
inline |
Overloads comma separator to input Chebfuns into a ChebfunMat. Input type constant.
Definition at line 2175 of file sis.hpp.
References sis::ChebfunMat< T >::ChebfunVec.
|
inline |
Overloads comma separator to input Chebfuns into a ChebfunMat. Input type Eigen array.
Definition at line 2182 of file sis.hpp.
References sis::ChebfunMat< T >::ChebfunVec, and sis::N.
|
inline |
Overloads comma separator to input Chebfuns into a ChebfunMat. Input type valarray.
Definition at line 2192 of file sis.hpp.
References sis::ChebfunMat< T >::ChebfunVec.
|
inline |
Overloads comma separator to input Chebfuns into a ChebfunMat. Input type Chebfun.
Definition at line 2199 of file sis.hpp.
References sis::ChebfunMat< T >::ChebfunVec.
|
inline |
Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type of constant.
Definition at line 2073 of file sis.hpp.
References sis::ChebfunMat< T >::ChebfunVec.
|
inline |
Use this to input multiple Chebfuns to the ChebfunMat using comma.
Definition at line 2157 of file sis.hpp.
References sis::ChebfunMat< T >::ChebfunVec.
|
inline |
Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type Eigen array.
Definition at line 2136 of file sis.hpp.
References sis::ChebfunMat< T >::ChebfunVec, and sis::N.
|
inline |
Use this to input multiple Chebfuns to the ChebfunMat using comma separators. Input type valarray.
Definition at line 2148 of file sis.hpp.
References sis::ChebfunMat< T >::ChebfunVec.
|
inline |
Assignment operator.
Definition at line 2041 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::ChebfunVec, sis::ChebfunMat< T >::r, and sis::ChebfunMat< T >::resize().
|
inline |
Assigning a ChebfunMat using a Eigen-matrix. Eigen-Matrix should be of size (r*(N+1), c), else an error is thrown. This implies that one must have called the resize(r,c) function before using this.
Definition at line 2055 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::N, sis::ChebfunMat< T >::operator()(), and sis::ChebfunMat< T >::r.
|
inline |
Use this to to refer to Chebfuns. For 1D Matrices, we use the Row major format when refering to [i]. See wiki for row-major format.
Definition at line 2082 of file sis.hpp.
References sis::ChebfunMat< T >::ChebfunVec.
|
inline |
Converts every element to Cheb-space, if not already in Cheb-space.
Definition at line 2093 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< T >::r, and SIS_PHYS_SPACE.
Referenced by main().
|
inline |
This clears all contents in the ChebfunMat, and then creates a fresh ChebfunMat of size r_ x c_.
Definition at line 2166 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::ChebfunVec, and sis::ChebfunMat< T >::r.
Referenced by sis::ChebfunMat< T >::ChebfunMat(), sis::ChebfunMat< std::complex< T > >::ChebfunMat(), sis::EigenSorter< T >::compute(), sis::GeneralizedEigenSolver< std::complex< T > >::compute(), sis::conj(), sis::ChebfunMat< T >::cTranspose(), sis::ChebfunMat< std::complex< T > >::cTranspose(), sis::diff(), sis::GeneralizedEigenSolver< std::complex< T > >::keep(), sis::GeneralizedEigenSolver< std::complex< T > >::keepConverged(), sis::operator*(), sis::operator+(), sis::ChebfunMat< T >::operator=(), sis::ChebfunMat< std::complex< T > >::operator=(), and sis::GeneralizedEigenSolver< std::complex< T > >::removeInf().
|
inline |
sets the all the Chebfuns in the ChebfunMat to constant
Definition at line 2206 of file sis.hpp.
References sis::ChebfunMat< T >::c, sis::ChebfunMat< T >::operator()(), and sis::ChebfunMat< T >::r.
int sis::ChebfunMat< T >::c |
Number of columns.
Definition at line 2015 of file sis.hpp.
Referenced by sis::ChebfunMat< T >::c2p(), sis::ChebfunMat< std::complex< T > >::c2p(), sis::ChebfunMat< T >::ChebfunMat(), sis::ChebfunMat< std::complex< T > >::ChebfunMat(), sis::ChebfunMat< T >::ChebfunMat2EigenMat(), sis::ChebfunMat< std::complex< T > >::ChebfunMat2EigenMat(), sis::conj(), sis::ChebfunMat< T >::cTranspose(), sis::ChebfunMat< std::complex< T > >::cTranspose(), sis::diff(), sis::GeneralizedEigenSolver< std::complex< T > >::keep(), sis::GeneralizedEigenSolver< std::complex< T > >::keepConverged(), sis::linSolve(), sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< std::complex< T > >::operator()(), sis::LinopMat< std::complex< T > >::operator()(), sis::operator*(), sis::operator+(), sis::ChebfunMat< T >::operator=(), sis::ChebfunMat< std::complex< T > >::operator=(), sis::ChebfunMat< T >::p2c(), sis::ChebfunMat< std::complex< T > >::p2c(), sis::GeneralizedEigenSolver< std::complex< T > >::removeInf(), sis::ChebfunMat< T >::resize(), sis::ChebfunMat< std::complex< T > >::resize(), sis::ChebfunMat< T >::setConstant(), sis::ChebfunMat< std::complex< T > >::setConstant(), and sis::GeneralizedEigenSolver< std::complex< T > >::sortByLargestReal().
std::valarray<Chebfun<T> > sis::ChebfunMat< T >::ChebfunVec |
This 1D vector of Chebfuns holds all Chebfuns of the ChebfunMat in the row-major format.
Definition at line 2018 of file sis.hpp.
Referenced by sis::ChebfunMat< T >::ChebfunMat(), sis::ChebfunMat< std::complex< T > >::ChebfunMat(), sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< std::complex< T > >::operator()(), sis::ChebfunMat< T >::operator,(), sis::ChebfunMat< std::complex< T > >::operator,(), sis::ChebfunMat< T >::operator<<(), sis::ChebfunMat< std::complex< T > >::operator<<(), sis::ChebfunMat< T >::operator=(), sis::ChebfunMat< std::complex< T > >::operator=(), sis::ChebfunMat< T >::operator[](), sis::ChebfunMat< std::complex< T > >::operator[](), sis::ChebfunMat< T >::resize(), and sis::ChebfunMat< std::complex< T > >::resize().
int sis::ChebfunMat< T >::r |
Number of rows.
Definition at line 2013 of file sis.hpp.
Referenced by sis::ChebfunMat< T >::c2p(), sis::ChebfunMat< std::complex< T > >::c2p(), sis::ChebfunMat< T >::ChebfunMat(), sis::ChebfunMat< std::complex< T > >::ChebfunMat(), sis::ChebfunMat< T >::ChebfunMat2EigenMat(), sis::ChebfunMat< std::complex< T > >::ChebfunMat2EigenMat(), sis::conj(), sis::ChebfunMat< T >::cTranspose(), sis::ChebfunMat< std::complex< T > >::cTranspose(), sis::diff(), sis::GeneralizedEigenSolver< std::complex< T > >::keep(), sis::GeneralizedEigenSolver< std::complex< T > >::keepConverged(), sis::linSolve(), sis::ChebfunMat< T >::operator()(), sis::ChebfunMat< std::complex< T > >::operator()(), sis::LinopMat< std::complex< T > >::operator()(), sis::operator*(), sis::operator+(), sis::ChebfunMat< T >::operator=(), sis::ChebfunMat< std::complex< T > >::operator=(), sis::ChebfunMat< T >::p2c(), sis::ChebfunMat< std::complex< T > >::p2c(), sis::GeneralizedEigenSolver< std::complex< T > >::removeInf(), sis::ChebfunMat< T >::resize(), sis::ChebfunMat< std::complex< T > >::resize(), sis::ChebfunMat< T >::setConstant(), sis::ChebfunMat< std::complex< T > >::setConstant(), and sis::GeneralizedEigenSolver< std::complex< T > >::sortByLargestReal().