From 0e81803c8bf7820cafa5a22d956c288b0dd0d24d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 17 Sep 2020 22:00:58 -0400 Subject: [PATCH] some embedded documentation tweaks --- src/atom.cpp | 16 +++++++++++++++- src/library.cpp | 10 ++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/atom.cpp b/src/atom.cpp index 6fc66bf813..79f4c3d6c4 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -30,6 +30,7 @@ #include "neighbor.h" #include "update.h" #include "variable.h" + #include "library.h" #include @@ -2504,6 +2505,8 @@ length of the data area, and a short description. - 1 if the particle is a body particle, 0 if not \endverbatim + * + * \sa extract_datatype * * \param name string with the keyword of the desired property. Typically the name of the pointer variable returned @@ -2513,6 +2516,8 @@ void *Atom::extract(const char *name) { // -------------------------------------------------------------------- // 4th customization section: customize by adding new variable name + // please see the following function to set the type of the data + // so that programs can detect it dynamically at run time. /* NOTE: this array is only of length ntypes+1 */ if (strcmp(name,"mass") == 0) return (void *) mass; @@ -2582,10 +2587,19 @@ void *Atom::extract(const char *name) } -/** Provide data type about internal data of the Atom class +/** Provide data type info about internal data of the Atom class + * +\verbatim embed:rst + +.. versionadded:: 18Sep2020 + +\endverbatim + * + * \sa extract * * \param name string with the keyword of the desired property. * \return data type constant for desired property or -1 */ + int Atom::extract_datatype(const char *name) { // -------------------------------------------------------------------- diff --git a/src/library.cpp b/src/library.cpp index 452e0c87dc..1f33c0ee9f 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -1209,6 +1209,11 @@ void *lammps_extract_atom(void *handle, const char *name) /** Get data type of internal global LAMMPS variables or arrays. * * TODO +\verbatim embed:rst + +.. versionadded:: 18Sep2020 + +\endverbatim * * \param handle pointer to a previously created LAMMPS instance * \param name string with the name of the extracted property @@ -1284,6 +1289,11 @@ int lammps_extract_global_datatype(void *handle, const char *name) /** Get data type of a LAMMPS per-atom property * * TODO +\verbatim embed:rst + +.. versionadded:: 18Sep2020 + +\endverbatim * * \param handle pointer to a previously created LAMMPS instance * \param name string with the name of the extracted property