22 #ifndef GEOMETRY_GEOMETRY_HPP
23 #define GEOMETRY_GEOMETRY_HPP
25 #include <LbmLib/include/nodes/GeometryNode.hpp>
26 #include <LbmLib/include/Constants.hpp>
27 #include <UtilLib/include/geometry/FastNeighborList.hpp>
32 #include <boost/geometry/geometry.hpp>
33 #include <boost/geometry/geometries/register/point.hpp>
34 #include <boost/geometry/index/rtree.hpp>
49 template <
typename Value>
50 struct indexable <std::shared_ptr<Value> >
52 typedef Value
const& result_type;
53 result_type operator() (std::shared_ptr<Value>
const& v)
const {
return *v; }
74 explicit Geometry(
const std::string& filename);
91 const std::map<
unsigned int,
93 return geometryNodes_;
105 const double radius)
const;
120 const unsigned int avoidDomainID)
const;
132 const unsigned int avoidDomainID)
const;
138 const std::vector<std::shared_ptr<Connection> >&
getConnections()
const;
169 std::shared_ptr<nodes::GeometryNode> p2,
170 const std::map<std::string, std::vector<std::string> > boundaryConditionDescriptor,
171 const unsigned int domainIdentifier);
205 void loadGeometryTXT(
const std::string& fileName);
211 void loadGeometryVTK(
const std::string& fileName);
216 std::vector<std::shared_ptr<Connection> > connections_;
222 std::map<
unsigned int,
223 std::shared_ptr<nodes::GeometryNode> > geometryNodes_;
233 mutable bool isValidRangeQueryDataStructure_;
239 std::map<unsigned int,unsigned int> cellTypeTrackerMap_;
244 #endif // GEOMETRY_GEOMETRY_HPP
const std::vector< std::shared_ptr< nodes::GeometryNode > > getGeometryNodesWithinRadiusWithAvoidance(const double x, const double y, const double radius, const unsigned int avoidDomainID) const
getGeometryNodesWithinRadiusWithAvoidance Range query, but only nodes with domainID different from av...
unsigned int removeGeometryNode(const unsigned int nodeid)
removeGeometryNode Removes the GeometryNode with nodeid. One of the connections is removed...
void setYPos(double y)
setYPos Set a new y position.
const std::map< unsigned int, std::shared_ptr< nodes::GeometryNode > > & getGeometryNodes() const
Getter for the geometry nodes.
void moveGeometryNodes()
Geometry::moveGeometryNodes moves the *GeometryNode*s according to the local velocity field...
class representing a geometry node
double getYPos() const
getYPos Getter for the Y position
void setXPos(double x)
setXPos Set a new x position.
The fastneighborlist class is a class template putting objects of type T into a celllist data structu...
unsigned int addGeometryNode(const double x, const double y)
addGeometryNode Add a GeometryNode. The NodeID is bumped automatically.
Geometry(const std::string &filename)
Geometry constructs the geometry of the simulation.
void reconstructRangeQueryDataStructure() const
reconstructRangeQueryDataStructure
const std::vector< std::shared_ptr< Connection > > & getConnections() const
getConnections Getter for connections
bool checkGeometryIntegrity() const
checkGeometryIntegrity
~Geometry()
~Geometry Plain.
void addConnection(std::shared_ptr< nodes::GeometryNode > p1, std::shared_ptr< nodes::GeometryNode > p2, const std::map< std::string, std::vector< std::string > > boundaryConditionDescriptor, const unsigned int domainIdentifier)
addConnection Add a Connection.
double getXPos() const
getXPos Getter for the X position
class representing the external geometry
void writeGeometry(const std::string &fileName) const
writeGeometry Writes the geometry to the file
void eraseConnection(std::shared_ptr< Connection > toDelete)
eraseConnection Erase the connection.
const std::vector< std::shared_ptr< nodes::GeometryNode > > getGeometryNodesWithinRadius(const double x, const double y, const double radius) const
getGeometryNodesWithinRadius Range query
std::shared_ptr< nodes::GeometryNode > getGeometryNodesWithinRadiusWithAvoidanceClosest(const double x, const double y, const double radius, const unsigned int avoidDomainID) const
getGeometryNodesWithinRadiusWithAvoidanceClosest Return closest GeometryNode, but only nodes with dom...
void invalidateRangeQueryDataStructure()
invalidateRangeQueryDataStructure Sets the internal flag to false.
std::map< unsigned int, unsigned int > getCellTypeTrackerMap(void) const
Returns a reference to the cellTypeTrackerMap.