Spectral Integral Suite in C++
|
Overloads the Linop class to complex type. More...
#include <sis.hpp>
Public Member Functions | |
Linop () | |
A null-constructor for Linop. More... | |
Linop (const int &n_) | |
Makes a Linop by specifying the order n_ of the differential equation. More... | |
Linop (const Linop< std::complex< T > > &in) | |
Copy constructor. More... | |
void | operator= (const Linop< std::complex< T > > &in) |
void | operator= (const Linop< T > &in) |
void | operator+= (const Linop< T > &in) |
Chebfun< std::complex< T > > | operator() (Chebfun< std::complex< T > > in) |
Apply the operator on a Chebfun. More... | |
void | operator+= (const Linop< std::complex< T > > &in) |
void | operator= (const std::complex< T > &in) |
Assignment operator for constant input. More... | |
void | operator= (T in) |
Assignment operator for constant input. More... | |
void | operator= (const Eigen::Array< std::complex< T >, Eigen::Dynamic, 1 > &in) |
Assignment operator for function input, through Eigen array. More... | |
void | operator= (const std::valarray< T > &in) |
Assignment operator for function input, through valarray. More... | |
void | operator= (const std::valarray< std::complex< T > > &in) |
void | operator= (Chebfun< T > in) |
void | operator= (Chebfun< std::complex< T > > in) |
Linop< std::complex< T > > | operator/ (T in) |
Dividing Linop by scalar. More... | |
Linop< std::complex< T > > | operator/ (std::complex< T > in) |
Dividing Linop by scalar. More... | |
Linop< std::complex< T > > | operator* (T in) |
Multiplying Linop by scalar. More... | |
Linop< std::complex< T > > | operator* (std::complex< T > in) |
Multiplying Linop by scalar. More... | |
void | set () |
Sets the the size of coefficient array based on the order of differential equation. Suppose order is 3, then the size of array needed is 4. More... | |
void | set (int n_) |
Sets the the size of coefficient array based on the order of differential equation. Suppose order is 3, then the size of array needed is 4. More... | |
void | ncc () |
Sets the the size of non-constant coefficient array based on the order of differential equation. Suppose order is 3, then the size of array needed is 4. This must be called before assigning non-constant coefficients. More... | |
void | ncc (int n_) |
Sets the the size of non-constant coefficient array based on the order of differential equation. Suppose order is 3, then the size of array needed is 4. This must be called before assigning non-constant coefficients. More... | |
sis::Linop< T > | real () |
sis::Linop< T > | imag () |
Chebfun< std::complex< T > > | solve (Chebfun< std::complex< T > > in) |
This function solves the differential equation. See solve for details. More... | |
Public Attributes | |
int | NCC |
Flag to set (value 1) for enabling nonconstant coefficients. More... | |
int | n |
Eigen::Matrix< std::complex< T >, Eigen::Dynamic, 1 > | coef |
Stores the coefficients in the differential equation. More... | |
ChebfunMat< std::complex< T > > | coefFun |
Use this to input all non-constant coefficients. See coefFun for details. More... | |
Eigen::Matrix< std::complex< T >, Eigen::Dynamic, 1 > | solution |
Stores the solution. More... | |
Overloads the Linop class to complex type.
|
inline |
A null-constructor for Linop.
Definition at line 2823 of file sis.hpp.
References sis::Linop< T >::NCC.
|
inline |
Makes a Linop by specifying the order n_ of the differential equation.
Definition at line 2826 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Copy constructor.
Definition at line 2833 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, sis::Linop< T >::n, sis::Linop< T >::NCC, and sis::Linop< T >::solution.
|
inline |
Definition at line 3083 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, std::imag(), sis::Linop< T >::n, sis::Linop< T >::ncc(), and sis::Linop< T >::set().
|
inline |
Sets the the size of non-constant coefficient array based on the order of differential equation. Suppose order is 3, then the size of array needed is 4. This must be called before assigning non-constant coefficients.
Definition at line 3054 of file sis.hpp.
References sis::Linop< T >::coefFun, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Sets the the size of non-constant coefficient array based on the order of differential equation. Suppose order is 3, then the size of array needed is 4. This must be called before assigning non-constant coefficients.
Definition at line 3063 of file sis.hpp.
References sis::Linop< T >::coefFun, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Apply the operator on a Chebfun.
Definition at line 2867 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, sis::diff(), sis::Linop< T >::n, sis::Linop< T >::NCC, and sis::Chebfun< T >::v.
|
inline |
Multiplying Linop by scalar.
Definition at line 2973 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Multiplying Linop by scalar.
Definition at line 3023 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Definition at line 2860 of file sis.hpp.
References sis::Linop< T >::operator=().
|
inline |
Definition at line 2884 of file sis.hpp.
References sis::Linop< T >::operator=().
|
inline |
Dividing Linop by scalar.
Definition at line 2947 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Dividing Linop by scalar.
Definition at line 2960 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Definition at line 2842 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, sis::Linop< T >::n, sis::Linop< T >::NCC, and sis::Linop< T >::solution.
|
inline |
Definition at line 2852 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, sis::Linop< T >::n, sis::Linop< T >::NCC, and sis::Linop< T >::solution.
|
inline |
Assignment operator for constant input.
Definition at line 2891 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Assignment operator for constant input.
Definition at line 2899 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Assignment operator for function input, through Eigen array.
Definition at line 2907 of file sis.hpp.
References sis::Linop< T >::coefFun, sis::Linop< T >::n, and sis::Linop< T >::ncc().
|
inline |
Assignment operator for function input, through valarray.
Definition at line 2914 of file sis.hpp.
References sis::Linop< T >::coefFun, sis::Linop< T >::n, and sis::Linop< T >::ncc().
|
inline |
Definition at line 2920 of file sis.hpp.
References sis::Linop< T >::coefFun, sis::Linop< T >::n, and sis::Linop< T >::ncc().
|
inline |
Definition at line 2926 of file sis.hpp.
References sis::Chebfun< T >::c2p(), sis::Chebfun< T >::dct_flag, sis::Linop< T >::operator=(), sis::Chebfun< T >::p2c(), SIS_PHYS_SPACE, and sis::Chebfun< T >::v.
|
inline |
Definition at line 2936 of file sis.hpp.
References sis::Linop< T >::operator=(), and SIS_PHYS_SPACE.
|
inline |
Definition at line 3068 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::coefFun, sis::Linop< T >::n, sis::Linop< T >::ncc(), std::real(), and sis::Linop< T >::set().
|
inline |
Sets the the size of coefficient array based on the order of differential equation. Suppose order is 3, then the size of array needed is 4.
Definition at line 3037 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Sets the the size of coefficient array based on the order of differential equation. Suppose order is 3, then the size of array needed is 4.
Definition at line 3045 of file sis.hpp.
References sis::Linop< T >::coef, sis::Linop< T >::n, and sis::Linop< T >::NCC.
|
inline |
Eigen::Matrix<std::complex<T>, Eigen::Dynamic, 1> sis::Linop< std::complex< T > >::coef |
Stores the coefficients in the differential equation.
For instance, for the differential operator \(2i\,\partial_y + 3\), coef \( [0]= 2i\) and coef \([1] = 3\). One can also use the Eigen format to input coefficients:
ChebfunMat<std::complex<T> > sis::Linop< std::complex< T > >::coefFun |
Use this to input all non-constant coefficients. See coefFun for details.
The solution here involves storing the Chebyshev coeefficients of the highest derivative in the differential equation, and also the constants of integration. This can be used to construct all other lower derivatives using integration.
First N+1 elements of sol hold the Chebyshev coefficients and the remaining elements store the integration constantsAdditional details are as follows. Although C++ is type specific, coefFun allows inputs to be real, by assuming that the imaginary part is zero. in addition to what is written in coefFun, consider the following operator: \(2i\partial_{yy}u(y) \,+\, 4\partial_yu(y)\,+\,y^2u(y)\), then the following code can be used to input the nonconstant coefficients:
Note that in the above input to coefFun has mixed types, like double and complex<double>. This feature is allowed only coefFun. For coef, one has to be type specific, that is all inputs have to be complex<double> type, or double type, depending on what template is used to intiate the Linop.
int sis::Linop< std::complex< T > >::n |
int sis::Linop< std::complex< T > >::NCC |
Eigen::Matrix<std::complex<T>, Eigen::Dynamic, 1> sis::Linop< std::complex< T > >::solution |