provide an accessor for names of LAMMPS variables

This commit is contained in:
Axel Kohlmeyer
2016-10-17 19:56:18 -04:00
parent d11363c7eb
commit c5513c4f75
2 changed files with 9 additions and 0 deletions

View File

@ -1079,3 +1079,10 @@ bool Info::has_exceptions() const {
return false; return false;
#endif #endif
} }
/* ---------------------------------------------------------------------- */
char **Info::get_variable_names(int &num) {
num = input->variable->nvar;
return input->variable->names;
}

View File

@ -39,6 +39,8 @@ class Info : protected Pointers {
bool has_ffmpeg_support() const; bool has_ffmpeg_support() const;
bool has_exceptions() const; bool has_exceptions() const;
char **get_variable_names(int &num);
private: private:
void available_styles(FILE * out, int flags); void available_styles(FILE * out, int flags);