Hi,
Today I tried to use region block with dynamic groups, while for region sphere it works, by only changing region sphere to region block, it failed with
ERROR: Expected floating point parameter in input script or data file (…/region_block.cpp:45)
, I did a rough look at the source code of region_sphere.cpp and region_block.cpp, it seems that using variables in terms of v_ is not enabled in region block yet. To me this is necessary for using region with dynamic group as ${v} will not be updated, resulting in a static region.
Am i right?
the input files are attached, it is based on examples/meam, with few modifications according to http://lammps.sandia.gov/doc/group.html.
Best
Ming
dg-test.tar.gz (5.46 KB)
Hi,
Today I tried to use region block with dynamic groups, while for region
sphere it works, by only changing region sphere to region block, it failed
with
ERROR: Expected floating point parameter in input script or data file
(../region_block.cpp:45)
, I did a rough look at the source code of region_sphere.cpp and
region_block.cpp, it seems that using variables in terms of v_ is not
enabled in region block yet. To me this is necessary for using region with
dynamic group as ${v} will not be updated, resulting in a static region.
Am i right?
yes and no. the problem is not with the dynamic group per se, since you
can still have the group definition re-evaluated dynamically during the run
according to the region. so that feature is working as advertised.
however, you correctly noticed that block style regions cannot be based on
a variable evaluated during the run. so strictly speaking, it is a dynamic
region issue, but it can be solved with some programming in the block style
region code.
axel.
I did a rough look at the source code of region_sphere.cpp and region_block.cpp, it seems that using variables in terms of >v_ is not enabled in region block yet. To me this is necessary for using region with dynamic group as ${v} will not be >updated, resulting in a static region.
Am i right?
yes. In fact, no command in LAMMPS will allow a variable name (v_name) to
be used as a numeric input, unless the doc page explicitly says that
parameter can be specified as a variable.
I mention this b/c some users (not you) think that it is OK to put
v_name anywhere they like in their input script and expect it to work.
That is not the case.
Steve
Hi, Axel, and Steve,
Thanks for this explanation 
best
Ming