From 21e03d8e5c06b80c0bd3bd58e19e6b2474a4761e Mon Sep 17 00:00:00 2001 From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa> Date: Mon, 13 Aug 2012 21:42:40 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8627 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/library.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/library.cpp b/src/library.cpp index 90f653d26d..9260545670 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -373,7 +373,7 @@ int lammps_get_natoms(void *ptr) count = # of per-atom values, e.g. 1 for type or charge, 3 for x or f return atom-based values in data, ordered by count, then by atom ID e.g. x[0][0],x[0][1],x[0][2],x[1][0],x[1][1],x[1][2],x[2][0],... - data must be allocated by caller to correct length + data must be pre-allocated by caller to correct length ------------------------------------------------------------------------- */ void lammps_gather_atoms(void *ptr, char *name, @@ -451,15 +451,13 @@ void lammps_gather_atoms(void *ptr, char *name, } } - /* ---------------------------------------------------------------------- - gather the named atom-based entity across all processors + scatter the named atom-based entity across all processors name = desired quantity, e.g. x or charge type = 0 for integer values, 1 for double values count = # of per-atom values, e.g. 1 for type or charge, 3 for x or f - return atom-based values in data, ordered by count, then by atom ID + data = atom-based values in data, ordered by count, then by atom ID e.g. x[0][0],x[0][1],x[0][2],x[1][0],x[1][1],x[1][2],x[2][0],... - data must be allocated by caller to correct length ------------------------------------------------------------------------- */ void lammps_scatter_atoms(void *ptr, char *name, -- GitLab