store the actual file name *after* it is written

This commit is contained in:
Axel Kohlmeyer
2023-08-29 23:31:24 -04:00
parent a176ef4768
commit ceadb04cf3
2 changed files with 14 additions and 4 deletions

View File

@ -822,6 +822,10 @@ argument string.
- line number (0-based) of current line in current file or buffer
- pointer to int
- no
* - imagename
- file name of the last :doc:`dump image <dump_image>` file written
- pointer to 0-terminated const char array
- no
* - step
- timestep when the last thermo output was generated or -1
- pointer to bigint
@ -866,6 +870,9 @@ void *lammps_last_thermo(void *handle, const char *what, int index)
} else if (strcmp(what, "line") == 0) {
val = (void *) th->get_line();
} else if (strcmp(what, "imagename") == 0) {
val = (void *) th->get_image_fname();
} else if (strcmp(what, "step") == 0) {
val = (void *) th->get_timestep();