LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Bug report: Region union doesn't work with rotated sub-regions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Bug report: Region union doesn't work with rotated sub-regions


From: Alexander Stukowski <stukowski@...503...>
Date: Thu, 18 Dec 2014 10:53:57 +0100

Dear LAMMPS developers,

I would like to report an issue that likely is a bug in the code:

The user manual suggests that it is possible to use the "region union" command with sub-regions that are rotated, i.e., which were defined with the "rotate" keyword. My observation is that this doesn't work. For example:

region cyl1 cylinder z 0 0 ${radius} INF INF units lattice rotate v_rotangle 0 0 0 1 1 0 region cyl2 cylinder z 0 0 ${radius} INF INF units lattice rotate v_rotangle 0 0 0 1 -1 0
region            combined union 2 cyl1 cyl2

While the rotation works for the individual regions 'cyl1' and 'cyl2' (when using them in a create_atoms command, for example), it doesn't work when I use the region 'combined'. The rotation of the sub-regions is ignored.

I looked into the source code and found that the Region::pretransform() method never gets called on the cylinder regions when they are part of a union. This method is responsible for evaluating the dynamic variable for the rotation angle. As a consequence, the rotation angle subsequently used by Region::rotate() is zero.

I tested this with the current SVN version of LAMMPS.

Best regards,
Alex Stukowski