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

View File

@ -63,12 +63,16 @@ class numpy_wrapper:
.. note:: .. note::
While the returned arrays of per-atom data are dimensioned The returned arrays of per-atom data are by default dimensioned
for the range [0:nmax] - as is the underlying storage - for the range [0:nlocal] since that data is *always* valid. The
the data is usually only valid for the range of [0:nlocal], underlying storage for the data, however, is typically allocated
unless the property of interest is also updated for ghost for the range of [0:nmax]. Whether there is valid data in the range
atoms. In some cases, this depends on a LAMMPS setting, see [nlocal:nlocal+nghost] depends on whether the property of interest
for example :doc:`comm_modify vel yes <comm_modify>`. 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 :param name: name of the property
:type name: string :type name: string