16 #ifndef __GEOMETRY_H__
17 #define __GEOMETRY_H__
19 #include <unordered_map>
50 virtual bool operator()(
double x,
double y,
double z)
const=0;
67 virtual void getBoundingBox(
double& xmin,
double& xmax,
double& ymin,
double& ymax,
double& zmin,
double& zmax)=0;
115 virtual bool operator()(
double x,
double y,
double z)
const;
128 virtual void getBoundingBox(
double& xmin,
double& xmax,
double& ymin,
double& ymax,
double& zmin,
double& zmax);
180 virtual bool operator()(
double x,
double y,
double z)
const;
193 virtual void getBoundingBox(
double& xmin,
double& xmax,
double& ymin,
double& ymax,
double& zmin,
double& zmax);
288 Geometry* createGeometry(std::string name);
290 std::unordered_map<std::string,GeoCreateFunc> geoTable;
297 #endif // __GEOMETRY_H__
Disk()
Constructor.
Definition: geometry.cpp:37
Ball()
Constructor.
Definition: geometry.cpp:9
Supply functions for generating a 3D ball geometry.
Definition: geometry.h:93
void registerGeometry(std::string name, GeoCreateFunc func)
Registers (links) the geometry name name with the function func for creating objects in the Geometry ...
Definition: geometry.cpp:71
Geometry *(* GeoCreateFunc)()
Defines a function pointer pointing to a function which creates objects in the Geometry family...
Definition: geometry.h:231
virtual ~Ball()
Destructor.
Definition: geometry.h:99
virtual void getBoundingBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax)
Calculates the bounding box of 2D disk.
Definition: geometry.cpp:43
virtual bool operator()(double x, double y, double z) const =0
Level set function of particle geometry.
Supply functions for generating a 2D disk geometry.
Definition: geometry.h:158
An abstract class for the initialization of the geometry of fluid objects.
Definition: geometry.h:38
virtual ~Disk()
Desturctor.
Definition: geometry.h:164
The abstract factory class for creating objects in the Geometry family.
Definition: geometry.h:226
virtual ~Geometry()
Destructor.
Definition: geometry.h:41
virtual void getBoundingBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax)
Calculates the bounding box of 3D ball.
Definition: geometry.cpp:15
virtual bool operator()(double x, double y, double z) const
Level set function of a 3D ball.
Definition: geometry.cpp:11
virtual bool operator()(double x, double y, double z) const
Level set function of a 2D disk.
Definition: geometry.cpp:39
virtual void getBoundingBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax)=0
Calculates the bounding box of a geometric shape.
static GeometryFactory & instance()
Returns reference to a Singleton object of class GeometryFactory.
Definition: geometry.cpp:66