You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 23, 2025. It is now read-only.
* add change log entry for #35
* resolve#25
* bump to v1.1.0
* fix up
* remove old codecov.yml
* explicitly list source dirs in .coveragerc
* more settings in .coveragerc
* add pypi badge
Copy file name to clipboardExpand all lines: idesolver/idesolver.py
+21-8Lines changed: 21 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -84,15 +84,19 @@ class IDESolver:
84
84
Attributes
85
85
----------
86
86
x : :class:`numpy.ndarray`
87
-
The positions where the solution is calculated (i.e., where `y` is evaluated).
87
+
The positions where the solution is calculated (i.e., where :math:`y` is evaluated).
88
88
y : :class:`numpy.ndarray`
89
-
The solution :math:`y(x)`. ``None`` until :meth:`IDESolver.solve` is finished.
89
+
The solution :math:`y(x)`.
90
+
``None`` until :meth:`IDESolver.solve` is finished.
90
91
global_error : :class:`float`
91
-
The final global error estimate. ``None`` until :meth:`IDESolver.solve` is finished.
92
+
The final global error estimate.
93
+
``None`` until :meth:`IDESolver.solve` is finished.
92
94
iteration : :class:`int`
93
-
The current iteration. ``None`` until :meth:`IDESolver.solve` starts.
95
+
The current iteration.
96
+
``None`` until :meth:`IDESolver.solve` starts.
94
97
y_intermediate :
95
-
The intermediate solutions. Only exists if `store_intermediate_y` is ``True``.
98
+
The intermediate solutions.
99
+
Only exists if ``store_intermediate_y`` is ``True``.
96
100
97
101
"""
98
102
@@ -122,31 +126,40 @@ def __init__(
122
126
Parameters
123
127
----------
124
128
x : :class:`numpy.ndarray`
125
-
The array of :math:`x` values to find the solution :math:`y(x)` at. Generally something like ``numpy.linspace(a, b, num_pts)``.
129
+
The array of :math:`x` values to find the solution :math:`y(x)` at.
130
+
Generally something like ``numpy.linspace(a, b, num_pts)``.
126
131
y_0 : :class:`float` or :class:`complex` or :class:`numpy.ndarray`
127
132
The initial condition, :math:`y_0 = y(a)` (can be multidimensional).
128
133
c :
129
134
The function :math:`c(y, x)`.
135
+
Defaults to :math:`c(y, x) = 0`.
130
136
d :
131
137
The function :math:`d(x)`.
138
+
Defaults to :math:`d(x) = 1`.
132
139
k :
133
140
The kernel function :math:`k(x, s)`.
141
+
Defaults to :math:`k(x, s) = 1`.
134
142
f :
135
143
The function :math:`F(y)`.
144
+
Defaults to :math:`f(y) = 0`.
136
145
lower_bound :
137
146
The lower bound function :math:`\\alpha(x)`.
147
+
Defaults to the first element of ``x``.
138
148
upper_bound :
139
149
The upper bound function :math:`\\beta(x)`.
150
+
Defaults to the last element of ``x``.
140
151
global_error_tolerance : :class:`float`
141
152
The algorithm will continue until the global errors goes below this or uses more than `max_iterations` iterations. If ``None``, the algorithm continues until hitting `max_iterations`.
142
153
max_iterations : :class:`int`
143
154
The maximum number of iterations to use. If ``None``, iteration will not stop unless the `global_error_tolerance` is satisfied. Defaults to ``None``.
144
155
ode_method : :class:`str`
145
156
The ODE solution method to use. As the `method` option of :func:`scipy.integrate.solve_ivp`. Defaults to ``'RK45'``, which is good for non-stiff systems.
146
157
ode_atol : :class:`float`
147
-
The absolute tolerance for the ODE solver. As the `atol` argument of :func:`scipy.integrate.solve_ivp`.
158
+
The absolute tolerance for the ODE solver.
159
+
As the `atol` argument of :func:`scipy.integrate.solve_ivp`.
148
160
ode_rtol : :class:`float`
149
-
The relative tolerance for the ODE solver. As the `rtol` argument of :func:`scipy.integrate.solve_ivp`.
161
+
The relative tolerance for the ODE solver.
162
+
As the `rtol` argument of :func:`scipy.integrate.solve_ivp`.
150
163
int_atol : :class:`float`
151
164
The absolute tolerance for the integration routine. As the `epsabs` argument of :func:`scipy.integrate.quad`.
0 commit comments