From 798fcacd77d842d35b187a946870f39e6ef67867 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer <akohlmey@gmail.com> Date: Fri, 13 Apr 2018 11:37:51 -0400 Subject: [PATCH] update example for API change in Fix::copy_arrays() --- doc/src/Developer/developer.tex | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/src/Developer/developer.tex b/doc/src/Developer/developer.tex index 3ba9018fb9..edbf588b45 100644 --- a/doc/src/Developer/developer.tex +++ b/doc/src/Developer/developer.tex @@ -607,14 +607,15 @@ this situation there are several methods which should be implemented: \begin{itemize} \item \verb|double memory_usage| - return how much memory fix uses -\item \verb|void grow_arrays(int)| - do reallocation of the per particle arrays +\item \verb|void grow_arrays(int)| - do reallocation of the per particle arrays in your fix -\item \verb|void copy_arrays(int i, int j)| - copy i-th per-particle information - to j-th. Used when atoms sorting is performed +\item \verb|void copy_arrays(int i, int j, int delflag)| - copy i-th per-particle + information to j-th. Used when atoms sorting is performed. if delflag is set + and atom j owns a body, move the body information to atom i. \item \verb|void set_arrays(int i)| - sets i-th particle related information to zero \end{itemize} -Note, that if your class implements these methods, it must call add calls of +Note, that if your class implements these methods, it must call add calls of add\_callback and delete\_callback to constructor and destructor: \begin{center} @@ -654,7 +655,7 @@ void FixSavePos::grow_arrays(int nmax) memory->grow(this->x, nmax, 3, "FixSavePos:x"); } -void FixSavePos::copy_arrays(int i, int j) +void FixSavePos::copy_arrays(int i, int j, int delflag) { memcpy(this->x[j], this->x[i], sizeof(double) * 3); } -- GitLab