From c5513c4f7503e274aeda7d021fa29c446e3a2456 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer <akohlmey@gmail.com> Date: Mon, 17 Oct 2016 19:56:18 -0400 Subject: [PATCH] provide an accessor for names of LAMMPS variables --- src/info.cpp | 7 +++++++ src/info.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/info.cpp b/src/info.cpp index 30c696393f..e1b79951af 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -1079,3 +1079,10 @@ bool Info::has_exceptions() const { return false; #endif } + +/* ---------------------------------------------------------------------- */ + +char **Info::get_variable_names(int &num) { + num = input->variable->nvar; + return input->variable->names; +} diff --git a/src/info.h b/src/info.h index 8e7a96d15a..fb7ca58c47 100644 --- a/src/info.h +++ b/src/info.h @@ -39,6 +39,8 @@ class Info : protected Pointers { bool has_ffmpeg_support() const; bool has_exceptions() const; + char **get_variable_names(int &num); + private: void available_styles(FILE * out, int flags); -- GitLab