Skip to content

Commit

Permalink
say more explicitly what the added function calls do
Browse files Browse the repository at this point in the history
  • Loading branch information
akohlmey committed Jan 25, 2024
1 parent 4a13fe6 commit 4134c82
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions src/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2460,8 +2460,13 @@ static int set_variable_deprecated_flag = 1;
.. deprecated:: TBD
This function assigns a new value from the string str to the
string-style variable *name*. Returns -1 if a variable of that
name does not exist or is not a string-style variable, otherwise 0.
string-style variable *name*. This is a way to directly change the
string value of a LAMMPS variable that was previous defined with a
:doc:`variable name string <variable>` command without using any
LAMMPS commands to delete and redefine the variable.
Returns -1 if a variable of that name does not exist or if it is not
a string-style variable, otherwise 0.
.. warning::
Expand Down Expand Up @@ -2493,8 +2498,13 @@ int lammps_set_variable(void *handle, const char *name, const char *str)
.. versionadded:: TBD
This function assigns a new value from the string str to the
string-style variable *name*. Returns -1 if a variable of that
name does not exist or is not a string-style variable, otherwise 0.
string-style variable *name*. This is a way to directly change the
string value of a LAMMPS variable that was previous defined with a
:doc:`variable name string <variable>` command without using any
LAMMPS commands to delete and redefine the variable.
Returns -1 if a variable of that name does not exist or if it is not
a string-style variable, otherwise 0.
\endverbatim
Expand All @@ -2521,10 +2531,19 @@ int lammps_set_string_variable(void *handle, const char *name, const char *str)

/** Set the value of an internal-style variable.
*
* This function assigns a new value value to an internal-style variable.
* Returns -1 if a variable of that name does not exist or is not an
* internal-style variable, otherwise 0.
*
\verbatim embed:rst
This function assigns a new value from the floating point number *value*
to the internal-style variable *name*. This is a way to directly change
the numerical value of such a LAMMPS variable that was previous defined
with a :doc:`variable name internal <variable>` command without using
any LAMMPS commands to delete and redefine the variable.
Returns -1 if a variable of that name does not exist or is not an
internal-style variable, otherwise 0.
\endverbatim
* \param handle pointer to a previously created LAMMPS instance
* \param name name of the variable
* \param value new value of the variable
Expand Down

0 comments on commit 4134c82

Please sign in to comment.