amuse icon indicating copy to clipboard operation
amuse copied to clipboard

Revise stopping conditions

Open rieder opened this issue 3 years ago • 4 comments

The stopping condition library currently has the following stopping conditions:

    PARAMETER (COLLISION_DETECTION=0)
    PARAMETER (PAIR_DETECTION=1)
    PARAMETER (ESCAPER_DETECTION=2)
    PARAMETER (TIMEOUT_DETECTION=3)
    PARAMETER (NUMBER_OF_STEPS_DETECTION=4)
    PARAMETER (OUT_OF_BOX_DETECTION=5)
    PARAMETER (DENSITY_LIMIT_DETECTION=6)
    PARAMETER (INTERNAL_ENERGY_LIMIT_DETECTION=7)
    PARAMETER (INTERACTION_OVER_DETECTION=8)
    PARAMETER (SUPERNOVA_DETECTION=9)

This doesn't match the table in the AMUSE book describing the stopping conditions (B7) - I've indicated the missing ones in bold:

GRAVITATIONAL DYNAMICS

  • collision_detection
  • stopping_conditions_timeout
  • out_of_box_detection
  • number_of_steps_detection
  • escape_detection
  • pair_detection STELLAR EVOLUTION
  • supernova_detection
  • max_age_stop_condition
  • max_iter_stop_condition
  • min_timestep_stop_condition HYDRODYNAMICS
  • minimum_density_parameter
  • maximum_density_parameter
  • minimum_internal_energy_parameter
  • maximum_internal_energy_parameter
  • number_of_steps_parameter
  • out_of_box_parameter
  • out_of_box_use_center_of_mass_parameter
  • timeout_parameter

I think we should add the missing stopping conditions... And perhaps there are more stopping conditions we can think of? Maybe a "general" stopping condition would be useful to have as well, something that can be used instead of stopping the community code (i.e. preventing crashes)?

rieder avatar Mar 25 '22 08:03 rieder

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 24 '22 08:05 stale[bot]

I think it would be best to have stopping conditions that can pass a message - e.g.:

def stop(
    condition="some condition - like collision, supernova, or simply 'active particle'",
    particles_involved=(particle_index_i, particle_index_j, particle_index_k, ...),
)

rieder avatar Jun 17 '22 18:06 rieder

Probably the condition should allow passing more information, but this would make the conditions more generic. We can re-define current stopping condition as designated messages, and define what these should pass.

rieder avatar Jun 17 '22 18:06 rieder