Commit Graph

1384 Commits

Author SHA1 Message Date
Mario Mulansky
db8f91a51d
Merge pull request #36 from boostorg/develop
Merge develop into master
2019-05-25 09:54:52 -07:00
Mario Mulansky
2bbc186b43 Merge branch 'develop' of github.com:boostorg/odeint into develop 2019-04-20 11:56:36 -07:00
Mario Mulansky
fc43a2ef44 Merge branch 'master' of github.com:headmyshoulder/odeint-v2 into develop 2019-04-20 11:49:37 -07:00
Mario Mulansky
db8b39ae27
Change eigen algebra to support Eigen>=3.3 (#237)
* Change eigen algebra to support Eigen>=3.3

An internal change in Eigen made odeint incompatible with Eigen
versions >=3.3. This commit changes odeint in such a way that it
does not rely on the changed behvior, so it is now compatible with
old and new Eigen.

Fixes #194

* Remove obsolete Eigen fail compile test

* Remove compile-fail test for C++98 unwrap_reference
2019-03-16 16:20:44 -07:00
Mario Mulansky
ee44ba9e36
Revert "Fixed incorrect constant in Dormand–Prince Runge–Kutta Butcher tableau. (#235)" (#236)
This reverts commit 75fe4e19ad.
2019-03-02 11:42:32 -08:00
Garret McGraw
75fe4e19ad Fixed incorrect constant in Dormand–Prince Runge–Kutta Butcher tableau. (#235) 2019-03-02 11:17:09 -08:00
Markus Friedrich
5dd9519b7b Enable the adaption of the maximal step size of dense output steppers. (#225)
* Enable the adaption of the maximal step size of dense output steppers.

For efficient simulation of "hybrid" systems the integrator must approach
the sample points where the discrete variables change their value.

(hybrid systems = systems of ODEs which include discrete variables, beeing
internal variables of the system which only change their value at discrete
sample points)

Approaching sample points can be done by adapting the maximal integrator
step size to min(max_step_size, next_sample_point_time - current_time)
before each do_step.

To achive this in odeint for all dense output steppers the following
changes must be done (which does not change the existing API):
- make private members in bulirsch_stoer_dense_out,
  default_step_adjuster, rosenbrock4_controller protected.
- allow std::ref/boost::ref for step_adjuster in controlled_runge_kutta
  and controlled_runge_kutta and for stepper in rosenbrock4_dense_output
  by unwrapping these before use.
This allows to pass the step adjusters by reference to the dense output
steppers which than allows to change the maximal step size (in the step
adjuster) before each call to do_step.

* Added test for a reference controller in the Rosenbrock4 dense output stepper.

* Make in bulirsch_stoer_dense_out only the required m_max_dt member
protected not all.

Extend the test in rosenbrock4.cpp to test that the controller is a
reference and the maximal step size is applied.

* Fixed build with gcc-4.8
2018-02-12 20:13:12 -08:00
Markus Friedrich
a393540e17 Fixed dense_output_runge_kutta<Stepper, stepper_tag>::do_step(...) (#224)
do_step must return the pair (t, t+dt) but (t, dt) is returned.

Note that dense_output_runge_kutta<Stepper, explicit_controlled_stepper_fsal_tag>::do_step(...)
works correctly.
2018-01-20 11:24:22 -08:00
Mario Mulansky
d94c80da6a
Merge pull request #29 from pavelkryukov/develop
Remove deprecated std::unary_function from molecular_dynamics_cells.cpp
2018-01-17 22:52:17 -08:00
Pavel I. Kryukov
9a21dbe8bd Remove deprecated std::unary_function from molecular_dynamics_cells.cpp 2018-01-17 14:57:48 +03:00
Mario Mulansky
6ff2719b69
Merge pull request #28 from boostorg/revert-24-patch-2
Revert "Remove deprecated std::unary_function from molecular_dynamics_cells.cpp"
2018-01-05 17:31:54 +01:00
Mario Mulansky
f3180e9928
Revert "Remove deprecated std::unary_function from molecular_dynamics_cells.cpp" 2018-01-05 17:31:24 +01:00
Mario Mulansky
b4bf0b1b41
Merge pull request #24 from pavelkryukov/patch-2
Remove deprecated std::unary_function from molecular_dynamics_cells.cpp
2018-01-05 17:26:55 +01:00
Valentin Hartmann
30fd68fbb3 adds controlled initialization (#216)
- errors might already occur during the first few steps if the stepsize is chosen too big
- initialize_controlled takes advantage of controlled steppers to initialize the controlled abm stepper
2018-01-05 17:22:52 +01:00
Mario Mulansky
a25c8eb665
Merge pull request #23 from corell-hd/patch-1
add template parameter to vector_space_norm_inf
2018-01-05 17:18:07 +01:00
Pavel I. Kryukov
adf673cd69
Remove deprecated std::unary_function from molecular_dynamics_cells.cpp 2017-11-20 19:09:52 +03:00
Valentin Hartmann
34def567d2 fix initialization with external stepper (#215)
- time was not increased over the iterations
- prediction of dxdt was taken before integrating with the supplied stepper instead of after
2017-11-12 12:12:17 -08:00
corell-hd
3f3192d84f add template parameter to vector_space_norm_inf
Adding an additional template parameter which defaults to void allows for template specialization using SFINAE.
2017-10-13 04:06:51 +02:00
Valentin Hartmann
540f46f42c Improvement to Order Selection, Error approximation in the ABM stepper (#218)
* improves the order selection and modifies the error estimation accordingly

- assumes constant stepsize for the next step to approximate error
- moves the complete order adjustment to the class order_adjustment
- slight changes to adaptive_adams_coefficients

* changed the commit according to the requests and comments
2017-09-25 15:22:51 -07:00
headmyshoulder
944fe8eed5 Merge pull request #21 from boostorg/develop
bug fixes for Boost 1.65
2017-07-28 16:23:03 +02:00
Mario Mulansky
af59be4beb Merge pull request #214 from ds283/switch-fabs
Switch fabs for std::abs in new adaptive Adams-Bashforth-Moulton stepper
2017-07-25 10:40:55 -07:00
ds283
f1098483ea Switch fabs for std::abs
- controlled_adams_bashforth_moulton.hpp, adaptive_adams_coefficients.hpp and pid_step_adjuster.hpp extract absolute values using fabs() without a namespace qualifier

- if the integration value type is not double then this can cause problems, since fabs() is not required to have a long double overload. In such cases it is safer to use std::abs, and also this matches the rest of the odeint-v2 codebase
2017-07-23 22:31:35 +01:00
Mario Mulansky
38695b42ee Merge pull request #208 from vhartman/adaptive_adams
Added Controlled Adams Bashforth Moulton Stepper
2017-07-16 08:01:40 -07:00
Valentin Hartmann
11bf5d56c5 replace assignment with boost::copy 2017-07-08 21:21:47 +02:00
Valentin Hartmann
b38159f51a add relative error to step adjuster 2017-07-07 17:25:26 +02:00
Valentin Hartmann
c673986a13 formatting 2017-07-06 20:07:56 +02:00
Valentin Hartmann
fa6621e43c updated order selection 2017-07-06 19:38:51 +02:00
Valentin Hartmann
4a3477ed0b fixed ratio-selection 2017-07-05 17:53:48 +02:00
Valentin Hartmann
ef866e14aa templating the pid adjuster 2017-07-04 22:03:58 +02:00
Valentin Hartmann
a21f49a736 slight changes to initialization to allow for order correction 2017-07-04 21:15:15 +02:00
Valentin Hartmann
b500829677 enabling negative coefficients 2017-07-04 11:48:55 +02:00
Valentin Hartmann
ca96850106 fixed wrong order assignment when failing a step 2017-07-04 01:21:35 +02:00
Valentin Hartmann
5a6c6bba5c added detail:: to ref 2017-07-03 16:59:14 +02:00
Valentin Hartmann
12714d481a fix issues with compiling on travis 2017-07-03 16:43:48 +02:00
Valentin Hartmann
dceea2015a slight formatting changes 2017-07-03 15:25:51 +02:00
Valentin Hartmann
848d7f1938 completed testcases 2017-07-03 14:42:41 +02:00
Valentin Hartmann
1b767b38d6 adapting tests to new formulation 2017-07-02 19:16:10 +02:00
Valentin Hartmann
a463262c7d slight changes to stepsize control 2017-07-02 15:16:32 +02:00
Valentin Hartmann
c5aab45386 moving to new formulation 2017-07-02 15:14:09 +02:00
Valentin Hartmann
7fe4477acf Tests for numeric precision, initializing procedure for steppers 2017-06-23 15:05:20 +02:00
Valentin Hartmann
dc2fbddd7a added self-initialization to adaptive adams stepper 2017-06-23 11:14:22 +02:00
Valentin Hartmann
92e76299f1 corrected indentation 2017-06-22 17:50:49 +02:00
Valentin Hartmann
d0dad9a53a changed tabs to spaces in all files 2017-06-22 17:44:49 +02:00
Valentin Hartmann
079f3ffa4d fixed problems in testcases 2017-06-21 21:32:18 +02:00
Valentin Hartmann
073e1e0143 more test cases 2017-06-21 18:14:46 +02:00
Valentin Hartmann
b29586d9d3 implemented adaptive adams bashforth moulton to enable make_controlled 2017-06-21 18:13:25 +02:00
Valentin Hartmann
16801429c9 modifications to stepper to allow make_controlled 2017-06-20 17:04:15 +02:00
Valentin Hartmann
5fe4175a61 removed print used in debugging 2017-06-19 16:28:29 +02:00
Valentin Hartmann
28b01caee7 minor naming changes 2017-06-19 16:13:58 +02:00
Valentin Hartmann
ca966c2736 compiles without c++11 2017-06-19 10:41:38 +02:00