amuse icon indicating copy to clipboard operation
amuse copied to clipboard

add "bridge_safe" mode to gravity codes

Open rieder opened this issue 6 years ago • 1 comments

Is your feature request related to a problem? Please describe. For safe use with Bridge, gravity codes should evolve to an exact time. By default, gravity codes (e.g. ph4 and Hermite) evolve to an approximate end time, either shortly before or after the requested time. Both codes have a parameter to evolve to an exact time, but these are hard to find (and different for each code).

Describe the solution you'd like Introduce a generalised "bridge_safe" parameter, that when set to True makes sure the code is safe for use with Bridge. This parameter could supplement the existing parameters (ph4: force_sync=True; Hermite: end_time_accuracy_factor=0), and perhaps Bridge should try to set this parameter when a system is added.

Additional context Perhaps we should generalise more parameters... Currently we default to naming parameters after their internal name in the code, but it might make more sense to generalise them. E.g. "opening_angle" vs "theta"; "time_step" vs "timestep".

rieder avatar Dec 30 '19 10:12 rieder

I've tried to go through the gravity codes currently in AMUSE to see how 'bridge_safe' they are. I couldn't get a lot to work (some due to hardware requirements, some gave errors I didn't understand, nbody6xx even apparently froze), but here is the status of the ones I tested:

Options for bridge_safe: Hermite (through end_time_accuracy_factor) ph4 (through force_sync)

Bridge safe in implementation (automatically integrates to exact end time): Brutus BHTree MI6 Sakura

Not bridge safe in implementation (does not integrate to exact end time): PhiGRAPE SmallN Huayno Mercury Mikkola

MJCWilhelm avatar Jun 04 '20 13:06 MJCWilhelm