Change gmx_localtop_t to C++
authorPaul Bauer <paul.bauer.q@gmail.com>
Thu, 13 Sep 2018 12:19:40 +0000 (14:19 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 4 Jan 2019 16:30:36 +0000 (17:30 +0100)
commit292608137cc390365bf1c20945d5c264732dbaae
treea8fa2ee16e0a8ac29ebc195e4516bab8ed60de74
parent8787cff74706cea8bbadab0a494fe35b57505b19
Change gmx_localtop_t to C++

Changes the localtop topology structure to C++.

Cases where the object could be allocated on the stack have
been changed in that way. In other places, unique_ptr is now
used for the allocation.

Changed callers that returned a pointer to a new gmx_localtop_t
to instead take a pointer to the datastructure that will be
populated.

gmx_localtop_t is by default managing its own memory, but can be changed
to not do this. This is needed for the domain decomposition as it is not
expected to free memory owned by mtop there.

This is part of the larger aim of modernizing the topology
datastructures to C++.

Changed const pointers to const references where encountered during the
change.

Change-Id: I619533f5dc332332f1652afb24266bc2dae67d4c
21 files changed:
src/gromacs/domdec/domdec.h
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/domdec/partition.cpp
src/gromacs/domdec/partition.h
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gmxana/gmx_nmr.cpp
src/gromacs/mdlib/mdsetup.cpp
src/gromacs/mdlib/mdsetup.h
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/mimic.cpp
src/gromacs/mdrun/minimize.cpp
src/gromacs/mdrun/rerun.cpp
src/gromacs/mdrun/tpi.cpp
src/gromacs/tools/check.cpp
src/gromacs/topology/block.cpp
src/gromacs/topology/block.h
src/gromacs/topology/mtop_util.cpp
src/gromacs/topology/mtop_util.h
src/gromacs/topology/topology.cpp
src/gromacs/topology/topology.h
src/gromacs/trajectoryanalysis/topologyinformation.cpp