Task #3076

Selectively activate MdModules during simulation instead of instantiating all of them

Added by Christian Blau over 1 year ago. Updated about 1 year ago.

core library


Change the interface to MdModules that allows the MdModules to subscribe to callbacks only after they know if they are active or not so that we avoid the

if (

within the modules that may be to easily overlooked.

Associated revisions

Revision 6dc7d1ec (diff)
Added by Test User about 1 year ago

Split MdModuleNotifications into topics

Use different notifers to distinguish MdModule callbacks to

- preprocessing
- simulation setup
- checkpointing

refs #3076

Change-Id: I08b2ff7e90e42fce44043d7c0f2a9304d404445c

Revision 5c8a0229 (diff)
Added by Test User 12 months ago

Add function calls to MdModules to sign up for notifications

Allow MdModules to sign up to notifications after they know their own
options. This makes it possible that modules only get called back when
they need to and not by default and skips the if(active) logic in
functions that are called back in favour of not subscribing to the
notifications to begin with.

refs #3076

Change-Id: Ib95c1f734f919805c661ac6f6451af5da8187eec


#1 Updated by Christian Blau about 1 year ago

Selective activation of the modules is easier when MdModules don't have to be constructed with the notifications early on, but can be handed the notification handles later.

Currently all notifications are subscribed to during module construction, but some notifications will only be needed during pre-processing at grompp-time, while others are only needed during md run setup, thus

- split notifications into pre-processing notifications, notifications during simulations, and checkpointing notifications
- hand over notification handle for pre-processing callbacks and simulation callbacks seperately instead of all of them at construction time
- callback notifications only if modules are active

Also available in: Atom PDF