add support for accessing line number from cached thermo data

This commit is contained in:
Axel Kohlmeyer
2023-08-24 21:22:51 -04:00
parent 23bc3abe18
commit 48de679a58

View File

@ -773,6 +773,10 @@ argument string.
- 1 if setup is not completed and thus thermo data invalid, 0 otherwise - 1 if setup is not completed and thus thermo data invalid, 0 otherwise
- pointer to int - pointer to int
- no - no
* - line
- line number (0-based) of current line in current file or buffer
- pointer to int
- no
* - step * - step
- timestep when the last thermo output was generated or -1 - timestep when the last thermo output was generated or -1
- pointer to bigint - pointer to bigint
@ -814,6 +818,9 @@ void *lammps_last_thermo(void *handle, const char *what, int index)
if (strcmp(what, "setup") == 0) { if (strcmp(what, "setup") == 0) {
val = (void *) &lmp->update->setupflag; val = (void *) &lmp->update->setupflag;
} else if (strcmp(what, "line") == 0) {
val = (void *) th->get_line();
} else if (strcmp(what, "step") == 0) { } else if (strcmp(what, "step") == 0) {
val = (void *) th->get_timestep(); val = (void *) th->get_timestep();