Hide newly exposed domdec internals
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 22 Feb 2021 12:54:38 +0000 (13:54 +0100)
committerArtem Zhmurov <zhmurov@gmail.com>
Mon, 22 Feb 2021 20:04:48 +0000 (20:04 +0000)
By declaring the top-level destructor, we avoid needing to expose
details so the compiler has to generate the destructor everywhere.

Fixes #3926

src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec_internal.h
src/gromacs/domdec/domdec_struct.h
src/gromacs/domdec/domdec_topology.cpp

index 1c92f4fa327929b8102cd885c4d0d535d96fe24d..5345c92a3016ef7110df80e9bd4e724260e062f7 100644 (file)
@@ -2893,6 +2893,8 @@ static DDSettings getDDSettings(const gmx::MDLogger&     mdlog,
 
 gmx_domdec_t::gmx_domdec_t(const t_inputrec& ir) : unitCellInfo(ir) {}
 
+gmx_domdec_t::~gmx_domdec_t() = default;
+
 namespace gmx
 {
 
index 691b0b87aa4cef053579f538791b82c868beb2d7..99a72e543ad09229ae59ddbda6f7cc1c302fbc92 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -797,6 +797,15 @@ static constexpr double DD_CELL_MARGIN2 = 1.00005;
 /*! \brief With pressure scaling, keep cell sizes 2% above the limit to allow for some scaling */
 static constexpr double DD_PRES_SCALE_MARGIN = 1.02;
 
+struct gmx_reverse_top_t
+{
+    gmx_reverse_top_t(const gmx_mtop_t& mtop, bool useFreeEnergy, const ReverseTopOptions& reverseTopOptions);
+    ~gmx_reverse_top_t();
+
+    struct Impl;
+    std::unique_ptr<Impl> impl_;
+};
+
 /*! \endcond */
 
 #endif
index 3f1ff5fc496072095afb79d20b981bcad14b23b2..f0db2626ea7f51359b0b5cbbe31f9eff00327159 100644 (file)
@@ -70,6 +70,7 @@ struct gmx_domdec_specat_comm_t;
 class gmx_ga2la_t;
 struct gmx_pme_comm_n_box_t;
 struct t_inputrec;
+struct gmx_reverse_top_t;
 struct gmx_mtop_t;
 struct ReverseTopOptions;
 
@@ -159,19 +160,11 @@ struct UnitCellInfo
     bool haveScrewPBC;
 };
 
-struct gmx_reverse_top_t
-{
-    gmx_reverse_top_t(const gmx_mtop_t& mtop, bool useFreeEnergy, const ReverseTopOptions& reverseTopOptions);
-    ~gmx_reverse_top_t();
-
-    struct Impl;
-    std::unique_ptr<Impl> impl_;
-};
-
 struct gmx_domdec_t
 { //NOLINT(clang-analyzer-optin.performance.Padding)
     //! Constructor, only partial for now
     gmx_domdec_t(const t_inputrec& ir);
+    ~gmx_domdec_t();
 
     /* The DD particle-particle nodes only */
     /* The communication setup within the communicator all
index e8c9035001a16cfced699cf57c8aca9ba121d350..5b4b2feacd3eb89b17bb492606d70422e1d0537f 100644 (file)
@@ -149,7 +149,7 @@ struct ReverseTopOptions
     const bool includeSettles;
 };
 
-/*! \brief Struct for the reverse topology: links bonded interactions to atomsx */
+/*! \brief Struct for the reverse topology: links bonded interactions to atoms */
 struct gmx_reverse_top_t::Impl
 {
     //! Constructs a reverse topology from \p mtop