示例#1
0
 def define_methods(self, handler):
     InternalStellarStructure.define_methods(self, handler)
     StellarEvolution.define_methods(self, handler)
     handler.add_method("new_particle_method",
                        (units.MSun, handler.NO_UNIT, handler.NO_UNIT,
                         handler.NO_UNIT, units.yr),
                        (handler.INDEX, handler.ERROR_CODE))
     handler.add_method("get_mass_transfer_rate", (handler.INDEX, ), (
         units.MSun / units.yr,
         handler.ERROR_CODE,
     ))
     handler.add_method("get_wind_mass_loss_rate", (handler.INDEX, ), (
         units.MSun / units.yr,
         handler.ERROR_CODE,
     ))
     handler.add_method("get_spin", (handler.INDEX, ), (
         units.day,
         handler.ERROR_CODE,
     ))
     handler.add_method("finalize_stellar_model", (units.yr, ), (
         handler.INDEX,
         handler.ERROR_CODE,
     ))
     handler.add_method("get_stellar_model_element", (
         handler.INDEX,
         handler.INDEX,
     ), (units.MSun, units.MSun, units.RSun, units.g / units.cm**3,
         units.barye, handler.NO_UNIT, units.K, units.LSun, units.amu,
         handler.NO_UNIT, handler.NO_UNIT, handler.NO_UNIT, handler.NO_UNIT,
         handler.NO_UNIT, handler.NO_UNIT, handler.NO_UNIT, handler.NO_UNIT,
         handler.NO_UNIT, handler.ERROR_CODE))
示例#2
0
文件: interface.py 项目: vdhelm/amuse
 def define_methods(self, object):
     InternalStellarStructure.define_methods(self, object)
     StellarEvolution.define_methods(self, object)
     object.add_method(
         "new_particle_method",
         (units.MSun, object.NO_UNIT, object.NO_UNIT, object.NO_UNIT, units.yr),
         (object.INDEX, object.ERROR_CODE)
     )
     object.add_method(
         "get_mass_transfer_rate",
         (object.INDEX,),
         (units.MSun/units.yr, object.ERROR_CODE,)
     )
     object.add_method(
         "get_wind_mass_loss_rate",
         (object.INDEX,),
         (units.MSun/units.yr, object.ERROR_CODE,)
     )
     object.add_method(
         "get_spin",
         (object.INDEX,),
         (units.day, object.ERROR_CODE,)
     )
     object.add_method(
         "finalize_stellar_model",
         (units.yr,),
         (object.INDEX, object.ERROR_CODE,)
     )
     object.add_method(
         "get_stellar_model_element",
         (object.INDEX, object.INDEX,),
         (units.MSun, units.MSun, units.RSun, units.g / units.cm**3, units.barye,
             object.NO_UNIT, units.K, units.LSun, units.amu,
             object.NO_UNIT, object.NO_UNIT, object.NO_UNIT, object.NO_UNIT, object.NO_UNIT,
             object.NO_UNIT, object.NO_UNIT, object.NO_UNIT, object.NO_UNIT, object.ERROR_CODE)
     )
示例#3
0
 def define_state(self, handler):
     StellarEvolution.define_state(self, handler)
     handler.add_method('EDIT', 'new_particle_method')
     handler.add_method('UPDATE', 'new_particle_method')
     handler.add_transition('RUN', 'UPDATE', 'new_particle_method', False)
示例#4
0
文件: interface.py 项目: vdhelm/amuse
 def define_state(self, object):
     StellarEvolution.define_state(self, object)
     object.add_method('EDIT', 'new_particle_method')
     object.add_method('UPDATE', 'new_particle_method')
     object.add_transition('RUN', 'UPDATE', 'new_particle_method', False)
示例#5
0
 def define_state(self, object):
     StellarEvolution.define_state(self, object)
     object.add_method('EDIT', 'new_particle_method')
     object.add_method('UPDATE', 'new_particle_method')
     object.add_transition('RUN', 'UPDATE', 'new_particle_method', False)