@@ -49,7 +49,7 @@ def __instancecheck__(cls, obj):
49
49
_set_metaclass = dict (metaclass = _MetaAbstractSolver )
50
50
51
51
52
- class AbstractSolver (eqx .Module , Generic [_SolverState ], ** _set_metaclass ):
52
+ class AbstractSolver (eqx .Module , Generic [_SolverState ], strict = True , ** _set_metaclass ):
53
53
"""Abstract base class for all differential equation solvers.
54
54
55
55
Subclasses should have a class-level attribute `terms`, specifying the PyTree
@@ -179,7 +179,7 @@ def func(
179
179
"""
180
180
181
181
182
- class AbstractImplicitSolver (AbstractSolver [_SolverState ]):
182
+ class AbstractImplicitSolver (AbstractSolver [_SolverState ], strict = True ):
183
183
"""Indicates that this is an implicit differential equation solver, and as such
184
184
that it should take a root finder as an argument.
185
185
"""
@@ -188,25 +188,25 @@ class AbstractImplicitSolver(AbstractSolver[_SolverState]):
188
188
root_find_max_steps : AbstractVar [int ]
189
189
190
190
191
- class AbstractItoSolver (AbstractSolver [_SolverState ]):
191
+ class AbstractItoSolver (AbstractSolver [_SolverState ], strict = True ):
192
192
"""Indicates that when used as an SDE solver that this solver will converge to the
193
193
Itô solution.
194
194
"""
195
195
196
196
197
- class AbstractStratonovichSolver (AbstractSolver [_SolverState ]):
197
+ class AbstractStratonovichSolver (AbstractSolver [_SolverState ], strict = True ):
198
198
"""Indicates that when used as an SDE solver that this solver will converge to the
199
199
Stratonovich solution.
200
200
"""
201
201
202
202
203
- class AbstractAdaptiveSolver (AbstractSolver [_SolverState ]):
203
+ class AbstractAdaptiveSolver (AbstractSolver [_SolverState ], strict = True ):
204
204
"""Indicates that this solver provides error estimates, and that as such it may be
205
205
used with an adaptive step size controller.
206
206
"""
207
207
208
208
209
- class AbstractWrappedSolver (AbstractSolver [_SolverState ]):
209
+ class AbstractWrappedSolver (AbstractSolver [_SolverState ], strict = True ):
210
210
"""Wraps another solver "transparently", in the sense that all `isinstance` checks
211
211
will be forwarded on to the wrapped solver, e.g. when testing whether the solver is
212
212
implicit/adaptive/SDE-compatible/etc.
0 commit comments