本文整理汇总了Python中amuse.community.interface.gd.GravitationalDynamics.define_parameters方法的典型用法代码示例。如果您正苦于以下问题:Python GravitationalDynamics.define_parameters方法的具体用法?Python GravitationalDynamics.define_parameters怎么用?Python GravitationalDynamics.define_parameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类amuse.community.interface.gd.GravitationalDynamics
的用法示例。
在下文中一共展示了GravitationalDynamics.define_parameters方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: define_parameters
# 需要导入模块: from amuse.community.interface.gd import GravitationalDynamics [as 别名]
# 或者: from amuse.community.interface.gd.GravitationalDynamics import define_parameters [as 别名]
def define_parameters(self, object):
GravitationalDynamics.define_parameters(self, object)
self.stopping_conditions.define_parameters(object)
object.add_method_parameter(
"get_bs_tolerance",
"set_bs_tolerance",
"bs_tolerance",
"Error tolerance of the Bulirsch-Stoer integrator",
default_value = 1.0e-8
)
object.add_method_parameter(
"get_word_length",
"set_word_length",
"word_length",
"The word length, or number of bits for the mantissa, used for the arbitrary precision calculations (#digits = log10(2**# bits) ",
default_value = 72
)
object.add_method_parameter(
"get_eta",
"set_eta",
"dt_param",
"dt_param, the time-step parameter for the adaptive time-step criterion",
default_value = 0.24
)
object.add_method_parameter(
"get_brutus_output_directory",
"set_brutus_output_directory",
"brutus_output_directory",
"Path to the directory where Brutus stores its output",
default_value = "./"
)
示例2: define_parameters
# 需要导入模块: from amuse.community.interface.gd import GravitationalDynamics [as 别名]
# 或者: from amuse.community.interface.gd.GravitationalDynamics import define_parameters [as 别名]
def define_parameters(self, object):
GravitationalDynamics.define_parameters(self, object)
self.stopping_conditions.define_parameters(object)
####################################################
object.add_method_parameter(
"get_t_begin",
"set_t_begin",
"begin_time",
"Time at start of simulation",
default_value=0.0 | nbody_system.time,
)
object.add_method_parameter(
"get_dt", "set_dt", "timestep", "Constant time-step size", default_value=1e-3 | nbody_system.time
)
object.add_method_parameter(
"get_t", "set_t", "current_time", "Current time", default_value=0.0 | nbody_system.time
)
object.add_method_parameter(
"get_sakura_output_directory",
"set_sakura_output_directory",
"sakura_output_directory",
"Output directory",
default_value="./",
)
示例3: define_parameters
# 需要导入模块: from amuse.community.interface.gd import GravitationalDynamics [as 别名]
# 或者: from amuse.community.interface.gd.GravitationalDynamics import define_parameters [as 别名]
def define_parameters(self, object):
self.stopping_conditions.define_parameters(object)
GravitationalDynamics.define_parameters(self, object)
object.add_method_parameter(
"get_time_step",
"set_time_step",
"timestep",
"constant timestep for iteration",
default_value = 0.0001 | nbody_system.time
)
object.add_method_parameter(
"get_integrator",
"set_integrator",
"integrator",
"name of the integrator to use ({0})".format(sorted(self.INTEGRATORS.keys())),
default_value = "ias15"
)
object.add_method_parameter(
"get_solver",
"set_solver",
"solver",
"name of the gravity solver to use ({0})".format(sorted(self.SOLVERS.keys())),
default_value = "compensated"
)
object.add_method_parameter(
"get_opening_angle2",
"set_opening_angle2",
"opening_angle2",
"opening angle, theta, for building the tree in case of tree solver: between 0 and 1",
default_value = 0.5
)
示例4: define_parameters
# 需要导入模块: from amuse.community.interface.gd import GravitationalDynamics [as 别名]
# 或者: from amuse.community.interface.gd.GravitationalDynamics import define_parameters [as 别名]
def define_parameters(self, object):
GravitationalDynamics.define_parameters(self, object)
object.add_method_parameter(
"get_time_step",
"set_time_step",
"timestep",
"initial timestep for iteration",
default_value = 1.0 | nbody_system.time
)
object.add_method_parameter(
"get_lightspeed",
"set_lightspeed",
"lightspeed",
"lightspeed used in the code",
default_value = 1.0 | nbody_system.length / nbody_system.time
)
object.add_method_parameter(
"get_tolerance",
"set_tolerance",
"tolerance",
"tolerance used in the code",
default_value = 1e-13
)
object.add_method_parameter(
"get_maximum_number_of_particles",
"set_maximum_number_of_particles",
"maximum_number_of_particles",
"the code will evolve this number of particles, please be sure to account for mergers",
default_value = 100
)
object.add_boolean_parameter(
"get_evolve_to_exact_time",
"set_evolve_to_exact_time",
"evolve_to_exact_time",
"the code will evolve the model to the exact time given in evolve_model",
True
)