clarify the documentation for the extract_atom numpy wrapper

This commit is contained in:
Axel Kohlmeyer 2023-08-23 20:02:23 -04:00
parent df1e2a64d2
commit 949f93b588
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 10 additions and 6 deletions

View File

@ -63,12 +63,16 @@ class numpy_wrapper:
.. note::
While the returned arrays of per-atom data are dimensioned
for the range [0:nmax] - as is the underlying storage -
the data is usually only valid for the range of [0:nlocal],
unless the property of interest is also updated for ghost
atoms. In some cases, this depends on a LAMMPS setting, see
for example :doc:`comm_modify vel yes <comm_modify>`.
The returned arrays of per-atom data are by default dimensioned
for the range [0:nlocal] since that data is *always* valid. The
underlying storage for the data, however, is typically allocated
for the range of [0:nmax]. Whether there is valid data in the range
[nlocal:nlocal+nghost] depends on whether the property of interest
is also updated for ghost atoms. This is not often the case. In
some cases, it depends on a LAMMPS setting, see for example
:doc:`comm_modify vel yes <comm_modify>`. By using the optional
*nelem* parameter the size of the returned NumPy can be overridden.
There is no check whether the number of elements chosen is valid.
:param name: name of the property
:type name: string