RungeKutta¶
(Source code, png, hires.png, pdf)
-
class
RungeKutta
(*args)¶ Runge-Kutta fourth-order method.
- Parameters
- transitionFunction
Function
The function defining the flow of the ordinary differential equation. Must have one parameter.
- transitionFunction
See also
Examples
>>> import openturns as ot >>> f = ot.SymbolicFunction(['t', 'y0', 'y1'], ['t - y0', 'y1 + t^2']) >>> phi = ot.ParametricFunction(f, [0], [0.0]) >>> solver = ot.RungeKutta(phi) >>> Y0 = [1.0, -1.0] >>> nt = 100 >>> timeGrid = [(i**2.0) / (nt - 1.0)**2.0 for i in range(nt)] >>> result = solver.solve(Y0, timeGrid)
Methods
Accessor to the object’s name.
getId
()Accessor to the object’s id.
getName
()Accessor to the object’s name.
Accessor to the object’s shadowed id.
Transition function accessor.
Accessor to the object’s visibility state.
hasName
()Test if the object is named.
Test if the object has a distinguishable name.
setName
(name)Accessor to the object’s name.
setShadowedId
(id)Accessor to the object’s shadowed id.
setTransitionFunction
(transitionFunction)Transition function accessor.
setVisibility
(visible)Accessor to the object’s visibility state.
solve
(*args)Solve ODE.
-
__init__
(*args)¶ Initialize self. See help(type(self)) for accurate signature.
-
getClassName
()¶ Accessor to the object’s name.
- Returns
- class_namestr
The object class name (object.__class__.__name__).
-
getId
()¶ Accessor to the object’s id.
- Returns
- idint
Internal unique identifier.
-
getName
()¶ Accessor to the object’s name.
- Returns
- namestr
The name of the object.
-
getShadowedId
()¶ Accessor to the object’s shadowed id.
- Returns
- idint
Internal unique identifier.
-
getTransitionFunction
()¶ Transition function accessor.
- Returns
- transitionFunction
FieldFunction
Transition function.
- transitionFunction
-
getVisibility
()¶ Accessor to the object’s visibility state.
- Returns
- visiblebool
Visibility flag.
-
hasName
()¶ Test if the object is named.
- Returns
- hasNamebool
True if the name is not empty.
-
hasVisibleName
()¶ Test if the object has a distinguishable name.
- Returns
- hasVisibleNamebool
True if the name is not empty and not the default one.
-
setName
(name)¶ Accessor to the object’s name.
- Parameters
- namestr
The name of the object.
-
setShadowedId
(id)¶ Accessor to the object’s shadowed id.
- Parameters
- idint
Internal unique identifier.
-
setTransitionFunction
(transitionFunction)¶ Transition function accessor.
- Parameters
- transitionFunction
FieldFunction
Transition function.
- transitionFunction
-
setVisibility
(visible)¶ Accessor to the object’s visibility state.
- Parameters
- visiblebool
Visibility flag.