Allow elements to schedule pre-step and post-step functions
authorPascal Merz <pascal.merz@me.com>
Thu, 3 Dec 2020 07:05:54 +0000 (00:05 -0700)
committerJoe Jordan <ejjordan12@gmail.com>
Thu, 10 Jun 2021 13:36:16 +0000 (13:36 +0000)
commit944f71788d244a562df079a0fc7109600526baff
tree9f07b262f28421665a614557bb0926a93fc81492
parent08f82aa5dc7eca3c19f7c5d6c252c77523133c9b
Allow elements to schedule pre-step and post-step functions

Pre-step and post-step functions allow elements to perform operations
which need to happen before any of the integration step functions run,
or after all integration step functions have run. Unlike the main
integration step scheduling, whose order is defined by the order of the
elements in the integration algorithm, the functions are not guaranteed
to run in a specific order, only before / after the integration step.

One example this is useful for is the pull code, which needs to print
some output once all external pull providers (currently only AWH) have
run. Having a post-step function allows for an easy way for the pull
element to run during the integration run, but defer printout until
after the step.

Refs #3417, #3435, #3436
src/gromacs/modularsimulator/modularsimulatorinterfaces.h
src/gromacs/modularsimulator/simulatoralgorithm.cpp
src/gromacs/modularsimulator/simulatoralgorithm.h