Spectral Integral Suite in C++
|
An example with nonconstant coefficients and comparissons with analytical solution. More...
An example with nonconstant coefficients and comparissons with analytical solution.
Solving the system:
\[ \mathrm D u(y) + \frac{1}{y^2 +1}u(y) \;=\; 0, \]
with boundary condition:
\[ u(-1) = 1.0. \]
Anaytical solution is given by:
\[ u(y) = \exp\left(-\mathrm{tan}^{-1}(y)\,-\, \mathrm{tan}^{-1}(1) \right) \]
where \( \mathrm D = \mathrm d/\mathrm d y \).
width=500cm height=500cm
Definition in file Ex_03.cpp.
Go to the source code of this file.
Typedefs | |
typedef complex< double > | Cd_t |
typedef valarray< double > | Vd_t |
Functions | |
int | main () |
int main | ( | ) |
Definition at line 19 of file Ex_03.cpp.
References sis::Linop< T >::coef, sis::BcMat< T >::eval, sis::BcMat< T >::L, sis::linSolve(), sis::N, std::pow(), std::real(), sis::sis_setup(), sis::BcMat< T >::vals, sis::y(), and sis::yEigen.