Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
multiscale
lammps
Commits
798fcacd
Commit
798fcacd
authored
6 years ago
by
Axel Kohlmeyer
Browse files
Options
Downloads
Patches
Plain Diff
update example for API change in Fix::copy_arrays()
parent
bc0fd549
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/Developer/developer.tex
+6
-5
6 additions, 5 deletions
doc/src/Developer/developer.tex
with
6 additions
and
5 deletions
doc/src/Developer/developer.tex
+
6
−
5
View file @
798fcacd
...
...
@@ -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);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment