Use ArrayRef in compute_globals
[alexxy/gromacs.git] / src / gromacs / mdlib / vcm.h
index acafb8d8ba791bab258552456f7e321221596fe3..b0c142474101f740f8fda554d70e1b6ee6382118 100644 (file)
@@ -50,6 +50,12 @@ struct SimulationGroups;
 struct t_inputrec;
 struct t_mdatoms;
 
+namespace gmx
+{
+template<typename T>
+class ArrayRef;
+}
+
 struct t_vcm_thread
 {
     //! Linear momentum
@@ -113,7 +119,10 @@ void reportComRemovalInfo(FILE* fp, const t_vcm& vcm);
 
 
 /* Do a per group center of mass things */
-void calc_vcm_grp(const t_mdatoms& md, const rvec x[], const rvec v[], t_vcm* vcm);
+void calc_vcm_grp(const t_mdatoms&               md,
+                  gmx::ArrayRef<const gmx::RVec> x,
+                  gmx::ArrayRef<const gmx::RVec> v,
+                  t_vcm*                         vcm);
 
 /* Set the COM velocity to zero and potentially correct the COM position.
  *
@@ -123,6 +132,10 @@ void calc_vcm_grp(const t_mdatoms& md, const rvec x[], const rvec v[], t_vcm* vc
  * and a pointer to the coordinates at normal MD steps.
  * When fplog != nullptr, a warning is printed to fplog with high COM velocity.
  */
-void process_and_stopcm_grp(FILE* fplog, t_vcm* vcm, const t_mdatoms& mdatoms, rvec x[], rvec v[]);
+void process_and_stopcm_grp(FILE*                    fplog,
+                            t_vcm*                   vcm,
+                            const t_mdatoms&         mdatoms,
+                            gmx::ArrayRef<gmx::RVec> x,
+                            gmx::ArrayRef<gmx::RVec> v);
 
 #endif