]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | [/============================================================================ |
2 | Boost.odeint | |
3 | ||
4 | Copyright 2011-2012 Karsten Ahnert | |
5 | Copyright 2011 Mario Mulansky | |
6 | ||
7 | Use, modification and distribution is subject to the Boost Software License, | |
8 | Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
9 | http://www.boost.org/LICENSE_1_0.txt) | |
10 | =============================================================================/] | |
11 | ||
12 | ||
13 | [section Controlled Stepper] | |
14 | ||
15 | This concept specifies the interface a controlled stepper has to fulfill to be used within __integrate_functions. | |
16 | ||
17 | [heading Description] | |
18 | ||
19 | A controlled stepper following this Controlled Stepper concept provides the possibility to perform one step of the solution /x(t)/ of an ODE with step-size /dt/ to obtain /x(t+dt)/ with a given step-size /dt/. | |
20 | Depending on an error estimate of the solution the step might be rejected and a smaller step-size is suggested. | |
21 | ||
22 | [heading Associated types] | |
23 | ||
24 | * '''<para>'''[*state_type]'''</para>''' | |
25 | '''<para>'''`Stepper::state_type`'''</para>''' | |
26 | '''<para>'''The type characterizing the state of the ODE, hence ['x].'''</para>''' | |
27 | ||
28 | * '''<para>'''[*deriv_type]'''</para>''' | |
29 | '''<para>'''`Stepper::deriv_type`'''</para>''' | |
30 | '''<para>'''The type characterizing the derivative of the ODE, hence ['d x/dt].'''</para>''' | |
31 | ||
32 | * '''<para>'''[*time_type]'''</para>''' | |
33 | '''<para>'''`Stepper::time_type`'''</para>''' | |
34 | '''<para>'''The type characterizing the dependent variable of the ODE, hence the time ['t].'''</para>''' | |
35 | ||
36 | * '''<para>'''[*value_type]'''</para>''' | |
37 | '''<para>'''`Stepper::value_type`'''</para>''' | |
38 | '''<para>'''The numerical data type which is used within the stepper, something like `float`, `double`, `complex< double >`.'''</para>''' | |
39 | ||
40 | * '''<para>'''[*stepper_category]'''</para>''' | |
41 | '''<para>'''`Stepper::stepper_category`'''</para>''' | |
42 | '''<para>'''A tag type characterizing the category of the stepper. This type must be convertible to `controlled_stepper_tag`.'''</para>''' | |
43 | ||
44 | ||
45 | ||
46 | [heading Notation] | |
47 | ||
48 | [variablelist | |
49 | [[`ControlledStepper`] [A type that is a model of Controlled Stepper]] | |
50 | [[`State`] [A type representing the state /x/ of the ODE]] | |
51 | [[`Time`] [A type representing the time /t/ of the ODE]] | |
52 | [[`stepper`] [An object of type `ControlledStepper`]] | |
53 | [[`x`] [Object of type `State`]] | |
54 | [[`t`, `dt`] [Objects of type `Time`]] | |
55 | [[`sys`] [An object defining the ODE, should be a model of __system, __symplectic_system, __simple_symplectic_system or __implicit_system.]] | |
56 | ] | |
57 | ||
58 | [heading Valid Expressions] | |
59 | ||
60 | [table | |
61 | [[Name] [Expression] [Type] [Semantics]] | |
62 | [[Do step] [``stepper.try_step( sys , x , t , dt )``] [`controlled_step_result`] [Tries one step of step size `dt`. If the step was successful, `success` is returned, the resulting state is written to `x`, the new time is stored in `t` and `dt` now contains a new (possibly larger) step-size for the next step. If the error was too big, `rejected` is returned and the results are neglected - `x` and `t` are unchanged and `dt` now contains a reduced step-size to be used for the next try.] ] | |
63 | [/ [Do step with reference] [`stepper.try_step( boost::ref(sys) , x , t , dt )`] [`void`] [Same as above with `System` as reference] ] | |
64 | ] | |
65 | ||
66 | [heading Models] | |
67 | ||
68 | * `controlled_error_stepper< runge_kutta_cash_karp54 >` | |
69 | * `controlled_error_stepper_fsal< runge_kutta_dopri5 >` | |
70 | * `controlled_error_stepper< runge_kutta_fehlberg78 >` | |
71 | * `rosenbrock4_controller` | |
72 | * `bulirsch_stoer` | |
73 | ||
74 | [endsect] |