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 \(\hat n\), a centre point \(\vec a\) on that axis, a radius \(\rho\), and a length \(\ell.\) A point \(\vec r\) 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.length (number) – cylinder length
args.precision (string) –
floating point precision (optional)
The supported values for
precision
aresingle
anddouble
. Ifprecision
is not specified, the precision is selected according to the compute device:single
for GPU computing anddouble
otherwise.
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.
- centre¶
Coordinates of cylinder centre.
- radius¶
Cylinder radius.
- length¶
Cylinder length.
- volume¶
The volume of the cylinder.