37template<
class value_type,
class ExplicitRHS>
39 std::string tableau, value_type epsTimerel, value_type epsTimeabs,
40 unsigned& number, value_type t0 = 0., value_type t1 = 1.)
42 return [=, &num = number,
43 cap = std::tuple<ExplicitRHS>(std::forward<ExplicitRHS>(ode)),
44 rtol = epsTimerel, atol = epsTimeabs]
45 (
const auto&
x,
auto& b)
mutable
47 value_type reject_limit = 2;
67template<
class Container>
81 template<
class MatrixType>
85 m_A = [&](
const Container&
x, Container&
y){
91 template<
class ...Params>
95 *
this = SqrtODE( std::forward<Params>( ps)...);
101 return [&t = m_time, &A = m_A](
const Container&
x, Container&
y)
107 template<
class MatrixType>
132 std::function<void(
const Container&, Container&)> m_A, m_Ainv;
152template<
class Matrix,
class Preconditioner,
class Container>
166template<
class Matrix,
class Container>
172 (
const auto&
x,
auto&
y)
mutable
174 dg::mat::compute_Tinv_y( TH, y, x, (1.-t), t);
187template<
class MatrixType>
190 return [&](
auto t,
const auto&
y,
auto& yp)
mutable
206template<
class MatrixType>
209 return [&m_A = A](
auto t,
const auto&
z,
auto& zp)
mutable
unsigned solve(MatrixType0 &&A, ContainerType0 &x, const ContainerType1 &b, MatrixType1 &&P, const ContainerType2 &W, value_type eps=1e-12, value_type nrmb_correction=1, int test_frequency=1)
void apply(get_value_type< ContainerType1 > alpha, MatrixType &&M, const ContainerType1 &x, get_value_type< ContainerType1 > beta, ContainerType2 &y)
void copy(const ContainerTypeIn &source, ContainerTypeOut &target)
void axpby(get_value_type< ContainerType > alpha, const ContainerType1 &x, get_value_type< ContainerType > beta, ContainerType &y)
void symv(MatrixType &&M, const ContainerType1 &x, ContainerType2 &y)
MPI_Vector< thrust::host_vector< real_type > > weights(const aRealMPITopology2d< real_type > &g)
auto make_expode(MatrixType &A)
Right hand side of the exponential ODE.
Definition: sqrt_ode.h:188
auto make_besselI0ode(MatrixType &A)
Right hand side of the (zeroth order) modified Bessel function ODE, rewritten as a system of coupled ...
Definition: sqrt_ode.h:207
InvSqrtODE< Container > make_inv_sqrtodeCG(Matrix &A, const Preconditioner &P, const Container &weights, dg::get_value_type< Container > epsCG)
Right hand side of the square root ODE.
Definition: sqrt_ode.h:153
auto make_directODESolve(ExplicitRHS &&ode, std::string tableau, value_type epsTimerel, value_type epsTimeabs, unsigned &number, value_type t0=0., value_type t1=1.)
Operator that integrates an ODE from 0 to 1 with an adaptive ERK class as timestepper
Definition: sqrt_ode.h:38
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
InvSqrtODE< Container > make_inv_sqrtodeTri(const Matrix &TH, const Container ©able)
Definition: sqrt_ode.h:167
Classes for Krylov space approximations of a Matrix-Vector product.
void integrate(value_type t0, const ContainerType &u0, value_type t1, ContainerType &u1)
Right hand side of the square root ODE.
Definition: sqrt_ode.h:69
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition: sqrt_ode.h:92
Container container_type
Definition: sqrt_ode.h:71
void operator()(value_type t, const Container &y, Container &yp)
Compute rhs term.
Definition: sqrt_ode.h:120
InvSqrtODE()
Definition: sqrt_ode.h:73
dg::get_value_type< Container > value_type
Definition: sqrt_ode.h:72
InvSqrtODE(MatrixType &A, const Container ©able)
Construct SqrtOde operator.
Definition: sqrt_ode.h:82
const value_type & time() const
Definition: sqrt_ode.h:98
auto make_operator() const
Definition: sqrt_ode.h:100
void set_inverse_operator(const MatrixType &OpInv)
Definition: sqrt_ode.h:108