Spectral propagtor in time. Refer to documentation of file spectralprop.h for math detail.
More...
#include <spectralprop.h>
|
| SpectralPropagator (int NPT) |
| Construct propagator using NPT points. More...
|
|
| ~SpectralPropagator () |
|
template<typename uT , typename expLT , typename NT > |
uT | step (double t, double Delta, const uT &u0, const expLT &expL, const NT &N, const double eps=1e-12, bool doprint=false, bool recurinit=true) |
| Step forward in time from to . More...
|
|
|
double | p (int i, double t) |
| Private: Makes interpolating polyn p[i](t), i=0..NPT. More...
|
|
template<typename uT , typename expLT , typename NT > |
std::vector< uT > | solve (double t, double Delta, const uT &u0, const expLT &expL, const NT &N, const double eps, bool doprint, bool recurinit, int &napp) |
|
template<typename uT > |
uT | u (double dt, const std::vector< uT > &v) |
| Private: Computes interpolated solution. More...
|
|
|
const int | NPT |
| Number of quadrature points. More...
|
|
SpectralPropagator * | q |
|
std::vector< double > | w |
| Quadrature weights on [0,1] with value 0 prepended. More...
|
|
std::vector< double > | x |
| Quadrature points on [0,1] with value 0 prepended. More...
|
|
Spectral propagtor in time. Refer to documentation of file spectralprop.h for math detail.
◆ SpectralPropagator()
madness::SpectralPropagator::SpectralPropagator |
( |
int |
NPT | ) |
|
|
inline |
◆ ~SpectralPropagator()
madness::SpectralPropagator::~SpectralPropagator |
( |
| ) |
|
|
inline |
◆ p()
double madness::SpectralPropagator::p |
( |
int |
i, |
|
|
double |
t |
|
) |
| |
|
inlineprivate |
Private: Makes interpolating polyn p[i](t), i=0..NPT.
References NPT, and x.
Referenced by u().
◆ solve()
template<typename uT , typename expLT , typename NT >
std::vector<uT> madness::SpectralPropagator::solve |
( |
double |
t, |
|
|
double |
Delta, |
|
|
const uT & |
u0, |
|
|
const expLT & |
expL, |
|
|
const NT & |
N, |
|
|
const double |
eps, |
|
|
bool |
doprint, |
|
|
bool |
recurinit, |
|
|
int & |
napp |
|
) |
| |
|
inlineprivate |
References distance(), expL(), k, N, NPT, madness::print(), q, solve(), u(), v, w, and x.
Referenced by solve(), and step().
◆ step()
template<typename uT , typename expLT , typename NT >
uT madness::SpectralPropagator::step |
( |
double |
t, |
|
|
double |
Delta, |
|
|
const uT & |
u0, |
|
|
const expLT & |
expL, |
|
|
const NT & |
N, |
|
|
const double |
eps = 1e-12 , |
|
|
bool |
doprint = false , |
|
|
bool |
recurinit = true |
|
) |
| |
|
inline |
Step forward in time from to .
The template types should be automatically inferred from the invocation. uT
is the C++ type for the solution.
- Parameters
-
[in] | t | The current time |
[in] | Delta | The time step |
[in] | u0 | The solution at the current time |
[in] | expL | A function or functor to compute for |
[in] | N | A function to compute the non-linear part |
[in] | eps | Threshold for convergence of iteration on norm of change in solution at last quadrature point. |
[in] | doprint | If true will print some info on convergence |
[in] | recurinit | If true initial guess is recursion from lower order quadrature instead of default explicit rule |
- Returns
- The solution at time
The user provided operators are invoked as
uT
expL(
double tau,
const uT&
u)
uT u(double dt, const std::vector< uT > &v)
Private: Computes interpolated solution.
Definition: spectralprop.h:131
Fred expL(double dt, const Fred &f)
Definition: testspectralprop.cc:98
where and
uT
N(
double T,
const uT&
u)
auto T(World &world, response_space &f) -> response_space
Definition: global_functions.cc:34
#define N
Definition: testconv.cc:37
where and is a trial solution at time .
References expL(), k, N, NPT, madness::print(), solve(), u(), v, w, and x.
◆ u()
template<typename uT >
uT madness::SpectralPropagator::u |
( |
double |
dt, |
|
|
const std::vector< uT > & |
v |
|
) |
| |
|
inlineprivate |
Private: Computes interpolated solution.
References NPT, p(), and v.
Referenced by solve(), and step().
◆ NPT
const int madness::SpectralPropagator::NPT |
|
private |
std::vector<double> madness::SpectralPropagator::w |
|
private |
std::vector<double> madness::SpectralPropagator::x |
|
private |
The documentation for this class was generated from the following file: