Use more const ref in domdec API
authorJoe Jordan <ejjordan12@gmail.com>
Sun, 28 Feb 2021 14:10:06 +0000 (14:10 +0000)
committerAndrey Alekseenko <al42and@gmail.com>
Sun, 28 Feb 2021 14:10:06 +0000 (14:10 +0000)
Several places that were using const pointers are changed to use
const refs. A few gmx_bool are replaced with bool as well.

16 files changed:
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec.h
src/gromacs/domdec/domdec_constraints.cpp
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/domdec/mdsetup.cpp
src/gromacs/domdec/partition.cpp
src/gromacs/mdlib/constr.cpp
src/gromacs/mdlib/force.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/lincs.cpp
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/mimic.cpp
src/gromacs/mdrun/minimize.cpp
src/gromacs/mdrun/rerun.cpp
src/gromacs/mdrun/shellfc.cpp
src/gromacs/modularsimulator/statepropagatordata.cpp

index ad43086893638e91e4da52a6643150be753bb8d0..164612e1e8ab2e66dbd0f8470b2b7be1d62aaf2e 100644 (file)
@@ -205,20 +205,20 @@ gmx::ArrayRef<const gmx::RangePartitioning> getUpdateGroupingPerMoleculetype(con
     return dd.comm->systemInfo.updateGroupingPerMoleculetype;
 }
 
-void dd_store_state(gmx_domdec_t* dd, t_state* state)
+void dd_store_state(gmx_domdec_t& dd, t_state* state)
 {
-    if (state->ddp_count != dd->ddp_count)
+    if (state->ddp_count != dd.ddp_count)
     {
         gmx_incons("The MD state does not match the domain decomposition state");
     }
 
-    state->cg_gl.resize(dd->ncg_home);
-    for (int i = 0; i < dd->ncg_home; i++)
+    state->cg_gl.resize(dd.ncg_home);
+    for (int i = 0; i < dd.ncg_home; i++)
     {
-        state->cg_gl[i] = dd->globalAtomGroupIndices[i];
+        state->cg_gl[i] = dd.globalAtomGroupIndices[i];
     }
 
-    state->ddp_count_cg_gl = dd->ddp_count;
+    state->ddp_count_cg_gl = dd.ddp_count;
 }
 
 gmx_domdec_zones_t* domdec_zones(gmx_domdec_t* dd)
@@ -236,24 +236,24 @@ int dd_numHomeAtoms(const gmx_domdec_t& dd)
     return dd.comm->atomRanges.numHomeAtoms();
 }
 
-int dd_natoms_mdatoms(const gmx_domdec_t* dd)
+int dd_natoms_mdatoms(const gmx_domdec_t& dd)
 {
     /* We currently set mdatoms entries for all atoms:
      * local + non-local + communicated for vsite + constraints
      */
 
-    return dd->comm->atomRanges.numAtomsTotal();
+    return dd.comm->atomRanges.numAtomsTotal();
 }
 
-int dd_natoms_vsite(const gmx_domdec_t* dd)
+int dd_natoms_vsite(const gmx_domdec_t& dd)
 {
-    return dd->comm->atomRanges.end(DDAtomRanges::Type::Vsites);
+    return dd.comm->atomRanges.end(DDAtomRanges::Type::Vsites);
 }
 
-void dd_get_constraint_range(const gmx_domdec_t* dd, int* at_start, int* at_end)
+void dd_get_constraint_range(const gmx_domdec_t& dd, int* at_start, int* at_end)
 {
-    *at_start = dd->comm->atomRanges.start(DDAtomRanges::Type::Constraints);
-    *at_end   = dd->comm->atomRanges.end(DDAtomRanges::Type::Constraints);
+    *at_start = dd.comm->atomRanges.start(DDAtomRanges::Type::Constraints);
+    *at_end   = dd.comm->atomRanges.end(DDAtomRanges::Type::Constraints);
 }
 
 void dd_move_x(gmx_domdec_t* dd, const matrix box, gmx::ArrayRef<gmx::RVec> x, gmx_wallcycle* wcycle)
@@ -670,15 +670,14 @@ static std::vector<int> dd_interleaved_pme_ranks(const DDRankSetup& ddRankSetup)
     return pmeRanks;
 }
 
-static int gmx_ddcoord2pmeindex(const t_commrec* cr, int x, int y, int z)
+static int gmx_ddcoord2pmeindex(const gmx_domdec_t& dd, int x, int y, int z)
 {
     ivec coords;
 
-    gmx_domdec_t* dd = cr->dd;
-    coords[XX]       = x;
-    coords[YY]       = y;
-    coords[ZZ]       = z;
-    const int slab   = ddindex2pmeindex(dd->comm->ddRankSetup, dd_index(dd->numCells, coords));
+    coords[XX]     = x;
+    coords[YY]     = y;
+    coords[ZZ]     = z;
+    const int slab = ddindex2pmeindex(dd.comm->ddRankSetup, dd_index(dd.numCells, coords));
 
     return slab;
 }
@@ -706,7 +705,7 @@ static int ddcoord2simnodeid(const t_commrec* cr, int x, int y, int z)
         {
             if (cr->dd->comm->ddRankSetup.usePmeOnlyRanks)
             {
-                nodeid = ddindex + gmx_ddcoord2pmeindex(cr, x, y, z);
+                nodeid = ddindex + gmx_ddcoord2pmeindex(*cr->dd, x, y, z);
             }
             else
             {
@@ -818,7 +817,7 @@ std::vector<int> get_pme_ddranks(const t_commrec* cr, const int pmenodeid)
                 else
                 {
                     /* The slab corresponds to the nodeid in the PME group */
-                    if (gmx_ddcoord2pmeindex(cr, x, y, z) == pmenodeid)
+                    if (gmx_ddcoord2pmeindex(*cr->dd, x, y, z) == pmenodeid)
                     {
                         ddranks.push_back(ddcoord2simnodeid(cr, x, y, z));
                     }
@@ -944,9 +943,9 @@ static void init_ddpme(gmx_domdec_t* dd, gmx_ddpme_t* ddpme, int dimind)
     set_slb_pme_dim_f(dd, ddpme->dim, &ddpme->slb_dim_f);
 }
 
-int dd_pme_maxshift_x(const gmx_domdec_t* dd)
+int dd_pme_maxshift_x(const gmx_domdec_t& dd)
 {
-    const DDRankSetup& ddRankSetup = dd->comm->ddRankSetup;
+    const DDRankSetup& ddRankSetup = dd.comm->ddRankSetup;
 
     if (ddRankSetup.ddpme[0].dim == XX)
     {
@@ -958,9 +957,9 @@ int dd_pme_maxshift_x(const gmx_domdec_t* dd)
     }
 }
 
-int dd_pme_maxshift_y(const gmx_domdec_t* dd)
+int dd_pme_maxshift_y(const gmx_domdec_t& dd)
 {
-    const DDRankSetup& ddRankSetup = dd->comm->ddRankSetup;
+    const DDRankSetup& ddRankSetup = dd.comm->ddRankSetup;
 
     if (ddRankSetup.ddpme[0].dim == YY)
     {
@@ -2779,15 +2778,15 @@ bool dd_moleculesAreAlwaysWhole(const gmx_domdec_t& dd)
     return dd.comm->systemInfo.moleculesAreAlwaysWhole;
 }
 
-gmx_bool dd_bonded_molpbc(const gmx_domdec_t* dd, PbcType pbcType)
+bool dd_bonded_molpbc(const gmx_domdec_t& dd, PbcType pbcType)
 {
     /* If each molecule is a single charge group
      * or we use domain decomposition for each periodic dimension,
      * we do not need to take pbc into account for the bonded interactions.
      */
-    return (pbcType != PbcType::No && dd->comm->systemInfo.haveInterDomainBondeds
-            && !(dd->numCells[XX] > 1 && dd->numCells[YY] > 1
-                 && (dd->numCells[ZZ] > 1 || pbcType == PbcType::XY)));
+    return (pbcType != PbcType::No && dd.comm->systemInfo.haveInterDomainBondeds
+            && !(dd.numCells[XX] > 1 && dd.numCells[YY] > 1
+                 && (dd.numCells[ZZ] > 1 || pbcType == PbcType::XY)));
 }
 
 /*! \brief Sets grid size limits and PP-PME setup, prints settings to log */
@@ -3156,7 +3155,7 @@ static gmx_bool test_dd_cutoff(const t_commrec* cr, const matrix box, gmx::Array
     return TRUE;
 }
 
-gmx_bool change_dd_cutoff(t_commrec* cr, const matrix box, gmx::ArrayRef<const gmx::RVec> x, real cutoffRequested)
+bool change_dd_cutoff(t_commrec* cr, const matrix box, gmx::ArrayRef<const gmx::RVec> x, real cutoffRequested)
 {
     bool bCutoffAllowed = test_dd_cutoff(cr, box, x, cutoffRequested);
 
index bc00e86fdd1a3fed9c35b633e7630b9c4bbf178d..ec40ab4e4803ac4eeeb927598323a661ad699550 100644 (file)
@@ -111,7 +111,7 @@ gmx::ArrayRef<const gmx::RangePartitioning> getUpdateGroupingPerMoleculetype(con
  *
  * This means it can be reset, even after a new DD partitioning.
  */
-void dd_store_state(struct gmx_domdec_t* dd, t_state* state);
+void dd_store_state(struct gmx_domdec_t& dd, t_state* state);
 
 /*! \brief Returns a pointer to the gmx_domdec_zones_t struct */
 struct gmx_domdec_zones_t* domdec_zones(struct gmx_domdec_t* dd);
@@ -123,13 +123,13 @@ int dd_numAtomsZones(const gmx_domdec_t& dd);
 int dd_numHomeAtoms(const gmx_domdec_t& dd);
 
 /*! \brief Returns the atom range in the local state for atoms that need to be present in mdatoms */
-int dd_natoms_mdatoms(const gmx_domdec_t* dd);
+int dd_natoms_mdatoms(const gmx_domdec_t& dd);
 
 /*! \brief Returns the atom range in the local state for atoms involved in virtual sites */
-int dd_natoms_vsite(const gmx_domdec_t* dd);
+int dd_natoms_vsite(const gmx_domdec_t& dd);
 
 /*! \brief Sets the atom range for atom in the local state for atoms received in constraints communication */
-void dd_get_constraint_range(const gmx_domdec_t* dd, int* at_start, int* at_end);
+void dd_get_constraint_range(const gmx_domdec_t& dd, int* at_start, int* at_end);
 
 /*! \libinternal \brief Struct for passing around the number of PME domains */
 struct NumPmeDomains
@@ -145,10 +145,10 @@ NumPmeDomains getNumPmeDomains(const gmx_domdec_t* dd);
 std::vector<int> get_pme_ddranks(const t_commrec* cr, int pmenodeid);
 
 /*! \brief Returns the maximum shift for coordinate communication in PME, dim x */
-int dd_pme_maxshift_x(const gmx_domdec_t* dd);
+int dd_pme_maxshift_x(const gmx_domdec_t& dd);
 
 /*! \brief Returns the maximum shift for coordinate communication in PME, dim y */
-int dd_pme_maxshift_y(const gmx_domdec_t* dd);
+int dd_pme_maxshift_y(const gmx_domdec_t& dd);
 
 /*! \brief Return whether constraints, not including settles, cross domain boundaries */
 bool ddHaveSplitConstraints(const gmx_domdec_t& dd);
@@ -176,7 +176,7 @@ void dd_init_bondeds(FILE*                           fplog,
 bool dd_moleculesAreAlwaysWhole(const gmx_domdec_t& dd);
 
 /*! \brief Returns if we need to do pbc for calculating bonded interactions */
-gmx_bool dd_bonded_molpbc(const gmx_domdec_t* dd, PbcType pbcType);
+bool dd_bonded_molpbc(const gmx_domdec_t& dd, PbcType pbcType);
 
 /*! \brief Change the DD non-bonded communication cut-off.
  *
@@ -188,7 +188,7 @@ gmx_bool dd_bonded_molpbc(const gmx_domdec_t* dd, PbcType pbcType);
  * \param[in] x                Position vector, used for computing the dimensions of the system
  * \param[in] cutoffRequested  The requested atom to atom cut-off distance, usually the pair-list cutoff distance
  */
-gmx_bool change_dd_cutoff(t_commrec* cr, const matrix box, gmx::ArrayRef<const gmx::RVec> x, real cutoffRequested);
+bool change_dd_cutoff(t_commrec* cr, const matrix box, gmx::ArrayRef<const gmx::RVec> x, real cutoffRequested);
 
 /*! \brief Set up communication for averaging GPU wait times over domains
  *
@@ -245,7 +245,7 @@ void dd_move_x_constraints(struct gmx_domdec_t*     dd,
                            const matrix             box,
                            gmx::ArrayRef<gmx::RVec> x0,
                            gmx::ArrayRef<gmx::RVec> x1,
-                           gmx_bool                 bX1IsCoord);
+                           bool                     bX1IsCoord);
 
 /*! \brief Communicates the coordinates involved in virtual sites */
 void dd_move_x_vsites(const gmx_domdec_t& dd, const matrix box, rvec* x);
@@ -294,10 +294,10 @@ void dd_make_local_top(struct gmx_domdec_t*       dd,
                        gmx_localtop_t*            ltop);
 
 /*! \brief Sort ltop->ilist when we are doing free energy. */
-void dd_sort_local_top(gmx_domdec_t* dd, const t_mdatoms* mdatoms, gmx_localtop_t* ltop);
+void dd_sort_local_top(gmx_domdec_t& dd, const t_mdatoms* mdatoms, gmx_localtop_t* ltop);
 
 /*! \brief Construct local state */
-void dd_init_local_state(struct gmx_domdec_t* dd, const t_state* state_global, t_state* local_state);
+void dd_init_local_state(gmx_domdec_t& dd, const t_state* state_global, t_state* local_state);
 
 /*! \brief Generate a list of links between atoms that are linked by bonded interactions
  *
index d456b933cfed8ab9db661098613046e3456b6cc6..8afb7c9bf7096cdb1280f84ebc18081d8ca78d47 100644 (file)
@@ -107,7 +107,7 @@ void dd_move_x_constraints(gmx_domdec_t*            dd,
                            const matrix             box,
                            gmx::ArrayRef<gmx::RVec> x0,
                            gmx::ArrayRef<gmx::RVec> x1,
-                           gmx_bool                 bX1IsCoord)
+                           bool                     bX1IsCoord)
 {
     if (dd->constraint_comm)
     {
index 3c51f193db8b6e4b1ef589ceb0e6502d89371fd8..137538e459700cc4f0c8c8a561d5d42481686781 100644 (file)
@@ -1683,9 +1683,9 @@ void dd_make_local_top(gmx_domdec_t*       dd,
     ltop->idef.ilsort = ilsortUNKNOWN;
 }
 
-void dd_sort_local_top(gmx_domdec_t* dd, const t_mdatoms* mdatoms, gmx_localtop_t* ltop)
+void dd_sort_local_top(gmx_domdec_t& dd, const t_mdatoms* mdatoms, gmx_localtop_t* ltop)
 {
-    if (dd->reverse_top->impl_->ilsort == ilsortNO_FE)
+    if (dd.reverse_top->impl_->ilsort == ilsortNO_FE)
     {
         ltop->idef.ilsort = ilsortNO_FE;
     }
@@ -1695,7 +1695,7 @@ void dd_sort_local_top(gmx_domdec_t* dd, const t_mdatoms* mdatoms, gmx_localtop_
     }
 }
 
-void dd_init_local_state(gmx_domdec_t* dd, const t_state* state_global, t_state* state_local)
+void dd_init_local_state(gmx_domdec_t& dd, const t_state* state_global, t_state* state_local)
 {
     int buf[NITEM_DD_INIT_LOCAL_STATE];
 
@@ -1707,7 +1707,7 @@ void dd_init_local_state(gmx_domdec_t* dd, const t_state* state_global, t_state*
         buf[3] = state_global->nhchainlength;
         buf[4] = state_global->dfhist ? state_global->dfhist->nlambda : 0;
     }
-    dd_bcast(dd, NITEM_DD_INIT_LOCAL_STATE * sizeof(int), buf);
+    dd_bcast(&dd, NITEM_DD_INIT_LOCAL_STATE * sizeof(int), buf);
 
     init_gtc_state(state_local, buf[1], buf[2], buf[3]);
     init_dfhist_state(state_local, buf[4]);
index 9db54f0c3395f5825a722994bc2752ab6f43c0bf..f7a6f87edaec7e3daa6d3bc6911237471ddbdee7 100644 (file)
@@ -82,9 +82,9 @@ void mdAlgorithmsSetupAtomData(const t_commrec*     cr,
 
     if (usingDomDec)
     {
-        numAtomIndex  = dd_natoms_mdatoms(cr->dd);
+        numAtomIndex  = dd_natoms_mdatoms(*cr->dd);
         numHomeAtoms  = dd_numHomeAtoms(*cr->dd);
-        numTotalAtoms = dd_natoms_mdatoms(cr->dd);
+        numTotalAtoms = dd_natoms_mdatoms(*cr->dd);
     }
     else
     {
@@ -108,7 +108,7 @@ void mdAlgorithmsSetupAtomData(const t_commrec*     cr,
     auto mdatoms = mdAtoms->mdatoms();
     if (usingDomDec)
     {
-        dd_sort_local_top(cr->dd, mdatoms, top);
+        dd_sort_local_top(*cr->dd, mdatoms, top);
     }
     else
     {
index 789dc73522f509487a8bf40d2c3bd80b97c4867b..c6a40d3c7b5aef0b9ee89ffc2be9f410aff2c462 100644 (file)
@@ -3294,8 +3294,8 @@ void dd_partition_system(FILE*                     fplog,
                                 mdatoms->sqrt_c6B,
                                 mdatoms->sigmaA,
                                 mdatoms->sigmaB,
-                                dd_pme_maxshift_x(dd),
-                                dd_pme_maxshift_y(dd));
+                                dd_pme_maxshift_x(*dd),
+                                dd_pme_maxshift_y(*dd));
     }
 
     if (dd->atomSets != nullptr)
index 911c55ed6fb6d53bf7a28313e135f6589fea124d..a4b4acd9fe45be4063243061597b50af0ab22e43 100644 (file)
@@ -223,7 +223,7 @@ bool Constraints::havePerturbedConstraints() const
 }
 
 //! Clears constraint quantities for atoms in nonlocal region.
-static void clear_constraint_quantity_nonlocal(gmx_domdec_t* dd, ArrayRef<RVec> q)
+static void clear_constraint_quantity_nonlocal(gmx_domdec_t& dd, ArrayRef<RVec> q)
 {
     int nonlocal_at_start, nonlocal_at_end, at;
 
@@ -269,7 +269,7 @@ static void write_constr_pdb(const char*          fn,
     if (DOMAINDECOMP(cr))
     {
         dd = cr->dd;
-        dd_get_constraint_range(dd, &dd_ac0, &dd_ac1);
+        dd_get_constraint_range(*dd, &dd_ac0, &dd_ac1);
         start  = 0;
         homenr = dd_ac1;
     }
@@ -500,7 +500,7 @@ bool Constraints::Impl::apply(bool                      bLog,
              * We never actually use these values, but we do increment them,
              * so we should avoid uninitialized variables and overflows.
              */
-            clear_constraint_quantity_nonlocal(cr->dd, v.unpaddedArrayRef());
+            clear_constraint_quantity_nonlocal(*cr->dd, v.unpaddedArrayRef());
         }
     }
 
index 5bb62cd5b2c378c10c3e407b1d64eae32eba6c8b..a48abf6874c9b53cef71551a0c61beacd10e83bf 100644 (file)
@@ -226,8 +226,8 @@ void calculateLongRangeNonbondeds(t_forcerec*                   fr,
                             md->sigmaB,
                             box,
                             cr,
-                            DOMAINDECOMP(cr) ? dd_pme_maxshift_x(cr->dd) : 0,
-                            DOMAINDECOMP(cr) ? dd_pme_maxshift_y(cr->dd) : 0,
+                            DOMAINDECOMP(cr) ? dd_pme_maxshift_x(*cr->dd) : 0,
+                            DOMAINDECOMP(cr) ? dd_pme_maxshift_y(*cr->dd) : 0,
                             nrnb,
                             wcycle,
                             ewaldOutput.vir_q,
index 0312a33585822e1126e809b5ca684d0b2c590724..e231cb4b124887f408717bcb57c70b76b3cbad56 100644 (file)
@@ -1067,7 +1067,7 @@ void init_forcerec(FILE*                            fplog,
         }
         else
         {
-            forcerec->bMolPBC = dd_bonded_molpbc(commrec->dd, forcerec->pbcType);
+            forcerec->bMolPBC = dd_bonded_molpbc(*commrec->dd, forcerec->pbcType);
 
             /* With Ewald surface correction it is useful to support e.g. running water
              * in parallel with update groups.
index 5726cd0fb347ed3b5c3921ceefab0b22ab42f145..5b24e8be3f282b2ea0887397d2d53a4d20bf12f5 100644 (file)
@@ -1898,7 +1898,7 @@ void set_lincs(const InteractionDefinitions& idef,
         {
             int start;
 
-            dd_get_constraint_range(cr->dd, &start, &natoms);
+            dd_get_constraint_range(*cr->dd, &start, &natoms);
         }
         else
         {
index de642b84de9ceafad7beddb478051e32c11be9b3..5a302d26276ad841c83e4dac0cf81853d1d3cf19 100644 (file)
@@ -373,7 +373,7 @@ void gmx::LegacySimulator::do_md()
     {
         stateInstance = std::make_unique<t_state>();
         state         = stateInstance.get();
-        dd_init_local_state(cr->dd, state_global, state);
+        dd_init_local_state(*cr->dd, state_global, state);
 
         /* Distribute the charge groups over the nodes from the master node */
         dd_partition_system(fplog,
index a06cca33b12ff8c26c5a5744c3c10bd7dc29e880..c4feae9134c2ceb7c637cb58a2bd3ce27bc33a98 100644 (file)
@@ -292,7 +292,7 @@ void gmx::LegacySimulator::do_mimic()
     {
         stateInstance = std::make_unique<t_state>();
         state         = stateInstance.get();
-        dd_init_local_state(cr->dd, state_global, state);
+        dd_init_local_state(*cr->dd, state_global, state);
 
         /* Distribute the charge groups over the nodes from the master node */
         dd_partition_system(fplog,
index 9563ac5c94ee87aa1dd99682e4372d75f68c2def..c46bbec827592184c63ae2676dc71fe70ad8d464 100644 (file)
@@ -424,7 +424,7 @@ static void init_em(FILE*                fplog,
 
     if (DOMAINDECOMP(cr))
     {
-        dd_init_local_state(cr->dd, state_global, &ems->s);
+        dd_init_local_state(*cr->dd, state_global, &ems->s);
 
         /* Distribute the charge groups over the nodes from the master node */
         dd_partition_system(fplog,
@@ -448,7 +448,7 @@ static void init_em(FILE*                fplog,
                             nrnb,
                             nullptr,
                             FALSE);
-        dd_store_state(cr->dd, &ems->s);
+        dd_store_state(*cr->dd, &ems->s);
     }
     else
     {
@@ -816,7 +816,7 @@ static void em_dd_partition_system(FILE*                fplog,
                         nrnb,
                         wcycle,
                         FALSE);
-    dd_store_state(cr->dd, &ems->s);
+    dd_store_state(*cr->dd, &ems->s);
 }
 
 namespace
index c9700481d15027cd3b9d98d0df358888ddceddee..2ef3a87e82234fa3dc6f2498d495d87999149844 100644 (file)
@@ -336,7 +336,7 @@ void gmx::LegacySimulator::do_rerun()
     {
         stateInstance = std::make_unique<t_state>();
         state         = stateInstance.get();
-        dd_init_local_state(cr->dd, state_global, state);
+        dd_init_local_state(*cr->dd, state_global, state);
 
         /* Distribute the charge groups over the nodes from the master node */
         dd_partition_system(fplog,
index 92d48683e619eb71b7441109a8da19bd7deaf2fc..ac079dacbde411e20223c24afdf144a3c62f12fd 100644 (file)
@@ -1008,10 +1008,10 @@ void relax_shell_flexcon(FILE*                         fplog,
 
     if (DOMAINDECOMP(cr))
     {
-        nat = dd_natoms_vsite(cr->dd);
+        nat = dd_natoms_vsite(*cr->dd);
         if (nflexcon > 0)
         {
-            dd_get_constraint_range(cr->dd, &dd_ac0, &dd_ac1);
+            dd_get_constraint_range(*cr->dd, &dd_ac0, &dd_ac1);
             nat = std::max(nat, dd_ac1);
         }
     }
index 6f769861af6400056bcf1af54ffba8b7aae9b7aa..e4fbaa09b2b081cd50acc7b92e669d2b315678f0 100644 (file)
@@ -111,7 +111,7 @@ StatePropagatorData::StatePropagatorData(int                numAtoms,
     if (DOMAINDECOMP(cr))
     {
         auto localState = std::make_unique<t_state>();
-        dd_init_local_state(cr->dd, globalState, localState.get());
+        dd_init_local_state(*cr->dd, globalState, localState.get());
         stateHasVelocities = ((localState->flags & enumValueToBitMask(StateEntry::V)) != 0);
         setLocalState(std::move(localState));
     }