Commit 798fcacd authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

update example for API change in Fix::copy_arrays()

parent bc0fd549
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -609,8 +609,9 @@ this situation there are several methods which should be implemented:
\item \verb|double memory_usage| - return how much memory fix uses
\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}

@@ -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);
}