From 72b295d7f48538f310b658b63497904a0659a082 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 10 Jun 2019 18:21:17 -0400 Subject: [PATCH] add support for internal style variables to info command --- src/info.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/info.cpp b/src/info.cpp index ac2ee4a96d..25b9879408 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -67,7 +67,7 @@ namespace LAMMPS_NS { // same as in variable.cpp enum {INDEX,LOOP,WORLD,UNIVERSE,ULOOP,STRING,GETENV, - SCALARFILE,ATOMFILE,FORMAT,EQUAL,ATOM,PYTHON}; + SCALARFILE,ATOMFILE,FORMAT,EQUAL,ATOM,VECTOR,PYTHON,INTERNAL}; enum {COMPUTES=1<<0, DUMPS=1<<1, @@ -106,7 +106,7 @@ static const int STYLES = ATOM_STYLES | INTEGRATE_STYLES | MINIMIZE_STYLES static const char *varstyles[] = { "index", "loop", "world", "universe", "uloop", "string", "getenv", - "file", "atomfile", "format", "equal", "atom", "python", "(unknown)"}; + "file", "atomfile", "format", "equal", "atom", "vector", "python", "internal", "(unknown)"}; static const char *mapstyles[] = { "none", "array", "hash" }; @@ -599,6 +599,10 @@ void Info::command(int narg, char **arg) int ndata = 1; fprintf(out,"Variable[%3d]: %-10s, style = %-10s, def =", i,names[i],varstyles[style[i]]); + if (style[i] == INTERNAL) { + fprintf(out,"%g\n",input->variable->dvalue[i]); + continue; + } if ((style[i] != LOOP) && (style[i] != ULOOP)) ndata = input->variable->num[i]; for (int j=0; j < ndata; ++j)