forked from lijiext/lammps
add support for internal style variables to info command
This commit is contained in:
parent
b9e10d55e2
commit
72b295d7f4
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue