Improved state_change_natoms and used it more
commit6816800950d0a406dfe5ba53bff4395b8eab491c
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 20 Dec 2016 10:26:56 +0000 (20 21:26 +1100)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 9 Feb 2017 16:28:09 +0000 (9 17:28 +0100)
treec4941f95dc2be9f117baf6ee75c834edc6906d80
parentb866b27d39fbc6d7a3f28ffda9ca3de586c18351
Improved state_change_natoms and used it more

If the t_state control flags indicate that per-atom arrays will be
used, resize them appropriately whenever this routine is called.

CG minimization and non-DD simulations take care of organizing their
own state flags and allocations, rather than relying on code located
elsewhere. Non-DD used to rely on the allocation of x made when
reading the tpr, and perhaps one for v made in set_state_entries (if
not read from the tpr), and one for f made in do_md or init_em.

Commented more widely about why allocations for force arrays are
of size natoms+1.

Change-Id: I803c2695969f78616016520cdd8e9425507ab7c1
src/gromacs/domdec/domdec.cpp
src/gromacs/fileio/tpxio.cpp
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/mdlib/broadcaststructs.cpp
src/gromacs/mdlib/md_support.cpp
src/gromacs/mdlib/minimize.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/tpi.cpp
src/gromacs/mdtypes/state.cpp
src/programs/mdrun/md.cpp