23template<
class ContainerType>
25 const std::array<double,2>& alpha,
26 const DenseMatrix<ContainerType>& m,
27 const std::array<
const std::vector<double>*,2> x,
28 const std::array<double,2>& beta,
29 std::array<ContainerType*,2>&&
y)
31 const unsigned size =
m.num_cols();
34 for( i=0; i<size/8; i++)
36 *
y[0], *
y[1], i==0 ? beta[0] : 1., i==0 ? beta[1] : 1.,
37 alpha[0]*(*x[0])[i*8+0], alpha[1]*(*x[1])[i*8+0], *
m.get()[i*8+0],
38 alpha[0]*(*x[0])[i*8+1], alpha[1]*(*x[1])[i*8+1], *
m.get()[i*8+1],
39 alpha[0]*(*x[0])[i*8+2], alpha[1]*(*x[1])[i*8+2], *
m.get()[i*8+2],
40 alpha[0]*(*x[0])[i*8+3], alpha[1]*(*x[1])[i*8+3], *
m.get()[i*8+3],
41 alpha[0]*(*x[0])[i*8+4], alpha[1]*(*x[1])[i*8+4], *
m.get()[i*8+4],
42 alpha[0]*(*x[0])[i*8+5], alpha[1]*(*x[1])[i*8+5], *
m.get()[i*8+5],
43 alpha[0]*(*x[0])[i*8+6], alpha[1]*(*x[1])[i*8+6], *
m.get()[i*8+6],
44 alpha[0]*(*x[0])[i*8+7], alpha[1]*(*x[1])[i*8+7], *
m.get()[i*8+7]);
47 for( l=0; l<(size%8)/4; l++)
49 *
y[0], *
y[1], size < 8 ? beta[0] : 1., size < 8 ? beta[1] : 1.,
50 alpha[0]*(*x[0])[i*8+l*4+0], alpha[1]*(*x[1])[i*8+l*4+0], *
m.get()[i*8+l*4+0],
51 alpha[0]*(*x[0])[i*8+l*4+1], alpha[1]*(*x[1])[i*8+l*4+1], *
m.get()[i*8+l*4+1],
52 alpha[0]*(*x[0])[i*8+l*4+2], alpha[1]*(*x[1])[i*8+l*4+2], *
m.get()[i*8+l*4+2],
53 alpha[0]*(*x[0])[i*8+l*4+3], alpha[1]*(*x[1])[i*8+l*4+3], *
m.get()[i*8+l*4+3]);
56 for( k=0; k<((size%8)%4)/2; k++)
58 *
y[0], *
y[1], size < 4 ? beta[0] : 1., size < 4 ? beta[1] : 1.,
59 alpha[0]*(*x[0])[i*8+l*4+k*2+0], alpha[1]*(*x[1])[i*8+l*4+k*2+0], *
m.get()[i*8+l*4+k*2+0],
60 alpha[0]*(*x[0])[i*8+l*4+k*2+1], alpha[1]*(*x[1])[i*8+l*4+k*2+1], *
m.get()[i*8+l*4+k*2+1]);
61 if( ((size%8)%4)%2 == 1)
63 *
y[0], *
y[1], size < 2 ? beta[0] : 1., size < 2 ? beta[1] : 1.,
64 alpha[0]*(*x[0])[i*8+l*4+k*2], alpha[1]*(*x[1])[i*8+l*4+k*2], *
m.get()[i*8+l*4+k*2]);
127 template<
class ContainerType1>
131template<
class ContainerType>
132struct FilteredERKStep;
162template<
class ContainerType>
183 template<
class ...Params>
187 *
this =
ERKStep( std::forward<Params>( ps)...);
190 const ContainerType&
copyable()
const{
return m_ferk.copyable();}
200 template<
class ExplicitRHS>
204 m_ferk.step( std::tie(
rhs,
id), t0, u0, t1, u1, dt, delta);
232 template<
class ExplicitRHS>
237 m_ferk.step( std::tie(
rhs,
id), t0, u0, t1, u1, dt);
241 return m_ferk.order();
245 return m_ferk.embedded_order();
249 return m_ferk.num_stages();
276template<
class ContainerType>
288 m_rkb.resize(m_k.size()), m_rkd.resize( m_k.size());
289 for(
unsigned i=0; i<m_k.size(); i++)
291 m_rkb[i] = m_rk.b(i);
292 m_rkd[i] = m_rk.d(i);
297 template<
class ...Params>
304 const ContainerType&
copyable()
const{
return m_k[0];}
315 template<
class ExplicitRHS,
class Limiter>
318 step (
rhs, t0, u0, t1, u1, dt, delta,
true);
322 template<
class ExplicitRHS,
class Limiter>
326 if( !m_tmp_allocated)
329 m_tmp_allocated =
true;
331 step (
rhs, t0, u0, t1, u1, dt, m_tmp,
false);
346 template<
class ExplicitRHS,
class Limiter>
347 void step(
const std::tuple<ExplicitRHS, Limiter>& rhs,
value_type t0,
const ContainerType& u0,
value_type& t1, ContainerType& u1,
value_type dt, ContainerType& delta,
bool);
349 std::vector<value_type> m_rkb, m_rkd;
350 std::vector<ContainerType> m_k;
352 bool m_ignore_fsal =
false;
354 bool m_tmp_allocated =
false;
359template<
class ContainerType>
360template<
class ExplicitRHS,
class Limiter>
367 if( t0 != m_t1 || m_ignore_fsal)
368 std::get<0>(ode)(t0, u0, m_k[0]);
370 for (
unsigned i=1; i<s; i++)
372 std::vector<value_type> rka( i);
373 for(
unsigned l=0; l<i; l++)
374 rka[l] = m_rk.a(i,l);
376 tu = DG_FMA( dt,m_rk.c(i),t0);
380 std::get<1>(ode)( delta);
381 std::get<0>(ode)( tu, delta, m_k[i]);
387 {1.,0.}, {&u1, &delta});
390 std::get<1>(ode)( u1);
394 std::get<0>(ode)( t1, u1, m_k[0]);
398 swap( m_k[0], m_k[s-1]);
428template<
class ContainerType>
443 std::string exp_name = name+
" (explicit)";
444 std::string imp_name = name+
" (implicit)";
472 assert( m_rkI.
a(0,0) == 0);
474 check_implicit_fsal();
478 template<
class ...Params>
482 *
this =
ARKStep( std::forward<Params>( ps)...);
485 const ContainerType&
copyable()
const{
return m_kI[0];}
509 template<
class ExplicitRHS,
class ImplicitRHS,
class Solver>
513 return m_rkE.
order();
517 return m_rkE.
order();
525 std::vector<ContainerType> m_kE, m_kI;
526 std::vector<value_type> m_rkb, m_rkd;
528 bool m_implicit_fsal =
false;
529 void check_implicit_fsal(){
530 m_implicit_fsal =
true;
532 if( m_rkI.
a(i,0) != 0)
533 m_implicit_fsal =
false;
541 m_rkb[2*i] = m_rkE.
b(i);
542 m_rkb[2*i+1] = m_rkI.
b(i);
543 m_rkd[2*i] = m_rkE.
d(i);
544 m_rkd[2*i+1] = m_rkI.
d(i);
550template<
class ContainerType>
551template<
class Explicit,
class Implicit,
class Solver>
559 std::get<0>(ode)(t0, u0, m_kE[0]);
560 if( !m_implicit_fsal)
561 std::get<1>(ode)(t0, u0, m_kI[0]);
563 std::vector<const ContainerType*> k_ptrs( 2*m_rkI.
num_stages());
566 k_ptrs[2*i ] = &m_kE[i];
567 k_ptrs[2*i+1] = &m_kI[i];
570 for(
unsigned i=1; i<s; i++)
572 std::vector<value_type> rka( 2*i);
573 for(
unsigned l=0; l<i; l++)
575 rka[2*l] = m_rkE.
a(i,l);
576 rka[2*l+1] = m_rkI.
a(i,l);
578 tu = DG_FMA( m_rkI.
c(i),dt, t0);
582 std::get<2>(ode)(
alpha, tu, delta, m_kI[i]);
584 std::get<0>(ode)(tu, delta, m_kE[i]);
591 {1.,0.}, {&u1, &delta});
593 std::get<0>(ode)(t1,u1,m_kE[0]);
614template<
class ContainerType>
638 m_rkIb.resize(m_kI.size()), m_rkId.resize(m_kI.size());
639 for(
unsigned i=0; i<m_kI.size(); i++)
641 m_rkIb[i] = m_rkI.b(i);
642 m_rkId[i] = m_rkI.d(i);
647 template<
class ...Params>
651 *
this =
DIRKStep( std::forward<Params>( ps)...);
654 const ContainerType&
copyable()
const{
return m_kI[0];}
662 template<
class ImplicitRHS,
class Solver>
665 ContainerType& delta)
667 step( ode, t0, u0, t1, u1, dt, delta,
true);
685 template<
class ImplicitRHS,
class Solver>
694 step( ode, t0, u0, t1, u1, dt, m_tmp,
false);
698 return m_rkI.
order();
702 return m_rkI.
order();
710 template<
class ImplicitRHS,
class Solver>
711 void step(
const std::tuple<ImplicitRHS, Solver>& ode,
value_type t0,
const
713 dt, ContainerType& delta,
bool compute_delta);
715 std::vector<ContainerType> m_kI;
717 std::vector<value_type> m_rkIb, m_rkId;
718 bool m_allocated =
false;
722template<
class ContainerType>
723template<
class ImplicitRHS,
class Solver>
730 tu = DG_FMA( m_rkI.
c(0),dt, t0);
732 if( m_rkI.
a(0,0) !=0 )
735 std::get<1>(ode)(
alpha, tu, delta, u0);
739 std::get<0>(ode)(tu, u0, m_kI[0]);
742 for(
unsigned i=1; i<s; i++)
744 tu = DG_FMA( m_rkI.
c(i),dt, t0);
746 std::vector<value_type> rkIa( i);
747 for(
unsigned l=0; l<i; l++)
748 rkIa[l] = m_rkI.
a(i,l);
750 if( m_rkI.
a(i,i) !=0 )
753 std::get<1>(ode)(
alpha, tu, delta, m_kI[i]);
757 std::get<0>(ode)(tu, delta, m_kI[i]);
764 {1.,0.}, {&u1, &delta});
794template<
class ContainerType>
807template<
class ContainerType>
842template<
class ContainerType>
860 template<
class ...Params>
864 *
this =
ShuOsher( std::forward<Params>( ps)...);
867 const ContainerType&
copyable()
const{
return m_u[0];}
883 template<
class ExplicitRHS,
class Limiter>
886 std::vector<value_type> ts( m_t.
num_stages()+1);
890 std::get<0>(ode)(ts[0], m_u[0], m_k[0]);
891 for(
unsigned i=1; i<=s; i++)
894 ts[i] = m_t.
alpha(i-1,0)*ts[0] + dt*m_t.
beta(i-1,0);
895 for(
unsigned j=1; j<i; j++)
899 ts[i] += m_t.
alpha(i-1,j)*ts[j] + dt*m_t.
beta(i-1,j);
902 std::get<1>(ode)( i==s ? u1 : m_u[i]);
904 std::get<0>(ode)(ts[i], m_u[i], m_k[i]);
907 std::get<0>(ode)(ts[i], u1, m_k[0]);
921 std::vector<ContainerType> m_u, m_k;
943template<
class ContainerType>
949inline bool is_same(
double x,
double y,
double eps = 1e-15)
951 return fabs(
x -
y) < eps * std::max(1.0, std::max( fabs(
x), fabs(
y)));
955inline bool is_same(
float x,
float y,
float eps = 1e-6)
957 return fabsf(
x -
y) < eps * std::max(1.0f, std::max( fabsf(
x), fabsf(
y)));
973 return is_same( round(a/b)*b, a, eps);
980 return is_same( (
float)round(a/b)*b, (
float)a, eps);
998template<
class ContainerType>
1014 : m_step(step), m_dt(dt){}
1030 template<
class Stepper,
class ODE>
1034 m_step = [=, cap = std::tuple<Stepper, ODE>(std::forward<Stepper>(stepper),
1035 std::forward<ODE>(ode)) ](
auto t0,
const auto& y0,
auto& t1,
auto& y1,
1038 std::get<0>(cap).step( std::get<1>(cap), t0, y0, t1, y1, dtt);
1044 template<
class ...Params>
1085 virtual value_type do_dt( )
const {
return m_dt;}
1090template<
class ContainerType>
1091void SinglestepTimeloop<ContainerType>::do_integrate(
1094 enum to mode )
const
1096 bool forward = (t_end - t_begin > 0);
1104 unsigned N = (unsigned)round((t_end - t_begin)/m_dt);
1105 for(
unsigned i=0; i<N; i++)
1106 m_step( t_begin, end, t_begin, end, m_dt);
1110 unsigned N = (unsigned)floor( (t_end-t_begin)/m_dt);
1111 for(
unsigned i=0; i<N; i++)
1112 m_step( t_begin, end, t_begin, end, m_dt);
1116 m_step( t_begin, end, t_begin, end, dt_final);
1119 m_step( t_begin, end, t_begin, end, m_dt);
class intended for the use in throw statements
Definition exceptions.h:83
small class holding a stringstream
Definition exceptions.h:29
Error classes or the dg library.
#define _ping_
Definition exceptions.h:12
void rhs(double t, double, double &yp)
bool is_divisable(double a, double b, double eps=1e-15)
Definition runge_kutta.h:971
bool is_same(double x, double y, double eps=1e-15)
Definition runge_kutta.h:949
void copy(const ContainerTypeIn &source, ContainerTypeOut &target)
Definition blas1.h:243
void axpbypgz(value_type alpha, const ContainerType1 &x, value_type1 beta, const ContainerType2 &y, value_type2 gamma, ContainerType &z)
Definition blas1.h:337
void axpby(value_type alpha, const ContainerType1 &x, value_type1 beta, ContainerType &y)
Definition blas1.h:306
void subroutine(Subroutine f, ContainerType &&x, ContainerTypes &&... xs)
; Customizable and generic blas1 function
Definition blas1.h:677
void assign(const from_ContainerType &from, ContainerType &to, Params &&... ps)
Generic way to assign the contents of a from_ContainerType object to a ContainerType object optionall...
Definition blas1.h:767
void gemv(get_value_type< ContainerType1 > alpha, MatrixType &&M, const ContainerType1 &x, get_value_type< ContainerType1 > beta, ContainerType2 &y)
Alias for blas2::symv ;.
Definition blas2.h:339
@ forward
forward derivative (cell to the right and current cell)
Definition enums.h:98
std::vector< const ContainerType * > asPointers(const std::vector< ContainerType > &in)
Convert a vector of vectors to a vector of pointers.
Definition densematrix.h:110
auto asDenseMatrix(const std::vector< const ContainerType * > &in)
Lightweight DenseMatrix for dg::blas2::gemv.
Definition densematrix.h:75
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
Definition tensor_traits.h:45
to
Switch for the Timeloop integrate function.
Definition ode.h:17
@ exact
match the ending exactly
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
An abstract ODE integrator.
Additive Runge Kutta (semi-implicit) time-step with error estimate following The ARKode library
Definition runge_kutta.h:430
ContainerType container_type
Definition runge_kutta.h:432
void step(const std::tuple< ExplicitRHS, ImplicitRHS, Solver > &ode, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt, ContainerType &delta)
Advance one step.
get_value_type< ContainerType > value_type
the value type of the time variable (float or double)
Definition runge_kutta.h:431
ARKStep()
No memory allocation.
Definition runge_kutta.h:434
unsigned order() const
global order of the method given by the current Butcher Tableau
Definition runge_kutta.h:512
ARKStep(ConvertsToButcherTableau< value_type > ex_tableau, ConvertsToButcherTableau< value_type > im_tableau, const ContainerType ©able)
Construct with two Butcher Tableaus.
Definition runge_kutta.h:461
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition runge_kutta.h:479
const ContainerType & copyable() const
Return an object of same size as the object used for construction.
Definition runge_kutta.h:485
ARKStep(std::string name, const ContainerType ©able)
Construct with given name.
Definition runge_kutta.h:441
unsigned embedded_order() const
global order of the embedding given by the current Butcher Tableau
Definition runge_kutta.h:516
unsigned num_stages() const
number of stages of the method given by the current Butcher Tableau
Definition runge_kutta.h:520
Manage coefficients of a (extended) Butcher tableau.
Definition tableau.h:33
unsigned order() const
global order of accuracy for the method represented by b
Definition tableau.h:132
real_type c(unsigned i) const
Read the c_i coefficients.
Definition tableau.h:99
unsigned embedded_order() const
global order of accuracy for the embedded method represented by bt
Definition tableau.h:136
real_type a(unsigned i, unsigned j) const
Read the a_ij coefficients.
Definition tableau.h:91
real_type d(unsigned j) const
Return the coefficients for the error estimate Equivalent to b(j)-bt(j)
Definition tableau.h:124
real_type b(unsigned j) const
Read the b_j coefficients.
Definition tableau.h:107
unsigned num_stages() const
The number of stages s.
Definition tableau.h:128
Convert identifiers to their corresponding dg::ButcherTableau.
Definition tableau.h:1695
Convert identifiers to their corresponding dg::ShuOsherTableau.
Definition tableau.h:1743
Embedded diagonally implicit Runge Kutta time-step with error estimate .
Definition runge_kutta.h:616
DIRKStep(ConvertsToButcherTableau< value_type > im_tableau, const ContainerType ©able)
Construct with a diagonally implicit Butcher Tableau.
Definition runge_kutta.h:633
unsigned order() const
global order of the method given by the current Butcher Tableau
Definition runge_kutta.h:697
void step(const std::tuple< ImplicitRHS, Solver > &ode, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt, ContainerType &delta)
Advance one step with error estimate.
Definition runge_kutta.h:663
get_value_type< ContainerType > value_type
the value type of the time variable (float or double)
Definition runge_kutta.h:618
unsigned embedded_order() const
global order of the embedding given by the current Butcher Tableau
Definition runge_kutta.h:701
ContainerType container_type
Definition runge_kutta.h:619
DIRKStep()
No memory allocation.
Definition runge_kutta.h:621
void step(const std::tuple< ImplicitRHS, Solver > &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 runge_kutta.h:686
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition runge_kutta.h:648
unsigned num_stages() const
number of stages of the method given by the current Butcher Tableau
Definition runge_kutta.h:705
const ContainerType & copyable() const
Return an object of same size as the object used for construction.
Definition runge_kutta.h:654
Embedded Runge Kutta explicit time-step with error estimate .
Definition runge_kutta.h:164
unsigned num_stages() const
number of stages of the method given by the current Butcher Tableau
Definition runge_kutta.h:248
void step(ExplicitRHS &rhs, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt, ContainerType &delta)
Advance one step with error estimate.
Definition runge_kutta.h:201
void enable_fsal()
All subsequent calls to step method will enable the check for the first same as last property.
Definition runge_kutta.h:195
const ContainerType & copyable() const
Return an object of same size as the object used for construction.
Definition runge_kutta.h:190
ContainerType container_type
Definition runge_kutta.h:166
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition runge_kutta.h:184
ERKStep()=default
No memory allocation.
void ignore_fsal()
All subsequent calls to step method will ignore the first same as last property (useful if you want t...
Definition runge_kutta.h:193
ERKStep(ConvertsToButcherTableau< value_type > tableau, const ContainerType ©able)
Reserve internal workspace for the integration.
Definition runge_kutta.h:177
get_value_type< ContainerType > value_type
the value type of the time variable (float or double)
Definition runge_kutta.h:165
void step(ExplicitRHS &rhs, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt)
Advance one step ignoring error estimate and embedded method.
Definition runge_kutta.h:233
unsigned embedded_order() const
global order of the embedding given by the current Butcher Tableau
Definition runge_kutta.h:244
unsigned order() const
global order of the method given by the current Butcher Tableau
Definition runge_kutta.h:240
Definition subroutines.h:174
EXPERIMENTAL: Filtered Embedded Runge Kutta explicit time-step with error estimate .
Definition runge_kutta.h:278
get_value_type< ContainerType > value_type
the value type of the time variable (float or double)
Definition runge_kutta.h:279
unsigned order() const
global order of the method given by the current Butcher Tableau
Definition runge_kutta.h:334
FilteredERKStep()
No memory allocation.
Definition runge_kutta.h:282
void step(const std::tuple< ExplicitRHS, Limiter > &rhs, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt)
Advance one step ignoring error estimate and embedded method.
Definition runge_kutta.h:323
void step(const std::tuple< ExplicitRHS, Limiter > &rhs, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt, ContainerType &delta)
Advance one step with error estimate.
Definition runge_kutta.h:316
void ignore_fsal()
All subsequent calls to step method will ignore the first same as last property (useful if you want t...
Definition runge_kutta.h:307
void enable_fsal()
All subsequent calls to step method will enable the check for the first same as last property.
Definition runge_kutta.h:309
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition runge_kutta.h:298
unsigned embedded_order() const
global order of the embedding given by the current Butcher Tableau
Definition runge_kutta.h:338
ContainerType container_type
Definition runge_kutta.h:280
unsigned num_stages() const
number of stages of the method given by the current Butcher Tableau
Definition runge_kutta.h:342
const ContainerType & copyable() const
Return an object of same size as the object used for construction.
Definition runge_kutta.h:304
FilteredERKStep(ConvertsToButcherTableau< value_type > tableau, const ContainerType ©able)
Reserve internal workspace for the integration.
Definition runge_kutta.h:284
A filter that does nothing.
Definition runge_kutta.h:119
void operator()(ContainerType1 &) const
Do nothing.
Definition runge_kutta.h:128
Shu-Osher fixed-step explicit ODE integrator with Slope Limiter / Filter .
Definition runge_kutta.h:844
ContainerType container_type
Definition runge_kutta.h:846
void step(const std::tuple< ExplicitRHS, Limiter > &ode, value_type t0, const ContainerType &u0, value_type &t1, ContainerType &u1, value_type dt)
Advance one step.
Definition runge_kutta.h:884
const ContainerType & copyable() const
Return an object of same size as the object used for construction.
Definition runge_kutta.h:867
ShuOsher()
No memory allocation.
Definition runge_kutta.h:848
ShuOsher(dg::ConvertsToShuOsherTableau< value_type > tableau, const ContainerType ©able)
Reserve internal workspace for the integration.
Definition runge_kutta.h:857
unsigned order() const
global order of the method given by the current Butcher Tableau
Definition runge_kutta.h:912
get_value_type< ContainerType > value_type
the value type of the time variable (float or double)
Definition runge_kutta.h:845
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition runge_kutta.h:861
unsigned num_stages() const
number of stages of the method given by the current Butcher Tableau
Definition runge_kutta.h:916
Manage coefficients in Shu-Osher form.
Definition tableau.h:181
real_type beta(unsigned i, unsigned j)
Read the beta_ij coefficients.
Definition tableau.h:257
unsigned num_stages() const
The number of stages s.
Definition tableau.h:259
unsigned order() const
global order of accuracy for the method
Definition tableau.h:263
real_type alpha(unsigned i, unsigned j)
Read the alpha_ij coefficients.
Definition tableau.h:250
Integrate using a for loop and a fixed time-step.
Definition runge_kutta.h:1000
SinglestepTimeloop(Stepper &&stepper, ODE &&ode, value_type dt=0)
Bind the step function of a single step stepper.
Definition runge_kutta.h:1031
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition runge_kutta.h:1045
SinglestepTimeloop(std::function< void(value_type, const ContainerType &, value_type &, ContainerType &, value_type)> step, value_type dt=0)
Construct using a std::function.
Definition runge_kutta.h:1012
virtual SinglestepTimeloop * clone() const
Abstract copy method that returns a copy of *this on the heap.
Definition runge_kutta.h:1079
void integrate_steps(value_type t0, const container_type &u0, value_type t1, container_type &u1, unsigned steps)
Integrate differential equation with a fixed number of steps.
Definition runge_kutta.h:1072
ContainerType container_type
Definition runge_kutta.h:1001
void set_dt(value_type dt)
Set the constant timestep to be used in the integrate functions.
Definition runge_kutta.h:1056
dg::get_value_type< ContainerType > value_type
Definition runge_kutta.h:1002
SinglestepTimeloop()=default
no allocation
Abstract timeloop independent of stepper and ODE.
Definition ode.h:60
void integrate(value_type t0, const ContainerType &u0, value_type t1, ContainerType &u1)
Integrate a differential equation between given bounds.
Definition ode.h:83