Move listed and wall forces out of do_force_lowlevel()
[alexxy/gromacs.git] / src / gromacs / mdlib / force.h
index 711ce856b88ae2b7ad1d434bed282707885bccd5..c8cfb79c161814627f4f164b890e606ffd9f147b 100644 (file)
@@ -38,9 +38,9 @@
 #ifndef GMX_MDLIB_FORCE_H
 #define GMX_MDLIB_FORCE_H
 
-#include "gromacs/math/arrayrefwithpadding.h"
+#include <cstdio>
+
 #include "gromacs/math/vectypes.h"
-#include "gromacs/utility/arrayref.h"
 
 class DDBalanceRegionHandler;
 struct gmx_edsam;
@@ -62,9 +62,12 @@ struct t_nrnb;
 
 namespace gmx
 {
+template<typename>
+class ArrayRef;
+template<typename>
+class ArrayRefWithPadding;
 class Awh;
 class ForceBuffersView;
-class ForceOutputs;
 class ForceWithVirial;
 class ImdSession;
 class MdrunScheduleWorkload;
@@ -112,28 +115,24 @@ void do_force(FILE*                               log,
  */
 
 
-/* Compute listed forces, Ewald, PME corrections add when (when used).
+/* Calculate CPU Ewald or PME-mesh forces when done on this rank and Ewald corrections, when used
  *
- * xWholeMolecules only needs to contain whole molecules when orientation
- * restraints need to be computed and can be empty otherwise.
+ * Note that Ewald dipole and net charge corrections are always computed here, independently
+ * on whether the PME-mesh contribution is computed on a separate PME rank or on a GPU.
  */
-void do_force_lowlevel(t_forcerec*                               fr,
-                       const t_inputrec*                         ir,
-                       const t_commrec*                          cr,
-                       const gmx_multisim_t*                     ms,
-                       t_nrnb*                                   nrnb,
-                       gmx_wallcycle*                            wcycle,
-                       const t_mdatoms*                          md,
-                       gmx::ArrayRefWithPadding<const gmx::RVec> coordinates,
-                       gmx::ArrayRef<const gmx::RVec>            xWholeMolecules,
-                       history_t*                                hist,
-                       gmx::ForceOutputs*                        forceOutputs,
-                       gmx_enerdata_t*                           enerd,
-                       const matrix                              box,
-                       const real*                               lambda,
-                       const rvec*                               mu_tot,
-                       const gmx::StepWorkload&                  stepWork,
-                       const DDBalanceRegionHandler&             ddBalanceRegionHandler);
-/* Call all the force routines */
+void calculateLongRangeNonbondeds(t_forcerec*                    fr,
+                                  const t_inputrec*              ir,
+                                  const t_commrec*               cr,
+                                  t_nrnb*                        nrnb,
+                                  gmx_wallcycle*                 wcycle,
+                                  const t_mdatoms*               md,
+                                  gmx::ArrayRef<const gmx::RVec> coordinates,
+                                  gmx::ForceWithVirial*          forceWithVirial,
+                                  gmx_enerdata_t*                enerd,
+                                  const matrix                   box,
+                                  const real*                    lambda,
+                                  const rvec*                    mu_tot,
+                                  const gmx::StepWorkload&       stepWork,
+                                  const DDBalanceRegionHandler&  ddBalanceRegionHandler);
 
 #endif