44 const std::type_info&
vtype()
const;
50 std::shared_ptr<writer> dat_writer=std::shared_ptr<writer>(
new writer(
true));
55 holder->add_writer(dat_writer);
60 while(tcur <= (tf-w_step)){
62 inter->integrate(sol, tcur, tcur + w_step);
66 inter->integrate(sol, tcur, tf);
73 in.
retrieve(inter,
"integrator",
this);
74 if(!inter->compare<T>()){
75 err(this->name() +
" is of type " + this->vname() +
", while the integrator inter \
76 is of type " + inter->vname(),
"ode_tmpl::postprocess",
"simulation/ode_tmpl.hpp",
79 this->add_as_parent(inter);
83 err(
"t0 is >= than tf",
"ode_tmpl::postprocess",
88 in.
retrieve(w_step,
"w_step",
this, -1.0);
90 err(
"tw is >= than tf, not writing intermittent data",
"ode_tmpl::postprocess",
91 "simulation/ode_tmpl.hpp",
WARNING);
97 this->memp.create(this->dimension, &sol);
101 inter->initial_condition(sol);
102 clock_t cval = clock();
103 if(w_step < 0 ||
abs(w_step) <= std::numeric_limits<double>::epsilon()){
105 inter->integrate(sol, t0, tf);
109 inter->integrate(sol, t0, tw);
111 integrate_with_writes();
114 std::cout <<
"Simulation took " << ((double)(clock()-cval))/CLOCKS_PER_SEC <<
" seconds" << std::endl;
119 return "ode_tmpl<"+this->vname() +
">";