add notes to python versions of lammps_extract_fix() that for global data one can only retrieve scalars
This commit is contained in:
@ -1078,15 +1078,23 @@ class lammps(object):
|
||||
def extract_fix(self,fid,fstyle,ftype,nrow=0,ncol=0):
|
||||
"""Retrieve data from a LAMMPS fix
|
||||
|
||||
This is a wrapper around the :cpp:func:`lammps_extract_fix`
|
||||
function of the C-library interface.
|
||||
This function returns ``None`` if either the fix id is not
|
||||
recognized, or an invalid combination of :ref:`fstyle <py_style_constants>`
|
||||
and :ref:`ftype <py_type_constants>` constants is used. The
|
||||
names and functionality of the constants are the same as for
|
||||
the corresponding C-library function. For requests to return
|
||||
a scalar or a size, the value is returned, also when accessing
|
||||
global vectors or arrays, otherwise a pointer.
|
||||
This is a wrapper around the :cpp:func:`lammps_extract_fix` function
|
||||
of the C-library interface. This function returns ``None`` if
|
||||
either the fix id is not recognized, or an invalid combination of
|
||||
:ref:`fstyle <py_style_constants>` and :ref:`ftype
|
||||
<py_type_constants>` constants is used. The names and functionality
|
||||
of the constants are the same as for the corresponding C-library
|
||||
function. For requests to return a scalar or a size, the value is
|
||||
returned, also when accessing global vectors or arrays, otherwise a
|
||||
pointer.
|
||||
|
||||
.. note::
|
||||
|
||||
When requesting global data, the fix data can only be accessed
|
||||
one item at a time without access to the whole vector or array.
|
||||
Thus this function will always return a scalar. To access vector
|
||||
or array elements the "nrow" and "ncol" arguments need to be set
|
||||
accordingly (they default to 0).
|
||||
|
||||
:param fid: fix ID
|
||||
:type fid: string
|
||||
|
||||
Reference in New Issue
Block a user