Skip to content

Commit

Permalink
standardise HermiteGRX imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rieder committed Jul 2, 2024
1 parent 36bd949 commit 9e1120c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/amuse/community/hermite_grx/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# generated file
from .interface import Hermitegrx
11 changes: 8 additions & 3 deletions src/amuse/community/hermite_grx/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from amuse.community.interface.stopping_conditions import *


class HermiteGRXInterface(
class HermitegrxInterface(
CodeInterface, GravitationalDynamicsInterface, StoppingConditionInterface
):
include_headers = ["worker_code.h", "stopcond.h"]
Expand Down Expand Up @@ -423,11 +423,11 @@ def set_jerk():
return function


class HermiteGRX(GravitationalDynamics):
class Hermitegrx(GravitationalDynamics):
def __init__(self, convert_nbody=None, **options):
self.stopping_conditions = StoppingConditions(self)

legacy_interface = HermiteGRXInterface(**options)
legacy_interface = HermitegrxInterface(**options)
GravitationalDynamics.__init__(self, legacy_interface, convert_nbody, **options)

def define_state(self, object):
Expand Down Expand Up @@ -597,3 +597,8 @@ def define_particle_sets(self, object):
object.add_getter("small_particles", "get_jerk")

self.stopping_conditions.define_particle_set(object)


# for backwards compatibility reasons
HermiteGRXInterface = HermitegrxInterface
HermiteGRX = Hermitegrx

0 comments on commit 9e1120c

Please sign in to comment.