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

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...
 

Detailed Description

template<class T>
class sis::ChebfunMat< T >

This class holds a matrix of Chebfuns.

Definition at line 2004 of file sis.hpp.

Constructor & Destructor Documentation

◆ ChebfunMat() [1/3]

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

Null constructor.

Definition at line 2020 of file sis.hpp.

◆ ChebfunMat() [2/3]

template<class T>
sis::ChebfunMat< T >::ChebfunMat ( int  r_,
int  c_ 
)
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.

◆ ChebfunMat() [3/3]

template<class T>
sis::ChebfunMat< T >::ChebfunMat ( const ChebfunMat< T > &  in)
inline

Member Function Documentation

◆ c2p()

template<class T>
void sis::ChebfunMat< T >::c2p ( )
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().

◆ ChebfunMat2EigenMat()

template<class T>
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> sis::ChebfunMat< T >::ChebfunMat2EigenMat ( )
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().

◆ cTranspose()

template<class T>
ChebfunMat<T> sis::ChebfunMat< T >::cTranspose ( )
inline

◆ operator()() [1/2]

◆ operator()() [2/2]

template<class T>
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic > sis::ChebfunMat< T >::operator() ( p)
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.

◆ operator,() [1/4]

template<class T>
ChebfunMat<T>& sis::ChebfunMat< T >::operator, ( b)
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.

◆ operator,() [2/4]

template<class T>
ChebfunMat<T>& sis::ChebfunMat< T >::operator, ( Eigen::Array< T, Eigen::Dynamic, 1 >  b)
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.

◆ operator,() [3/4]

template<class T>
ChebfunMat<T>& sis::ChebfunMat< T >::operator, ( std::valarray< T >  b)
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.

◆ operator,() [4/4]

template<class T>
ChebfunMat<T>& sis::ChebfunMat< T >::operator, ( Chebfun< T >  b)
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.

◆ operator<<() [1/4]

template<class T>
ChebfunMat<T>& sis::ChebfunMat< T >::operator<< ( b)
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.

◆ operator<<() [2/4]

template<class T>
ChebfunMat<T>& sis::ChebfunMat< T >::operator<< ( Chebfun< T >  b)
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.

◆ operator<<() [3/4]

template<class T>
ChebfunMat<T>& sis::ChebfunMat< T >::operator<< ( Eigen::Array< T, Eigen::Dynamic, 1 >  b)
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.

◆ operator<<() [4/4]

template<class T>
ChebfunMat<T>& sis::ChebfunMat< T >::operator<< ( std::valarray< T >  b)
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.

◆ operator=() [1/2]

template<class T>
void sis::ChebfunMat< T >::operator= ( const ChebfunMat< T > &  in)
inline

◆ operator=() [2/2]

template<class T>
void sis::ChebfunMat< T >::operator= ( const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &  in)
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.

◆ operator[]()

template<class T>
Chebfun<T>& sis::ChebfunMat< T >::operator[] ( int  i)
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.

◆ p2c()

template<class T>
void sis::ChebfunMat< T >::p2c ( )
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().

◆ resize()

◆ setConstant()

template<class T>
void sis::ChebfunMat< T >::setConstant ( double  in)
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.

Member Data Documentation

◆ c

◆ ChebfunVec

◆ r


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