Spectral Integral Suite in C++
|
This is a chebfun analogue. Chebfun will represent both values in physical space or an array of Chebyshev-coefficients. Values can be in either space for calculations. To convert between physical values or Chebyshev coefficients, one can call Chebfun.c2p() and Chebfun.p2c(). More...
#include <sis.hpp>
Public Member Functions | |
Chebfun () | |
Null constructor. More... | |
Chebfun (const std::valarray< T > &in) | |
constructor by an input valarray More... | |
Chebfun (const Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic > &in) | |
constructor by an input Eigen::Array<T,Eigen::Dynamic,1> More... | |
Chebfun (const Chebfun &in) | |
Copy conststructor. More... | |
void | p2c () |
Converts a Chebfun from values in physical-space to coefficients of Chebyshev polynomials. More... | |
void | c2p () |
Converts a Chebfun from Chebyshev coefficients to values in physical space. More... | |
Eigen::Array< T, Eigen::Dynamic, 1 > | ev () |
Returns property v in terms of Eigen::Array. More... | |
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | MultMat () |
This function returns the Toeplitz + almost Hankel matrix needed to express multiplication of two Chebyshev series. This is used in solving for nonconstant coefficients. More... | |
void | operator= (T right) |
Equating the Chebfun to a constant. More... | |
void | operator= (const Chebfun &right) |
To assign a Chebfun through another Chebfun. More... | |
void | operator= (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &right) |
To assign a Chebfun through a vector. More... | |
void | operator= (const std::valarray< T > &right) |
To assign a Chebfun through a valarray. More... | |
void | operator+= (const T &right) |
Adding constant to itself. More... | |
void | operator+= (Chebfun right) |
Add a Chebfun to itself. If both are in same space, return will be in same space, else the lhs will retain space. More... | |
T | operator() (const T &a) |
To assign a Chebfun through a Array. More... | |
Chebfun< T > | cumsum () |
Returns a Chebfun that represents the indefinite integral of the Chebfun. More... | |
T | L2norm () |
Returns the L2norm of the function. More... | |
bool | isMachinePrecision () |
bool | isMachinePrecisionHalf () |
T | trunc () |
Provides the truncation defined in terms of the abs(last + last_but_one)/2.0. More... | |
Public Attributes | |
int | dct_flag |
std::valarray< T > | v |
Stores a flag to denote if function is in Cheb-space or physical space. More... | |
This is a chebfun analogue. Chebfun will represent both values in physical space or an array of Chebyshev-coefficients. Values can be in either space for calculations. To convert between physical values or Chebyshev coefficients, one can call Chebfun.c2p() and Chebfun.p2c().
|
inline |
Null constructor.
By default the function is f(y) =y, with values in physical space.
Definition at line 1160 of file sis.hpp.
References sis::Chebfun< T >::dct_flag, sis::N, PI, SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
|
inline |
constructor by an input valarray
Definition at line 1167 of file sis.hpp.
References sis::Chebfun< T >::dct_flag, sis::N, SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
|
inline |
constructor by an input Eigen::Array<T,Eigen::Dynamic,1>
Definition at line 1178 of file sis.hpp.
References sis::Chebfun< T >::dct_flag, sis::N, SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
|
inline |
Copy conststructor.
Definition at line 1210 of file sis.hpp.
References sis::Chebfun< T >::dct_flag, and sis::Chebfun< T >::v.
|
inline |
Converts a Chebfun from Chebyshev coefficients to values in physical space.
Definition at line 1257 of file sis.hpp.
References sis::Chebfun< T >::dct_flag, sis::rev_half_shift(), SIS_CHEB_SPACE, SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
Referenced by sis::Chebfun< T >::cumsum(), sis::Chebfun< std::complex< T > >::cumsum(), sis::diff(), sis::Chebfun< T >::L2norm(), sis::Chebfun< std::complex< T > >::L2norm(), sis::Chebfun< T >::operator()(), sis::Chebfun< std::complex< T > >::operator()(), sis::operator*(), sis::operator+(), sis::Chebfun< T >::operator+=(), sis::Chebfun< std::complex< T > >::operator+=(), sis::Linop< T >::operator=(), and sis::Linop< std::complex< T > >::operator=().
|
inline |
Returns a Chebfun that represents the indefinite integral of the Chebfun.
Definition at line 1427 of file sis.hpp.
References sis::Chebfun< T >::c2p(), sis::Chebfun< T >::dct_flag, sis::integ(), sis::Chebfun< T >::p2c(), SIS_CHEB_SPACE, SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
|
inline |
Returns property v in terms of Eigen::Array.
Definition at line 1297 of file sis.hpp.
References sis::Chebfun< T >::v.
|
inline |
Definition at line 1461 of file sis.hpp.
References sis::N, and sis::Chebfun< T >::v.
|
inline |
Definition at line 1468 of file sis.hpp.
References sis::N, and sis::Chebfun< T >::v.
|
inline |
Returns the L2norm of the function.
Definition at line 1444 of file sis.hpp.
References sis::Chebfun< T >::c2p(), sis::Chebfun< T >::dct_flag, sis::integ(), sis::Chebfun< T >::p2c(), SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
Referenced by sis::EigenSorter< T >::compute().
|
inline |
This function returns the Toeplitz + almost Hankel matrix needed to express multiplication of two Chebyshev series. This is used in solving for nonconstant coefficients.
To assign a Chebfun to a constant
Definition at line 1309 of file sis.hpp.
References sis::Chebfun< T >::dct_flag, sis::N, sis::Chebfun< T >::p2c(), SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
|
inline |
To assign a Chebfun through a Array.
Evaluate the Chebfun at a point in the domain, i.e., -1 to 1.
Definition at line 1402 of file sis.hpp.
References sis::Chebfun< T >::c2p(), sis::Chebfun< T >::dct_flag, sis::N, sis::Chebfun< T >::p2c(), SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
|
inline |
Adding constant to itself.
Definition at line 1372 of file sis.hpp.
References SIS_CHEB_SPACE, and sis::Chebfun< T >::v.
|
inline |
Add a Chebfun to itself. If both are in same space, return will be in same space, else the lhs will retain space.
Definition at line 1382 of file sis.hpp.
References sis::Chebfun< T >::c2p(), sis::Chebfun< T >::dct_flag, sis::Chebfun< T >::p2c(), SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
|
inline |
Equating the Chebfun to a constant.
Definition at line 1345 of file sis.hpp.
References sis::Chebfun< T >::dct_flag, SIS_CHEB_SPACE, and sis::Chebfun< T >::v.
|
inline |
To assign a Chebfun through another Chebfun.
Definition at line 1355 of file sis.hpp.
References sis::Chebfun< T >::dct_flag, and sis::Chebfun< T >::v.
|
inline |
To assign a Chebfun through a vector.
Definition at line 1361 of file sis.hpp.
References sis::N, and sis::Chebfun< T >::v.
|
inline |
To assign a Chebfun through a valarray.
Definition at line 1368 of file sis.hpp.
References sis::Chebfun< T >::v.
|
inline |
Converts a Chebfun from values in physical-space to coefficients of Chebyshev polynomials.
Definition at line 1217 of file sis.hpp.
References sis::conj(), sis::Chebfun< T >::dct_flag, sis::fft(), sis::half_shift(), std::real(), SIS_CHEB_SPACE, SIS_PHYS_SPACE, sis::Chebfun< T >::v, and sis::y().
Referenced by sis::Discretize< std::complex< T > >::ChebDiff(), sis::Chebfun< T >::cumsum(), sis::Chebfun< std::complex< T > >::cumsum(), sis::diff(), sis::Chebfun< T >::L2norm(), sis::Chebfun< std::complex< T > >::L2norm(), sis::Chebfun< T >::MultMat(), sis::Chebfun< std::complex< T > >::MultMat(), sis::Chebfun< T >::operator()(), sis::Chebfun< std::complex< T > >::operator()(), sis::operator*(), sis::operator+(), sis::Chebfun< T >::operator+=(), sis::Chebfun< std::complex< T > >::operator+=(), sis::Linop< T >::operator=(), and sis::Linop< std::complex< T > >::operator=().
|
inline |
Provides the truncation defined in terms of the abs(last + last_but_one)/2.0.
Definition at line 1478 of file sis.hpp.
References sis::N, and sis::Chebfun< T >::v.
int sis::Chebfun< T >::dct_flag |
Definition at line 1153 of file sis.hpp.
Referenced by sis::Chebfun< T >::c2p(), sis::Chebfun< std::complex< T > >::c2p(), sis::Chebfun< T >::Chebfun(), sis::Chebfun< std::complex< T > >::Chebfun(), sis::EigenSorter< T >::compute(), sis::Chebfun< T >::cumsum(), sis::Chebfun< std::complex< T > >::cumsum(), sis::diff(), sis::Chebfun< std::complex< T > >::imag(), sis::Chebfun< T >::L2norm(), sis::Chebfun< std::complex< T > >::L2norm(), sis::Chebfun< T >::MultMat(), sis::Chebfun< std::complex< T > >::MultMat(), sis::Chebfun< T >::operator()(), sis::Chebfun< std::complex< T > >::operator()(), sis::operator*(), sis::operator+(), sis::Chebfun< T >::operator+=(), sis::Chebfun< std::complex< T > >::operator+=(), sis::Chebfun< T >::operator=(), sis::Chebfun< std::complex< T > >::operator=(), sis::Linop< T >::operator=(), sis::Linop< std::complex< T > >::operator=(), sis::Chebfun< T >::p2c(), sis::Chebfun< std::complex< T > >::p2c(), and sis::Chebfun< std::complex< T > >::real().
std::valarray<T> sis::Chebfun< T >::v |
Stores a flag to denote if function is in Cheb-space or physical space.
Definition at line 1156 of file sis.hpp.
Referenced by sis::Chebfun< T >::c2p(), sis::Chebfun< std::complex< T > >::c2p(), sis::Chebfun< T >::Chebfun(), sis::Chebfun< std::complex< T > >::Chebfun(), sis::Chebfun< T >::cumsum(), sis::Chebfun< std::complex< T > >::cumsum(), sis::diff(), sis::Chebfun< T >::ev(), sis::Chebfun< std::complex< T > >::evc(), sis::Chebfun< std::complex< T > >::evi(), sis::Chebfun< std::complex< T > >::evr(), sis::Chebfun< std::complex< T > >::imag(), sis::Chebfun< T >::isMachinePrecision(), sis::Chebfun< T >::isMachinePrecisionHalf(), sis::Chebfun< T >::L2norm(), sis::Chebfun< std::complex< T > >::L2norm(), sis::Chebfun< T >::MultMat(), sis::Chebfun< std::complex< T > >::MultMat(), sis::Chebfun< T >::operator()(), sis::Chebfun< std::complex< T > >::operator()(), sis::Linop< T >::operator()(), sis::Linop< std::complex< T > >::operator()(), sis::operator*(), sis::operator+(), sis::Chebfun< T >::operator+=(), sis::Chebfun< std::complex< T > >::operator+=(), sis::operator-(), sis::Chebfun< T >::operator=(), sis::Chebfun< std::complex< T > >::operator=(), sis::Linop< T >::operator=(), sis::Linop< std::complex< T > >::operator=(), sis::Chebfun< T >::p2c(), sis::Chebfun< std::complex< T > >::p2c(), sis::Chebfun< std::complex< T > >::real(), sis::Chebfun< T >::trunc(), and sis::Chebfun< std::complex< T > >::trunc().