|
faunus
|
Geometry class for spheres, cylinders, cuboids, hexagonal prism, truncated octahedron, slits. More...
#include <geometry.h>


Public Types | |
| typedef std::pair< std::string, Variant > | VariantName |
Public Member Functions | |
| double | getVolume (int dim=3) const override |
| Get volume. | |
| Point | setVolume (double, VolumeMethod=VolumeMethod::ISOTROPIC) override |
| Set volume. | |
| Point | getLength () const override |
| A minimal containing cubic box. | |
| void | setLength (const Point &) |
| Sets the box dimensions. | |
| void | boundary (Point &) const override |
| Apply boundary conditions. | |
| Point | vdist (const Point &, const Point &) const override |
| Minimum distance vector b->a. | |
| double | sqdist (const Point &, const Point &) const |
| (Minimum) squared distance between two points | |
| void | randompos (Point &, Random &) const override |
| Generate random position. | |
| bool | collision (const Point &) const override |
| Overlap with boundaries. | |
| void | from_json (const json &) override |
| void | to_json (json &j) const override |
| const BoundaryCondition & | boundaryConditions () const |
| Get info on boundary conditions. | |
| Chameleon (const Variant type=Variant::CUBOID) | |
| Chameleon (const GeometryImplementation &geo, Variant type) | |
| Chameleon (const Chameleon &geo) | |
| Copy everything, but clone the geometry. | |
| Chameleon & | operator= (const Chameleon &geo) |
| During the assignment copy everything, but clone the geometry. | |
| std::shared_ptr< GeometryImplementation > | asSimpleGeometry () const |
Public Member Functions inherited from Faunus::Geometry::GeometryBase | |
| BoundaryFunction | getBoundaryFunc () const |
| Lambda for applying boundary conditions on a point. | |
| DistanceFunction | getDistanceFunc () const |
| Lambda for calculating the (minimum) distance vector between two positions. | |
Static Public Member Functions | |
| static VariantName | variantName (const std::string &name) |
| static VariantName | variantName (const json &j) |
Public Attributes | |
| const Variant & | type = _type |
| Type of concrete geometry, read-only. | |
| const std::string & | name = _name |
| Name of concrete geometry, e.g., for json, read-only. | |
Static Public Attributes | |
| static const std::map< std::string, Variant > | names |
| Geometry names. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Faunus::Geometry::GeometryBase | |
| template<typename T = double> | |
| int | anint (T x) const |
| Round to int. | |
Geometry class for spheres, cylinders, cuboids, hexagonal prism, truncated octahedron, slits.
It is a wrapper of a concrete geometry implementation.
The class re-implements the time-critical functions vdist and boundary for the orthogonal periodic boundary conditions. Hence the call can be inlined by the compiler. That would not be possible otherwise due to the polymorphism of the concrete implementations. Other functions calls are delegated directly to the concrete implementation.
Note that the class implements a copy constructor and overloads the assignment operator.
|
static |
Geometry names.
1.8.13