49template<
class ContainerType>
65 const ContainerType&
copyable()
const{
return m_u;}
78 template<
class MatrixFunction>
80 const ContainerType& u0,
value_type& t1, ContainerType& u1,
84 return (exp( dt*
x));}, u0, m_u);
123template<
class ContainerType>
141 const ContainerType&
copyable()
const{
return m_tmp;}
146 template<
class ExplicitRHS,
class MatrixFunction>
147 void step(
const std::tuple<ExplicitRHS,MatrixFunction>& ode,
value_type t0,
const
149 dt, ContainerType&
delta)
151 step ( ode, t0, u0, t1, u1, dt,
delta,
true);
170 template<
class ExplicitRHS,
class MatrixFunction>
172 const ContainerType& u0,
value_type& t1, ContainerType& u1,
175 step ( ode, t0, u0, t1, u1, dt, m_tmp,
false);
191 template<
class ExplicitRHS,
class MatrixFunction>
192 void step(
const std::tuple<ExplicitRHS, MatrixFunction>& ode,
value_type t0,
const ContainerType& u0,
value_type& t1, ContainerType& u1,
value_type dt, ContainerType&
delta,
bool compute_delta)
199 std::get<0>(ode)(t0, u0, m_k[0]);
202 for (
unsigned i=1; i<s; i++)
205 return (exp( m_rk.
c(i)*dt*x));}, u0, m_u);
206 for(
unsigned j=0; j<i; j++)
209 if ( m_rk.
a(i,j)(0) != 0)
212 m_rk.
a(i,j)(dt*
x);}, m_k[j], m_tmp);
216 tu = DG_FMA( dt,m_rk.
c(i),t0);
217 std::get<0>(ode)( tu, m_u, m_k[i]);
222 return (exp( dt*x));}, u0, m_u);
226 for(
unsigned i=0; i<s; i++)
229 if( m_rk.
b(i)(0) != 0)
232 m_rk.
b(i)(dt*
x);}, m_k[i], m_tmp);
236 if( compute_delta && m_rk.
bt(i)(0) != 0)
239 m_rk.
bt(i)(dt*
x);}, m_k[i], m_tmp);
248 std::get<0>(ode)( t1, u1, m_k[0]);
251 FunctionalButcherTableau<value_type> m_rk;
252 std::vector<ContainerType> m_k;
254 ContainerType m_tmp, m_u;
void copy(const ContainerTypeIn &source, ContainerTypeOut &target)
void axpby(get_value_type< ContainerType > alpha, const ContainerType1 &x, get_value_type< ContainerType > beta, ContainerType &y)
Operator< real_type > delta(unsigned n)
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
Classes for Krylov space approximations of a Matrix-Vector product.
Convert identifiers to their corresponding dg::mat::FunctionalButcherTableau.
Definition: tableau.h:323
Exponential Runge-Kutta fixed-step time-integration for .
Definition: exp_runge_kutta.h:125
void step(const std::tuple< ExplicitRHS, MatrixFunction > &ode, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt, ContainerType &delta)
Advance one step with error estimate.
Definition: exp_runge_kutta.h:147
const ContainerType & copyable() const
Definition: exp_runge_kutta.h:141
void step(const std::tuple< ExplicitRHS, MatrixFunction > &ode, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt)
Advance one step ignoring error estimate and embedded method.
Definition: exp_runge_kutta.h:171
unsigned num_stages() const
number of stages of the method given by the current Butcher Tableau
Definition: exp_runge_kutta.h:186
ExponentialERKStep(ConvertsToFunctionalButcherTableau< value_type > tableau, const ContainerType ©able)
Reserve internal workspace for the integration.
Definition: exp_runge_kutta.h:137
ExponentialERKStep()=default
ContainerType container_type
the type of the vector class in use
Definition: exp_runge_kutta.h:127
get_value_type< ContainerType > value_type
the value type of the time variable (float or double)
Definition: exp_runge_kutta.h:126
unsigned order() const
global order of the method given by the current Butcher Tableau
Definition: exp_runge_kutta.h:178
unsigned embedded_order() const
global order of the embedding given by the current Butcher Tableau
Definition: exp_runge_kutta.h:182
Exponential one step time-integration for .
Definition: exp_runge_kutta.h:51
void step(MatrixFunction &ode, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt)
Advance one step via , .
Definition: exp_runge_kutta.h:79
ExponentialStep(const ContainerType ©able)
Reserve internal workspace for the integration.
Definition: exp_runge_kutta.h:63
get_value_type< ContainerType > value_type
the value type of the time variable (float or double)
Definition: exp_runge_kutta.h:52
const ContainerType & copyable() const
Definition: exp_runge_kutta.h:65
ExponentialStep()=default
no memory allocation
ContainerType container_type
Definition: exp_runge_kutta.h:53
unsigned num_stages() const
The number of stages s.
Definition: tableau.h:99
unsigned order() const
global order of accuracy for the method represented by b
Definition: tableau.h:103
real_type c(unsigned i) const
Read the c_i coefficients.
Definition: tableau.h:77
function_type bt(unsigned j) const
Read the embedded bt_j coefficients.
Definition: tableau.h:95
function_type a(unsigned i, unsigned j) const
Read the a_ij coefficients.
Definition: tableau.h:69
unsigned embedded_order() const
global order of accuracy for the embedded method represented by bt
Definition: tableau.h:107
function_type b(unsigned j) const
Read the b_j coefficients.
Definition: tableau.h:86
Computation of for self-adjoint positive definite .
Definition: matrixsqrt.h:138