Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions desolver/integrators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
RK4Solver,
MidpointSolver,
HeunsSolver,
RalstonsSolver,
EulerSolver,
EulerTrapSolver,
HeunEulerSolver,
Expand Down
23 changes: 21 additions & 2 deletions desolver/integrators/explicit_integration_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'RK4Solver',
'MidpointSolver',
'HeunsSolver',
'RalstonsSolver',
'EulerSolver',
'EulerTrapSolver',
'HeunEulerSolver',
Expand Down Expand Up @@ -242,14 +243,14 @@ class MidpointSolver(RungeKuttaIntegrator):
[[0, 0, 1]], dtype=numpy.float64
)

class HeunsSolver(RungeKuttaIntegrator):
class RalstonsSolver(RungeKuttaIntegrator):
"""
The derived class that implements Heun's method.
"""

__order__ = 2.0

__alt_names__ = ("Explicit Heun's", "Heun's")
__alt_names__ = ("Explicit Ralston's", "Ralston's")

tableau_intermediate = numpy.array(
[[0, 0, 0 ],
Expand All @@ -260,6 +261,24 @@ class HeunsSolver(RungeKuttaIntegrator):
[[0, 1/4, 3/4]], dtype=numpy.float64
)

class HeunsSolver(RungeKuttaIntegrator):
"""
The derived class that implements Heun's method.
"""

__order__ = 2.0

__alt_names__ = ("Explicit Heun's", "Heun's")

tableau_intermediate = numpy.array(
[[0, 0, 0],
[1, 1, 0]], dtype=numpy.float64
)

tableau_final = numpy.array(
[[0, 1/2, 1/2]], dtype=numpy.float64
)

class EulerSolver(RungeKuttaIntegrator):
"""
The derived class that implements the Euler method.
Expand Down
Loading