Cylinder¶
Defines a cylindrical domain and a predicate whether a given position is inside or outside of the domain.
The cylinder is parametrised by an axis vector
, an offset
point
on that axis, and a radius
. A point
is inside of the cylinder if

-
class
halmd.mdsim.geometries.cylinder(args)¶ Construct cylinder geometry instance.
Parameters: - args (table) – keyword arguments
- args.centre (table) – cylinder centre
- args.radius (number) – cylinder radius
- args.precision (string) –
floating point precision (optional)
The supported values for
precisionaresingleanddouble. Ifprecisionis not specified, the precision is selected according to the compute device:singlefor GPU computing anddoubleotherwise.
Note
This module does not perform a validation of the meaningfulness of the domain, i.e. it does not test whether the geometry is placed outside the simulation domain.
-
axis¶ Coordinates of cylinder axis vector, which may have any non-zero length.
-
offset¶ Coordinates of axis offset. The offset is an arbitrary point along the cylinder axis.
-
radius¶ Cylinder radius.