Beispiel #1
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)
        self.stopping_conditions.define_methods(handler)

        ####################################################

        handler.add_method("get_t_begin", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_t_begin", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_dt", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_dt", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_t", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_t", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))
Beispiel #2
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)
        self.stopping_conditions.define_methods(object)

        object.add_method("get_bs_tolerance", (), (
            object.NO_UNIT,
            object.ERROR_CODE,
        ))
        object.add_method("set_bs_tolerance", (object.NO_UNIT, ),
                          (object.ERROR_CODE, ))

        object.add_method("get_word_length", (), (
            object.NO_UNIT,
            object.ERROR_CODE,
        ))
        object.add_method("set_word_length", (object.NO_UNIT, ),
                          (object.ERROR_CODE, ))

        object.add_method("get_eta", (), (
            object.NO_UNIT,
            object.ERROR_CODE,
        ))
        object.add_method("set_eta", (object.NO_UNIT, ), (object.ERROR_CODE, ))

        object.add_method("get_brutus_output_directory", (), (
            object.NO_UNIT,
            object.ERROR_CODE,
        ))
        object.add_method("set_brutus_output_directory", (object.NO_UNIT, ),
                          (object.ERROR_CODE, ))
Beispiel #3
0
 def define_methods(self, handler):
     GravitationalDynamics.define_methods(self, handler)
     handler.add_method("get_eps2", (), (
         nbody_system.length * nbody_system.length,
         handler.ERROR_CODE,
     ))
     handler.add_method("set_eps2",
                        (nbody_system.length * nbody_system.length, ),
                        (handler.ERROR_CODE, ))
     handler.add_method('get_gravity_at_point', (
         nbody_system.length,
         nbody_system.length,
         nbody_system.length,
         nbody_system.length,
     ), (
         nbody_system.acceleration,
         nbody_system.acceleration,
         nbody_system.acceleration,
     ))
     handler.add_method('get_potential_at_point', (
         nbody_system.length,
         nbody_system.length,
         nbody_system.length,
         nbody_system.length,
     ), (nbody_system.potential, ))
Beispiel #4
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     object.add_method(
         "set_time",
         (nbody_system.time,),
         (object.ERROR_CODE,)
     )
     object.add_method(
         "set_time_step",
         (nbody_system.time,),
         (object.ERROR_CODE,)
     )
     object.add_method(
         "get_eps2",
         (),
         (nbody_system.length**2, object.ERROR_CODE,)
     )
     object.add_method(
         "get_time",
         (),
         (nbody_system.time, object.ERROR_CODE,)
     )
     object.add_method(
         "set_eps2",
         (nbody_system.length**2,),
         (object.ERROR_CODE,)
     )
     self.stopping_conditions.define_methods(object)
Beispiel #5
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     object.add_method(
         "set_time",
         (nbody_system.time,),
         (object.ERROR_CODE,)
     )
     object.add_method(
         "set_time_step",
         (nbody_system.time,),
         (object.ERROR_CODE,)
     )
     object.add_method(
         "get_eps2",
         (),
         (nbody_system.length**2, object.ERROR_CODE,)
     )
     object.add_method(
         "get_time",
         (),
         (nbody_system.time, object.ERROR_CODE,)
     )
     object.add_method(
         "set_eps2",
         (nbody_system.length**2,),
         (object.ERROR_CODE,)
     )
     self.stopping_conditions.define_methods(object)
Beispiel #6
0
 def define_methods(self, handler):
     GravitationalDynamics.define_methods(self, handler)
     handler.add_method(
         "set_time",
         (nbody_system.time,),
         (handler.ERROR_CODE,)
     )
     handler.add_method(
         "set_time_step",
         (nbody_system.time,),
         (handler.ERROR_CODE,)
     )
     handler.add_method(
         "get_eps2",
         (),
         (nbody_system.length**2, handler.ERROR_CODE,)
     )
     handler.add_method(
         "get_time",
         (),
         (nbody_system.time, handler.ERROR_CODE,)
     )
     handler.add_method(
         "set_eps2",
         (nbody_system.length**2,),
         (handler.ERROR_CODE,)
     )
     self.stopping_conditions.define_methods(handler)
Beispiel #7
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        object.add_method(
            "get_time",
            (),
            (nbody_system.time, object.ERROR_CODE,)
        )
        
        object.add_method(
            "set_time",
            (nbody_system.time, ),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "get_time_step",
            (),
            (nbody_system.time, object.ERROR_CODE,)
        )

        object.add_method(
            "set_time_step",
            (nbody_system.time, ),
            (object.ERROR_CODE,)
        )
Beispiel #8
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)
        self.stopping_conditions.define_methods(object)

        ####################################################

        object.add_method("get_t_begin", (), (
            nbody_system.time,
            object.ERROR_CODE,
        ))
        object.add_method("set_t_begin", (nbody_system.time, ),
                          (object.ERROR_CODE, ))

        object.add_method("get_dt", (), (
            nbody_system.time,
            object.ERROR_CODE,
        ))
        object.add_method("set_dt", (nbody_system.time, ),
                          (object.ERROR_CODE, ))

        object.add_method("get_t", (), (
            nbody_system.time,
            object.ERROR_CODE,
        ))
        object.add_method("set_t", (nbody_system.time, ),
                          (object.ERROR_CODE, ))
Beispiel #9
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     self.stopping_conditions.define_methods(object)
     
     object.add_method("get_eps2", (), (nbody_system.length**2, object.ERROR_CODE))
     object.add_method("set_eps2", (nbody_system.length**2,), (object.ERROR_CODE,))
     object.add_method("get_eps2_fs_fs", (), (nbody_system.length**2, object.ERROR_CODE))
     object.add_method("set_eps2_fs_fs", (nbody_system.length**2,), (object.ERROR_CODE,))
     object.add_method("get_eps2_fs_bh", (), (nbody_system.length**2, object.ERROR_CODE))
     object.add_method("set_eps2_fs_bh", (nbody_system.length**2,), (object.ERROR_CODE,))
     object.add_method("get_eps2_bh_bh", (), (nbody_system.length**2, object.ERROR_CODE))
     object.add_method("set_eps2_bh_bh", (nbody_system.length**2,), (object.ERROR_CODE,))
     
     object.add_method("get_eta_s", (), (object.NO_UNIT, object.ERROR_CODE))
     object.add_method("set_eta_s", (object.NO_UNIT,), (object.ERROR_CODE,))
     object.add_method("get_eta_fs", (), (object.NO_UNIT, object.ERROR_CODE))
     object.add_method("set_eta_fs", (object.NO_UNIT,), (object.ERROR_CODE,))
     object.add_method("get_eta_smbh", (), (object.NO_UNIT, object.ERROR_CODE))
     object.add_method("set_eta_smbh", (object.NO_UNIT,), (object.ERROR_CODE,))
     object.add_method("get_eta_imbh", (), (object.NO_UNIT, object.ERROR_CODE))
     object.add_method("set_eta_imbh", (object.NO_UNIT,), (object.ERROR_CODE,))
     
     object.add_method("get_max_relative_energy_error", (), (object.NO_UNIT, object.ERROR_CODE))
     object.add_method("set_max_relative_energy_error", (object.NO_UNIT,), (object.ERROR_CODE,))
     object.add_method("get_maximum_timestep", (), (nbody_system.time, object.ERROR_CODE))
     object.add_method("set_maximum_timestep", (nbody_system.time,), (object.ERROR_CODE,))
     
     object.add_method("get_smbh_mass", (), (nbody_system.mass, object.ERROR_CODE))
     object.add_method("set_smbh_mass", (nbody_system.mass,), (object.ERROR_CODE,))
     
     object.add_method("get_lightspeed", (), (nbody_system.speed, object.ERROR_CODE))
     object.add_method("set_lightspeed", (nbody_system.speed,), (object.ERROR_CODE,))
Beispiel #10
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)
        handler.add_method("new_particle", (
            nbody_system.mass,
            nbody_system.length,
            nbody_system.length,
            nbody_system.length,
            nbody_system.speed,
            nbody_system.speed,
            nbody_system.speed,
            nbody_system.length,
            handler.NO_UNIT,
        ), (
            handler.INDEX,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_potential_energy", (handler.INDEX, ), (
            nbody_system.mass * nbody_system.length**2 * nbody_system.time**-2,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_kinetic_energy", (handler.INDEX, ), (
            nbody_system.mass * nbody_system.length**2 * nbody_system.time**-2,
            handler.ERROR_CODE,
        ))
        handler.add_method('evolve_model', (nbody_system.time, handler.INDEX),
                           (handler.ERROR_CODE, ))
        handler.add_method('get_time', (handler.INDEX, ), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_time_step", (handler.INDEX, ), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_time_step", (
            nbody_system.time,
            handler.INDEX,
        ), (handler.ERROR_CODE, ))

        handler.add_method(
            "get_state", (handler.NO_UNIT, ),
            (nbody_system.mass, nbody_system.length, nbody_system.length,
             nbody_system.length, nbody_system.speed, nbody_system.speed,
             nbody_system.speed, nbody_system.length, handler.NO_UNIT,
             handler.ERROR_CODE))
        handler.add_method("get_subset", (handler.NO_UNIT, ),
                           (handler.NO_UNIT, handler.ERROR_CODE))
        handler.add_method("set_subset", (
            handler.NO_UNIT,
            handler.NO_UNIT,
        ), (handler.ERROR_CODE, ))
        handler.add_method('new_subset', (nbody_system.time, ), (
            handler.INDEX,
            handler.ERROR_CODE,
        ))
        self.stopping_conditions.define_methods(handler)
Beispiel #11
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     object.add_method(
         "new_gas_particle",
         (nbody_system.mass, nbody_system.length, nbody_system.length,
          nbody_system.length, nbody_system.speed, nbody_system.speed,
          nbody_system.speed), (object.INDEX, object.ERROR_CODE))
Beispiel #12
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)

        handler.add_method("set_lightspeed",
                           (nbody_system.length / nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_lightspeed", (), (
            nbody_system.length / nbody_system.time,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_time_step", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("set_tolerance", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_tolerance", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_radiated_gravitational_energy", (), (
            nbody_system.mass * nbody_system.length**2 * nbody_system.time**-2,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_total_energy", (), (
            nbody_system.mass * nbody_system.length**2 * nbody_system.time**-2,
            handler.ERROR_CODE,
        ))
Beispiel #13
0
 def define_methods(self, handler):
     GravitationalDynamics.define_methods(self, handler)
     self.stopping_conditions.define_methods(handler)
     
     handler.add_method("get_eps2", (), (nbody_system.length**2, handler.ERROR_CODE))
     handler.add_method("set_eps2", (nbody_system.length**2,), (handler.ERROR_CODE,))
     handler.add_method("get_eps2_fs_fs", (), (nbody_system.length**2, handler.ERROR_CODE))
     handler.add_method("set_eps2_fs_fs", (nbody_system.length**2,), (handler.ERROR_CODE,))
     handler.add_method("get_eps2_fs_bh", (), (nbody_system.length**2, handler.ERROR_CODE))
     handler.add_method("set_eps2_fs_bh", (nbody_system.length**2,), (handler.ERROR_CODE,))
     handler.add_method("get_eps2_bh_bh", (), (nbody_system.length**2, handler.ERROR_CODE))
     handler.add_method("set_eps2_bh_bh", (nbody_system.length**2,), (handler.ERROR_CODE,))
     
     handler.add_method("get_eta_s", (), (handler.NO_UNIT, handler.ERROR_CODE))
     handler.add_method("set_eta_s", (handler.NO_UNIT,), (handler.ERROR_CODE,))
     handler.add_method("get_eta_fs", (), (handler.NO_UNIT, handler.ERROR_CODE))
     handler.add_method("set_eta_fs", (handler.NO_UNIT,), (handler.ERROR_CODE,))
     handler.add_method("get_eta_smbh", (), (handler.NO_UNIT, handler.ERROR_CODE))
     handler.add_method("set_eta_smbh", (handler.NO_UNIT,), (handler.ERROR_CODE,))
     handler.add_method("get_eta_imbh", (), (handler.NO_UNIT, handler.ERROR_CODE))
     handler.add_method("set_eta_imbh", (handler.NO_UNIT,), (handler.ERROR_CODE,))
     
     handler.add_method("get_max_relative_energy_error", (), (handler.NO_UNIT, handler.ERROR_CODE))
     handler.add_method("set_max_relative_energy_error", (handler.NO_UNIT,), (handler.ERROR_CODE,))
     handler.add_method("get_maximum_timestep", (), (nbody_system.time, handler.ERROR_CODE))
     handler.add_method("set_maximum_timestep", (nbody_system.time,), (handler.ERROR_CODE,))
     
     handler.add_method("get_smbh_mass", (), (nbody_system.mass, handler.ERROR_CODE))
     handler.add_method("set_smbh_mass", (nbody_system.mass,), (handler.ERROR_CODE,))
     
     handler.add_method("get_lightspeed", (), (nbody_system.speed, handler.ERROR_CODE))
     handler.add_method("set_lightspeed", (nbody_system.speed,), (handler.ERROR_CODE,))
Beispiel #14
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)

        handler.add_method("set_integrator", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("set_eps2",
                           (nbody_system.length * nbody_system.length, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("set_timestep_parameter", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("set_time", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("set_timestep", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("set_dmdt", (
            handler.NO_UNIT,
            nbody_system.mass / nbody_system.time,
        ), (handler.ERROR_CODE, ))

        handler.add_method("get_integrator", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_eps2", (), (
            nbody_system.length * nbody_system.length,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_timestep_parameter", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_time", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_timestep", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_dmdt", (handler.NO_UNIT, ), (
            nbody_system.mass / nbody_system.time,
            handler.ERROR_CODE,
        ))

        self.stopping_conditions.define_methods(handler)
Beispiel #15
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        object.add_method(
            "get_eta",
            (),
            (object.NO_UNIT, object.ERROR_CODE,)
        )

        object.add_method(
            "set_eta",
            (object.NO_UNIT,),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "get_time",
            (),
            (nbody_system.time, object.ERROR_CODE,)
        )

        object.add_method(
            "set_begin_time",
            (nbody_system.time,),
            (object.ERROR_CODE,)
        )
        object.add_method(
            "get_begin_time",
            (),
            (nbody_system.time, object.ERROR_CODE,)
        )

        object.add_method(
            "get_eps2",
            (),
            (nbody_system.length * nbody_system.length, object.ERROR_CODE,)
        )

        object.add_method(
            "set_eps2",
            (nbody_system.length * nbody_system.length, ),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "set_clight",
            (nbody_system.speed,),
            (object.ERROR_CODE,)
        )
        object.add_method(
            "get_clight",
            (),
            (nbody_system.speed, object.ERROR_CODE,)
        )
Beispiel #16
0
    def define_methods(self, object):
        self.stopping_conditions.define_methods(object)
        GravitationalDynamics.define_methods(self, object)

        # Turn interface functions into methods.

        object.add_method(
            "new_particle",
            (nbody_system.mass, nbody_system.length, nbody_system.length,
             nbody_system.length, nbody_system.speed, nbody_system.speed,
             nbody_system.speed, nbody_system.length, object.NO_UNIT),
            (object.INDEX, object.ERROR_CODE))
Beispiel #17
0
    def define_methods(self, handler):
        self.stopping_conditions.define_methods(handler)
        GravitationalDynamics.define_methods(self, handler)

        # Turn interface functions into methods.

        handler.add_method(
            "new_particle",
            (nbody_system.mass, nbody_system.length, nbody_system.length,
             nbody_system.length, nbody_system.speed, nbody_system.speed,
             nbody_system.speed, nbody_system.length, handler.NO_UNIT),
            (handler.INDEX, handler.ERROR_CODE))
Beispiel #18
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        # Turn interface functions into methods.

        object.add_method("set_eps2",
                          (nbody_system.length * nbody_system.length),
                          (object.ERROR_CODE))

        object.add_method(
            "get_eps2", (),
            (nbody_system.length * nbody_system.length, object.ERROR_CODE))
Beispiel #19
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)

        handler.add_method(
            "get_eps2",
            (),
            (nbody_system.length * nbody_system.length, handler.ERROR_CODE,)
        )

        handler.add_method(
            "set_eps2",
            (nbody_system.length * nbody_system.length, ),
            (handler.ERROR_CODE,)
        )

        handler.add_method(
            "get_eta",
            (),
            (handler.NO_UNIT, handler.ERROR_CODE,)
        )

        handler.add_method(
            "set_eta1",
            (handler.NO_UNIT, ),
            (handler.ERROR_CODE,)
        )

        handler.add_method(
            "get_eta_s",
            (),
            (handler.NO_UNIT, handler.ERROR_CODE,)
        )

        handler.add_method(
            "set_eta_s",
            (handler.NO_UNIT, ),
            (handler.ERROR_CODE,)
        )

        handler.add_method(
            "get_initialize_once",
            (),
            (handler.NO_UNIT, handler.ERROR_CODE,)
        )

        handler.add_method(
            "set_initialize_once",
            (handler.NO_UNIT, ),
            (handler.ERROR_CODE,)
        )

        self.stopping_conditions.define_methods(handler)
Beispiel #20
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)
        
        object.add_method(
            "get_eps2",
            (),
            (nbody_system.length * nbody_system.length, object.ERROR_CODE,)
        )
        
        object.add_method(
            "set_eps2",
            (nbody_system.length * nbody_system.length, ),
            (object.ERROR_CODE,)
        )
        
        object.add_method(
            "get_timestep_parameter",
            (),
            (object.NO_UNIT, object.ERROR_CODE,)
        )
        
        object.add_method(
            "set_timestep_parameter",
            (object.NO_UNIT, ),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "get_timestep",
            (),
            (nbody_system.time, object.ERROR_CODE,)
        )
        
        object.add_method(
            "set_timestep",
            (nbody_system.time, ),
            (object.ERROR_CODE,)
        )

        
        object.add_method(
            "get_inttype_parameter",
            (),
            (object.NO_UNIT, object.ERROR_CODE,)
        )
        
        object.add_method(
            "set_inttype_parameter",
            (object.NO_UNIT, ),
            (object.ERROR_CODE,)
        )
        self.stopping_conditions.define_methods(object)
Beispiel #21
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        object.add_method(
            "get_eps2",
            (),
            (nbody_system.length * nbody_system.length, object.ERROR_CODE,)
        )

        object.add_method(
            "set_eps2",
            (nbody_system.length * nbody_system.length, ),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "get_eta",
            (),
            (object.NO_UNIT, object.ERROR_CODE,)
        )

        object.add_method(
            "set_eta1",
            (object.NO_UNIT, ),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "get_eta_s",
            (),
            (object.NO_UNIT, object.ERROR_CODE,)
        )

        object.add_method(
            "set_eta_s",
            (object.NO_UNIT, ),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "get_initialize_once",
            (),
            (object.NO_UNIT, object.ERROR_CODE,)
        )

        object.add_method(
            "set_initialize_once",
            (object.NO_UNIT, ),
            (object.ERROR_CODE,)
        )

        self.stopping_conditions.define_methods(object)
Beispiel #22
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        object.add_method(
            "get_eps2",
            (),
            (nbody_system.length * nbody_system.length, object.ERROR_CODE,)
        )

        object.add_method(
            "set_eps2",
            (nbody_system.length * nbody_system.length, ),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "get_timestep_parameter",
            (),
            (object.NO_UNIT, object.ERROR_CODE,)
        )

        object.add_method(
            "set_timestep_parameter",
            (object.NO_UNIT, ),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "get_timestep",
            (),
            (nbody_system.time, object.ERROR_CODE,)
        )

        object.add_method(
            "set_timestep",
            (nbody_system.time, ),
            (object.ERROR_CODE,)
        )


        object.add_method(
            "get_inttype_parameter",
            (),
            (object.NO_UNIT, object.ERROR_CODE,)
        )

        object.add_method(
            "set_inttype_parameter",
            (object.NO_UNIT, ),
            (object.ERROR_CODE,)
        )
        self.stopping_conditions.define_methods(object)
Beispiel #23
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)

        # Similarly, we can add module-specific methods, if desired.
        # See hermite0/interface.py for examples.

        handler.add_method("get_nmax", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_nmax", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_dtmax", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_dtmax", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_h2max", (), (
            nbody_system.length * nbody_system.length,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_h2max",
                           (nbody_system.length * nbody_system.length, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_eta_irr", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_eta_irr", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_eta_reg", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_eta_reg", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_eps2", (), (
            nbody_system.length * nbody_system.length,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_eps2",
                           (nbody_system.length * nbody_system.length, ),
                           (handler.ERROR_CODE, ))

        self.stopping_conditions.define_methods(handler)
Beispiel #24
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)
        self.stopping_conditions.define_methods(object)

        ####################################################

        object.add_method("get_t_begin", (), (nbody_system.time, object.ERROR_CODE))
        object.add_method("set_t_begin", (nbody_system.time,), (object.ERROR_CODE,))

        object.add_method("get_dt", (), (nbody_system.time, object.ERROR_CODE))
        object.add_method("set_dt", (nbody_system.time,), (object.ERROR_CODE,))

        object.add_method("get_t", (), (nbody_system.time, object.ERROR_CODE))
        object.add_method("set_t", (nbody_system.time,), (object.ERROR_CODE,))
Beispiel #25
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     object.add_method("get_eps2", (), (nbody_system.length * nbody_system.length, object.ERROR_CODE))
     object.add_method("set_eps2", (nbody_system.length * nbody_system.length,), (object.ERROR_CODE,))
     object.add_method(
         "get_gravity_at_point",
         (nbody_system.length, nbody_system.length, nbody_system.length, nbody_system.length),
         (nbody_system.acceleration, nbody_system.acceleration, nbody_system.acceleration),
     )
     object.add_method(
         "get_potential_at_point",
         (nbody_system.length, nbody_system.length, nbody_system.length, nbody_system.length),
         (nbody_system.potential,),
     )
Beispiel #26
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)
        self.stopping_conditions.define_methods(object)
        
        object.add_method("get_bs_tolerance", (), (object.NO_UNIT, object.ERROR_CODE,))
        object.add_method("set_bs_tolerance", (object.NO_UNIT, ), (object.ERROR_CODE,))
 
        object.add_method("get_word_length", (), (object.NO_UNIT, object.ERROR_CODE,))
        object.add_method("set_word_length", (object.NO_UNIT, ), (object.ERROR_CODE,))

        object.add_method("get_eta", (), (object.NO_UNIT, object.ERROR_CODE,))
        object.add_method("set_eta", (object.NO_UNIT, ), (object.ERROR_CODE,))
        
        object.add_method("get_brutus_output_directory", (), (object.NO_UNIT, object.ERROR_CODE,))
        object.add_method("set_brutus_output_directory", (object.NO_UNIT, ), (object.ERROR_CODE,))
 def define_methods(self, handler):
     GravitationalDynamics.define_methods(self, handler)
     handler.add_method('set_time_step', (nbody_system.time, ),
                        (handler.ERROR_CODE, ))
     handler.add_method('get_gravity_at_point', (nbody_system.length, ) * 4,
                        (nbody_system.acceleration, ) * 3 +
                        (handler.ERROR_CODE, ))
     handler.add_method('get_potential_at_point',
                        (nbody_system.length, ) * 4,
                        (nbody_system.potential, handler.ERROR_CODE))
     handler.add_method('set_gravitating_mass',
                        (handler.NO_UNIT, nbody_system.mass),
                        (handler.ERROR_CODE, ))
     handler.add_method('get_gravitating_mass', (handler.NO_UNIT, ),
                        (nbody_system.mass, handler.ERROR_CODE))
Beispiel #28
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     # Define some shortcuts for better readability.
     M = nbody_system.mass
     L = nbody_system.length
     V = nbody_system.speed
     T = nbody_system.time
     object.add_method('new_particle', (M,L,L,L,V,V,V,L), (object.INDEX, object.ERROR_CODE))
     object.add_method('set_state', (object.INDEX, M,L,L,L,L,V,V,V), (object.ERROR_CODE))
     object.add_method('get_state', (object.INDEX), (M,L,L,L,L,V,V,V, object.ERROR_CODE))
     object.add_method('set_time_begin', (T), (object.ERROR_CODE))
     object.add_method('get_time_begin', (), (T, object.ERROR_CODE))
     object.add_method('get_number_of_particles', (), (units.none, object.ERROR_CODE))
     object.add_method('get_time_step', (), (T, object.ERROR_CODE))
     object.add_method('set_time_step', (T), (object.ERROR_CODE))
     object.add_method('update_force_potential_arrays', (T), (object.ERROR_CODE))
Beispiel #29
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)
        self.stopping_conditions.define_methods(handler)

        handler.add_method("get_word_length", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_word_length", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_const_time_step", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_const_time_step", (nbody_system.time),
                           (handler.ERROR_CODE, ))
Beispiel #30
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        # Turn interface functions into methods.
        object.add_method(
            "new_particle",
            (
                nbody_system.mass,
                nbody_system.length,
                nbody_system.length,
                nbody_system.length,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.length,
                object.NO_UNIT
            ),
            (
                object.INDEX,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_eps2",
            (
                nbody_system.length * nbody_system.length
            ),
            (
                object.ERROR_CODE
            )
        )

        object.add_method(
            "get_eps2",
            (),
            (
                nbody_system.length * nbody_system.length,
                object.ERROR_CODE
            )
        )

     
        
        self.stopping_conditions.define_methods(object)
Beispiel #31
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)

        handler.add_method("get_eps2", (), (
            nbody_system.length * nbody_system.length,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_eps2",
                           (nbody_system.length * nbody_system.length, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_dt_param", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_dt_param", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_dt_dia", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_dt_dia", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_time", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_time", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_pair_detect_factor", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_pair_detect_factor", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        self.stopping_conditions.define_methods(handler)
Beispiel #32
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)
        
        object.add_method(
            "set_lightspeed",
            ( nbody_system.length / nbody_system.time, ),
            (object.ERROR_CODE,)
        )
        
        object.add_method(
            "get_lightspeed",
            ( ),
            (nbody_system.length / nbody_system.time, object.ERROR_CODE,)
        )
        
        object.add_method(
            "set_time_step",
            (nbody_system.time, ),
            (object.ERROR_CODE,)
        )

        object.add_method(
            "set_tolerance",
            (object.NO_UNIT, ),
            (object.ERROR_CODE,)
        )
        
        object.add_method(
            "get_tolerance",
            ( ),
            (object.NO_UNIT, object.ERROR_CODE,)
        )
        
        object.add_method(
            "get_radiated_gravitational_energy",
            (),
            (nbody_system.mass * nbody_system.length ** 2  * nbody_system.time ** -2, object.ERROR_CODE,)
        )


        object.add_method(
            "get_total_energy",
            (),
            (nbody_system.mass * nbody_system.length ** 2  * nbody_system.time ** -2, object.ERROR_CODE,)
        )
Beispiel #33
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)
        self.stopping_conditions.define_methods(handler)

        handler.add_method("get_bs_tolerance_float64", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_bs_tolerance_float64", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_eps2", (), (
            nbody_system.length**2,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_eps2", (nbody_system.length**2, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_dt_print", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_dt_print", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_word_length", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_word_length", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_adaptb_output_directory", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_adaptb_output_directory", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_max_cpu_time", (), (
            units.s,
            handler.ERROR_CODE,
        ))
        handler.add_method("set_max_cpu_time", (units.s, ),
                           (handler.ERROR_CODE, ))
Beispiel #34
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     object.add_method('get_gravity_at_point', (
         nbody_system.length,
         nbody_system.length,
         nbody_system.length,
         nbody_system.length,
     ), (
         nbody_system.acceleration,
         nbody_system.acceleration,
         nbody_system.acceleration,
     ))
     object.add_method('get_potential_at_point', (
         nbody_system.length,
         nbody_system.length,
         nbody_system.length,
         nbody_system.length,
     ), (nbody_system.potential, ))
Beispiel #35
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)
        self.stopping_conditions.define_methods(handler)

        handler.add_method("set_eps2",
                           (nbody_system.length * nbody_system.length, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_eps2", (), (
            nbody_system.length * nbody_system.length,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_changeover_rout", (nbody_system.length, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_changeover_rout", (), (
            nbody_system.length,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_group_radius", (nbody_system.length, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_group_radius", (), (
            nbody_system.length,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_rsearch_min", (nbody_system.length, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_rsearch_min", (), (
            nbody_system.length,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_tree_step", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_tree_step", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))
Beispiel #36
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     # Define some shortcuts for better readability.
     M = nbody_system.mass
     L = nbody_system.length
     V = nbody_system.speed
     T = nbody_system.time
     object.add_method('new_particle', (M, L, L, L, V, V, V, L),
                       (object.INDEX, object.ERROR_CODE))
     object.add_method('set_state', (object.INDEX, M, L, L, L, L, V, V, V),
                       (object.ERROR_CODE))
     object.add_method('get_state', (object.INDEX),
                       (M, L, L, L, L, V, V, V, object.ERROR_CODE))
     object.add_method('set_time_begin', (T), (object.ERROR_CODE))
     object.add_method('get_time_begin', (), (T, object.ERROR_CODE))
     object.add_method('get_number_of_particles', (),
                       (units.none, object.ERROR_CODE))
     object.add_method('get_time_step', (), (T, object.ERROR_CODE))
     object.add_method('set_time_step', (T), (object.ERROR_CODE))
     object.add_method('update_force_potential_arrays', (T),
                       (object.ERROR_CODE))
Beispiel #37
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        # Turn interface functions into methods.

        object.add_method("set_eps2",
                          (nbody_system.length * nbody_system.length),
                          (object.ERROR_CODE))

        object.add_method(
            "get_eps2", (),
            (nbody_system.length * nbody_system.length, object.ERROR_CODE))

        object.add_method(
            "get_state_a_adot", (object.NO_UNIT, ),
            (nbody_system.speed / nbody_system.time, nbody_system.speed /
             nbody_system.time, nbody_system.speed / nbody_system.time,
             nbody_system.speed / nbody_system.time / nbody_system.time,
             nbody_system.speed / nbody_system.time / nbody_system.time,
             nbody_system.speed / nbody_system.time / nbody_system.time,
             object.ERROR_CODE))
Beispiel #38
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     self.stopping_conditions.define_methods(object)
     
     object.add_method("get_bs_tolerance_float64", (), (object.NO_UNIT, object.ERROR_CODE,))
     object.add_method("set_bs_tolerance_float64", (object.NO_UNIT, ), (object.ERROR_CODE,))
     
     object.add_method("get_eps2", (), (nbody_system.length**2, object.ERROR_CODE,))
     object.add_method("set_eps2", (nbody_system.length**2, ), (object.ERROR_CODE,))
 
     object.add_method("get_dt_print", (), (nbody_system.time, object.ERROR_CODE,))
     object.add_method("set_dt_print", (nbody_system.time, ), (object.ERROR_CODE,))
 
     object.add_method("get_word_length", (), (object.NO_UNIT, object.ERROR_CODE,))
     object.add_method("set_word_length", (object.NO_UNIT, ), (object.ERROR_CODE,))
     
     object.add_method("get_adaptb_output_directory", (), (object.NO_UNIT, object.ERROR_CODE,))
     object.add_method("set_adaptb_output_directory", (object.NO_UNIT, ), (object.ERROR_CODE,))
     
     object.add_method("get_max_cpu_time", (), (units.s, object.ERROR_CODE,))
     object.add_method("set_max_cpu_time", (units.s, ), (object.ERROR_CODE,))
Beispiel #39
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        object.add_method('get_potential_at_point',
                          (nbody_system.length, nbody_system.length,
                           nbody_system.length, nbody_system.length),
                          (nbody_system.potential, object.ERROR_CODE))

        #        object.add_method(
        #            '',
        #            (nbody_system.length, nbody_system.length,
        #             nbody_system.length, nbody_system.length),
        #            (nbody_system.potential, object.ERROR_CODE)
        #        )

        object.add_method(
            'get_gravity_at_point', (nbody_system.length, nbody_system.length,
                                     nbody_system.length, nbody_system.length),
            (nbody_system.acceleration, nbody_system.acceleration,
             nbody_system.acceleration, object.ERROR_CODE))

        self.stopping_conditions.define_methods(object)
Beispiel #40
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)

        handler.add_method("get_eta", (), (
            handler.NO_UNIT,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_eta", (handler.NO_UNIT, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("get_time", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_begin_time", (nbody_system.time, ),
                           (handler.ERROR_CODE, ))
        handler.add_method("get_begin_time", (), (
            nbody_system.time,
            handler.ERROR_CODE,
        ))

        handler.add_method("get_eps2", (), (
            nbody_system.length * nbody_system.length,
            handler.ERROR_CODE,
        ))

        handler.add_method("set_eps2",
                           (nbody_system.length * nbody_system.length, ),
                           (handler.ERROR_CODE, ))

        handler.add_method("set_clight", (nbody_system.speed, ),
                           (handler.ERROR_CODE, ))
        handler.add_method("get_clight", (), (
            nbody_system.speed,
            handler.ERROR_CODE,
        ))
Beispiel #41
0
    def define_methods(self, handler):
        GravitationalDynamics.define_methods(self, handler)

        # Turn interface functions into methods.

        handler.add_method(
            "set_eps2",
            (
                nbody_system.length * nbody_system.length
            ),
            (
                handler.ERROR_CODE
            )
        )

        handler.add_method(
            "get_eps2",
            (),
            (
                nbody_system.length * nbody_system.length,
                handler.ERROR_CODE
            )
        )
Beispiel #42
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        # Turn interface functions into methods.

        object.add_method(
            "set_eps2",
            (
                nbody_system.length * nbody_system.length
            ),
            (
                object.ERROR_CODE
            )
        )

        object.add_method(
            "get_eps2",
            (),
            (
                nbody_system.length * nbody_system.length,
                object.ERROR_CODE
            )
        )
Beispiel #43
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        # Similarly, we can add module-specific methods, if desired.
        # See hermite0/interface.py for examples.

        object.add_method("get_nmax", (),
            (object.NO_UNIT, object.ERROR_CODE,))
        object.add_method("set_nmax", (object.NO_UNIT, ),
            (object.ERROR_CODE,))
        
        object.add_method("get_dtmax", (),
            (nbody_system.time, object.ERROR_CODE,))
        object.add_method("set_dtmax", (nbody_system.time, ),
            (object.ERROR_CODE,))

        object.add_method("get_h2max", (),
            (nbody_system.length*nbody_system.length, object.ERROR_CODE,))
        object.add_method("set_h2max", (nbody_system.length*nbody_system.length, ),
            (object.ERROR_CODE,))

        object.add_method("get_eta_irr", (),
            (object.NO_UNIT, object.ERROR_CODE,))
        object.add_method("set_eta_irr", (object.NO_UNIT, ),
            (object.ERROR_CODE,))

        object.add_method("get_eta_reg", (),
            (object.NO_UNIT, object.ERROR_CODE,))
        object.add_method("set_eta_reg", (object.NO_UNIT, ),
            (object.ERROR_CODE,))

        object.add_method("get_eps2", (),
            (nbody_system.length * nbody_system.length, object.ERROR_CODE,))
        object.add_method("set_eps2", (nbody_system.length * nbody_system.length, ),
            (object.ERROR_CODE,))
        
        self.stopping_conditions.define_methods(object)
Beispiel #44
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)

        object.add_method("get_eps2", (), (
            nbody_system.length * nbody_system.length,
            object.ERROR_CODE,
        ))

        object.add_method("set_eps2",
                          (nbody_system.length * nbody_system.length, ),
                          (object.ERROR_CODE, ))

        object.add_method("get_eta", (), (
            object.NO_UNIT,
            object.ERROR_CODE,
        ))

        object.add_method("set_eta1", (object.NO_UNIT, ),
                          (object.ERROR_CODE, ))

        object.add_method("get_eta_s", (), (
            object.NO_UNIT,
            object.ERROR_CODE,
        ))

        object.add_method("set_eta_s", (object.NO_UNIT, ),
                          (object.ERROR_CODE, ))

        object.add_method("get_initialize_once", (), (
            object.NO_UNIT,
            object.ERROR_CODE,
        ))

        object.add_method("set_initialize_once", (object.NO_UNIT, ),
                          (object.ERROR_CODE, ))

        self.stopping_conditions.define_methods(object)
Beispiel #45
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)
        object.add_method(
            "new_particle",
            (
                nbody_system.mass,
                nbody_system.length,
                nbody_system.length,
                nbody_system.length,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.length,
                object.NO_UNIT,
            ),
            (
                object.INDEX,
                object.ERROR_CODE,
            )
        )                                                                  
        
        object.add_method(
            "get_potential_energy",
            (object.INDEX,),
            (nbody_system.mass * nbody_system.length ** 2  * nbody_system.time ** -2, object.ERROR_CODE,)
        )


        object.add_method(
            "get_kinetic_energy",
            (object.INDEX,),
            (nbody_system.mass * nbody_system.length ** 2  * nbody_system.time ** -2, object.ERROR_CODE,)
        )
        object.add_method(
            'evolve_model',
            (
                nbody_system.time,
                object.INDEX
            ),
            (
                object.ERROR_CODE,
            )
        )
        object.add_method(
            'get_time',
            (object.INDEX,),
            (nbody_system.time, object.ERROR_CODE,)
        )
        
        object.add_method(
            "get_time_step",
            (object.INDEX,),
            (nbody_system.time, object.ERROR_CODE,)
        )

        object.add_method(
            "set_time_step",
            (nbody_system.time, object.INDEX,),
            (object.ERROR_CODE,)
        )
        
        object.add_method(
            "get_state",
            (
                object.NO_UNIT,
            ),
            (
                nbody_system.mass,
                nbody_system.length,
                nbody_system.length,
                nbody_system.length,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.length,
                object.NO_UNIT,
                object.ERROR_CODE
            )
        )
        object.add_method(
            "get_subset",
            (
                object.NO_UNIT,
            ),
            (
                object.NO_UNIT,
                object.ERROR_CODE
            )
        )
        object.add_method(
            "set_subset",
            (
                object.NO_UNIT,
                object.NO_UNIT,
            ),
            (
                
                object.ERROR_CODE,
            )
        )
        object.add_method(
            'new_subset',
            (
                nbody_system.time,
            ),
            (
                object.INDEX,
                object.ERROR_CODE,
            )
        )
        self.stopping_conditions.define_methods(object)
Beispiel #46
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     self.stopping_conditions.define_methods(object)
Beispiel #47
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     object.add_method("new_gas_particle",
         (nbody_system.mass, nbody_system.length, nbody_system.length, nbody_system.length,
             nbody_system.speed, nbody_system.speed, nbody_system.speed),
         (object.INDEX, object.ERROR_CODE))
Beispiel #48
0
    def define_methods(self, object):
        GravitationalDynamics.define_methods(self, object)
        object.add_method(
            "new_particle",
            (
                nbody_system.mass,
                nbody_system.length,
                nbody_system.length,
                nbody_system.length,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.length,
            ),
            (
                object.INDEX,
                object.ERROR_CODE
            )
        )
        object.add_method(
            "set_state",
            (
                object.INDEX,
                nbody_system.mass,
                nbody_system.length,
                nbody_system.length,
                nbody_system.length,
                nbody_system.length,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.speed,
           ),
            (
                object.ERROR_CODE
            )
        )
        object.add_method(
            "get_state",
            (
                object.INDEX
           ),
            (
                nbody_system.mass,
                nbody_system.length,
                nbody_system.length,
                nbody_system.length,
                nbody_system.length,
                nbody_system.speed,
                nbody_system.speed,
                nbody_system.speed,
                object.ERROR_CODE
            )
        )
        object.add_method(
            "set_time_begin",
            (
                     nbody_system.time
            ),
            (
                     object.ERROR_CODE
            )
        )
        object.add_method(
            "get_time_begin",
            (),
            (
                     nbody_system.time,
                object.ERROR_CODE
            )
        )
        object.add_method(
            "set_Plummer_core",
            (
                       nbody_system.length
            ),
            (
                     object.ERROR_CODE
            )
        )

        object.add_method(
            "get_Plummer_core",
            (),
            (
                       nbody_system.length,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_Plummer_mass",
            (
                       nbody_system.mass
            ),
            (
                     object.ERROR_CODE
            )
        )

        object.add_method(
            "get_Plummer_mass",
            (),
            (
                       nbody_system.mass,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_Galaxy_core",
            (
                  nbody_system.length
            ),
            (
               object.ERROR_CODE
            )
        )

        object.add_method(
            "get_Galaxy_core",
            (),
            (
                  nbody_system.length,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_Galaxy_mass",
            (
                  nbody_system.mass
            ),
            (
               object.ERROR_CODE
            )
        )

        object.add_method(
            "get_Galaxy_mass",
            (),
            (
                  nbody_system.mass,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_eps",
            (
                nbody_system.length
            ),
            (
                object.ERROR_CODE
            )
        )

        object.add_method(
            "get_eps",
            (),
            (
                nbody_system.length,
                object.ERROR_CODE
            )
        )
       

        object.add_method(
            "set_eta6",
            (
                units.none
            ),
            (
                object.ERROR_CODE
            )
        )

        object.add_method(
            "get_eta6",
            (),
            (
                units.none,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_eta4",
            (
                units.none
            ),
            (
                     object.ERROR_CODE
            )
        )

        object.add_method(
            "get_eta4",
            (),
            (
                units.none,
                object.ERROR_CODE
            )
        )


        object.add_method(
            "set_number_of_GPU",
            (
                     units.none
            ),
            (
                     object.ERROR_CODE
            )
        )

        object.add_method(
            "get_number_of_GPU",
            (),
            (
                     units.none,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "get_number_of_particles",
            (),
            (
                units.none,
                object.ERROR_CODE
            )
        )


        object.add_method(
            "set_number_of_Threads",
            (
                units.none
            ),
            (
                     object.ERROR_CODE
            )
        )

        object.add_method(
            "get_number_of_Threads",
            (),
            (
                     units.none,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_number_of_Print",
            (
                     units.none
            ),
            (
                     object.ERROR_CODE
            )
        )

        object.add_method(
            "get_number_of_Print",
            (),
            (
                     units.none,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_DTPrint",
            (
                nbody_system.time
            ),
            (
                     object.ERROR_CODE
            )
        )

        object.add_method(
            "get_DTPrint",
            (),
            (
                     nbody_system.time,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_max_time_step",
            (
                     nbody_system.time
            ),
            (
                object.ERROR_CODE
            )
        )

        object.add_method(
            "get_max_time_step",
            (),
            (
                nbody_system.time,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_min_time_step",
            (
                nbody_system.time
            ),
            (
                object.ERROR_CODE
            )
        )

        object.add_method(
            "get_min_time_step",
            (),
            (
                nbody_system.time,
                object.ERROR_CODE
            )
        )

        object.add_method(
            "set_gpu_name",
            (
                units.none
            ),
            (
                object.ERROR_CODE
            )
        )

        object.add_method(
            "get_gpu_name",
            (),
            (
                     units.none,
                object.ERROR_CODE
            )
        )
 
        object.add_method(
            "set_output_path_name",
            (
                units.none
            ),
            (
                object.ERROR_CODE
            )
        )

        object.add_method(
            "get_output_path_name",
            (),
            (
                units.none,
                object.ERROR_CODE
            )
        )
Beispiel #49
0
 def define_methods(self, object):
     GravitationalDynamics.define_methods(self, object)
     
     object.add_method(
         "get_eps2",
         (),
         (nbody_system.length * nbody_system.length, object.ERROR_CODE,)
     )
     
     object.add_method(
         "set_eps2",
         (nbody_system.length * nbody_system.length, ),
         (object.ERROR_CODE,)
     )
     
     object.add_method(
         "get_dt_param",
         (),
         (object.NO_UNIT, object.ERROR_CODE,)
     )
     
     object.add_method(
         "set_dt_param",
         (object.NO_UNIT, ),
         (object.ERROR_CODE,)
     )
     
     object.add_method(
         "get_dt_dia",
         (),
         (nbody_system.time, object.ERROR_CODE,)
     )
     
     object.add_method(
         "set_dt_dia",
         (nbody_system.time, ),
         (object.ERROR_CODE,)
     )
     
     object.add_method(
         "get_time",
         (),
         (nbody_system.time, object.ERROR_CODE,)
     )
     
     object.add_method(
         "set_time",
         (nbody_system.time, ),
         (object.ERROR_CODE,)
     )
     
     object.add_method(
         "get_pair_detect_factor",
         (),
         (object.NO_UNIT, object.ERROR_CODE,)
     )
     
     object.add_method(
         "set_pair_detect_factor",
         (object.NO_UNIT, ),
         (object.ERROR_CODE,)
     )
     
     self.stopping_conditions.define_methods(object)