Separate StatePropagatorData element
authorPascal Merz <pascal.merz@me.com>
Wed, 8 Jul 2020 10:24:48 +0000 (10:24 +0000)
committerM. Eric Irrgang <mei2n@virginia.edu>
Wed, 8 Jul 2020 10:24:48 +0000 (10:24 +0000)
commit99a5aa62d701020f27bc4087a8f5f0b0e504f29a
treec6ba881ce61d516ef89c40c202b9659782307c58
parentc22968c7b882512ecc45bbbb7e01de7026b841ed
Separate StatePropagatorData element

The StatePropagatorData was both holding data which is accessed by
a majority of the elements, and was an element itself. The element
part is needed to save state information for printout and checkpointing.
The double nature of StatePropagatorData created some difficulty in
initializing the elements, however - the StatePropagatorData
has a well defined place within the simulator loop, but has to be
created ahead of time so that other elements can get a pointer to it
to query for state data during the simulation run.

This change separates the ISimulatorElement implementation which
allows StatePropagatorData to take part in the simulation loop
into a member object. The StatePropagatorData can now be created
ahead of element construction time, while an object of the member
class can be created any time later. This will make the implementation
of a builder approach significantly easier.

Refs #3437
src/gromacs/modularsimulator/modularsimulator.cpp
src/gromacs/modularsimulator/simulatoralgorithm.cpp
src/gromacs/modularsimulator/simulatoralgorithm.h
src/gromacs/modularsimulator/statepropagatordata.cpp
src/gromacs/modularsimulator/statepropagatordata.h