From efbbf88ed696d657fbef00045692b20b6a2e693e Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Wed, 16 Sep 2020 15:33:12 +0200 Subject: [PATCH] Remove unnecessary condition in DD force buffer resizing Removed a condition that was no longer necessary, as exactly the same condition is checked inside the resize() method of ForceHelperBuffers. --- src/gromacs/domdec/partition.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/gromacs/domdec/partition.cpp b/src/gromacs/domdec/partition.cpp index c7a01ae473..4d3f88340b 100644 --- a/src/gromacs/domdec/partition.cpp +++ b/src/gromacs/domdec/partition.cpp @@ -3117,28 +3117,21 @@ void dd_partition_system(FILE* fplog, state_change_natoms(state_local, state_local->natoms); - if (fr->forceHelperBuffers->haveDirectVirialContributions()) + if (vsite && vsite->numInterUpdategroupVirtualSites()) { - if (vsite && vsite->numInterUpdategroupVirtualSites()) + nat_f_novirsum = comm->atomRanges.end(DDAtomRanges::Type::Vsites); + } + else + { + if (EEL_FULL(ir->coulombtype) && dd->haveExclusions) { - nat_f_novirsum = comm->atomRanges.end(DDAtomRanges::Type::Vsites); + nat_f_novirsum = comm->atomRanges.end(DDAtomRanges::Type::Zones); } else { - if (EEL_FULL(ir->coulombtype) && dd->haveExclusions) - { - nat_f_novirsum = comm->atomRanges.end(DDAtomRanges::Type::Zones); - } - else - { - nat_f_novirsum = comm->atomRanges.numHomeAtoms(); - } + nat_f_novirsum = comm->atomRanges.numHomeAtoms(); } } - else - { - nat_f_novirsum = 0; - } /* Set the number of atoms required for the force calculation. * Forces need to be constrained when doing energy -- 2.22.0