Reorganize dipole calculation in do_force
authorSzilárd Páll <pall.szilard@gmail.com>
Tue, 28 Jan 2020 20:35:30 +0000 (21:35 +0100)
committerArtem Zhmurov <zhmurov@gmail.com>
Wed, 11 Mar 2020 19:51:44 +0000 (20:51 +0100)
commitee15399a600fdbe202ce6301f30138f373c33d06
treea1e436bf7c13495ad2ac9b131022111de5fdddae
parent429b1a3f8c8c6d4ec684caf239215d88b07dc1c4
Reorganize dipole calculation in do_force

Encapsulated dipole used in do_force in a struct and eliminated
fr->mu_tot and moved code into a separate reduction function.

Note that this change now also computes the dipole when
flags.stateChanged=false, as the old value is no longer stored in fr.

Change-Id: Ibcfda31c450e50d37c2697f6d04a549e8f996823
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdtypes/forcerec.h