-
neso_fame.hypnotoad_interface.integrate_vectorized(start: numpy.typing.ArrayLike, scale: float =
1.0
, fixed_points: dict[float, numpy.typing.ArrayLike] ={}
, rtol: float =1e-12
, atol: float =1e-14
, vectorize_integrand_calls: bool =True
, event_generator: Callable[[float], Callable[[float, numpy.typing.NDArray], float]] | None =None
) Callable[[Integrand], IntegratedFunction] Return a vectorised numerically-integrated function.
Decorator that will numerically integrate an ODE and return a callable that is vectorised. The integration will start from t=0. You must specify the y-value at that starting point. You may optionally specify additional “fixed points” which should fall along the curve at chosen t-values. If someone requests a result at this position, the fixed-point will be returned instead. This can be useful if you need to enforce the end-point of a curve to within a very high level of precision.
- Parameters:¶
- start: numpy.typing.ArrayLike¶
The starting point for the integration
- scale: float =
1.0
¶ By default the integration will be performed between 0 and 1, but you can increase or decrease it by a factor of scale
- fixed_points: dict[float, numpy.typing.ArrayLike] =
{}
¶ Keys are values of the integration variable at which the solution is assumed to be the corresponding value in the dictionary. Useful to make sure end-points are respected exactly.
- rtol: float =
1e-12
¶ Relative tolerance to use for the integration.
- atol: float =
1e-14
¶ Absolute tolerance to use for hte integration.
- vectorize_integrand_calls: bool =
True
¶ Whether calls to the integrand can be done in a vectorised manner.
- event_generator: Callable[[float], Callable[[float, numpy.typing.NDArray], float]] | None =
None
¶ If present, will use this function to create events that indicate when the integration has reached one of the t_eval points.
- Returns:¶
A decorator that will take an integrand a return a function that is the solution of the ODE.
- Return type:¶
Last update:
Nov 07, 2024