brainpy.integrators.ode.explicit_rk.RK4Rule38
brainpy.integrators.ode.explicit_rk.RK4Rule38#
- class brainpy.integrators.ode.explicit_rk.RK4Rule38(f, var_type=None, dt=None, name=None, show_code=False, state_delays=None, neutral_delays=None)[source]#
3/8-rule fourth-order method for ODEs.
A slight variation of “the” Runge–Kutta method is also due to Kutta in 1901 1 and is called the 3/8-rule. The primary advantage this method has is that almost all of the error coefficients are smaller than in the popular method, but it requires slightly more FLOPs (floating-point operations) per time step.
It has the characteristics of:
method stage = 4
method order = 4
Butcher Tables:
\[\begin{split}\begin{array}{c|cccc} 0 & 0 & 0 & 0 & 0 \\ 1 / 3 & 1 / 3 & 0 & 0 & 0 \\ 2 / 3 & -1 / 3 & 1 & 0 & 0 \\ 1 & 1 & -1 & 1 & 0 \\ \hline & 1 / 8 & 3 / 8 & 3 / 8 & 1 / 8 \end{array}\end{split}\]References
- 1
Hairer, Ernst; Nørsett, Syvert Paul; Wanner, Gerhard (1993), Solving ordinary differential equations I: Nonstiff problems, Berlin, New York: Springer-Verlag, ISBN 978-3-540-56670-0.
- __init__(f, var_type=None, dt=None, name=None, show_code=False, state_delays=None, neutral_delays=None)#
Methods
__init__
(f[, var_type, dt, name, show_code, ...])build
()load_states
(filename[, verbose])Load the model states.
nodes
([method, level, include_self])Collect all children nodes.
register_implicit_nodes
(nodes)register_implicit_vars
(variables)save_states
(filename[, variables])Save the model states.
set_integral
(f)Set the integral function.
train_vars
([method, level, include_self])The shortcut for retrieving all trainable variables.
unique_name
([name, type_])Get the unique name for this object.
vars
([method, level, include_self])Collect all variables in this node and the children nodes.
Attributes
A
B
C
arg_names
arguments
All arguments when calling the numer integrator of the differential equation.
dt
The numerical integration precision.
integral
The integral function.
name
neutral_delays
neutral delays.
parameters
The parameters defined in the differential equation.
state_delays
State delays.
variables
The variables defined in the differential equation.