LBIBCell
 All Classes Functions Variables Friends Pages
LbmLib::geometry::Geometry Class Reference

class representing the external geometry More...

#include <Geometry.hpp>

Public Member Functions

 Geometry (const std::string &filename)
 Geometry constructs the geometry of the simulation. More...
 
 ~Geometry ()
 ~Geometry Plain.
 
void writeGeometry (const std::string &fileName) const
 writeGeometry Writes the geometry to the file More...
 
const std::map< unsigned int,
std::shared_ptr
< nodes::GeometryNode > > & 
getGeometryNodes () const
 Getter for the geometry nodes. More...
 
const std::vector
< std::shared_ptr
< nodes::GeometryNode > > 
getGeometryNodesWithinRadius (const double x, const double y, const double radius) const
 getGeometryNodesWithinRadius Range query More...
 
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 avoidDomainID More...
 
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 domainID different from avoidDomainID More...
 
const std::vector
< std::shared_ptr< Connection > > & 
getConnections () const
 getConnections Getter for connections More...
 
unsigned int addGeometryNode (const double x, const double y)
 addGeometryNode Add a GeometryNode. The NodeID is bumped automatically. More...
 
unsigned int removeGeometryNode (const unsigned int nodeid)
 removeGeometryNode Removes the GeometryNode with nodeid. One of the connections is removed, the other is connected accordingly. More...
 
void eraseConnection (std::shared_ptr< Connection > toDelete)
 eraseConnection Erase the connection. More...
 
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. More...
 
void moveGeometryNodes ()
 Geometry::moveGeometryNodes moves the *GeometryNode*s according to the local velocity field.
 
bool checkGeometryIntegrity () const
 checkGeometryIntegrity More...
 
void invalidateRangeQueryDataStructure ()
 invalidateRangeQueryDataStructure Sets the internal flag to false.
 
void reconstructRangeQueryDataStructure () const
 reconstructRangeQueryDataStructure
 
std::map< unsigned int,
unsigned int > 
getCellTypeTrackerMap (void) const
 Returns a reference to the cellTypeTrackerMap. More...
 

Detailed Description

class representing the external geometry

Definition at line 68 of file Geometry.hpp.

Constructor & Destructor Documentation

LbmLib::geometry::Geometry::Geometry ( const std::string &  filename)
explicit

Geometry constructs the geometry of the simulation.

Parameters
filenamethe filename where the geometry is specified

Definition at line 56 of file Geometry.cpp.

Member Function Documentation

void LbmLib::geometry::Geometry::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.

Parameters
p1The first GeometryNode.
p2The second GeometryNode.
boundaryConditionDescriptor
domainIdentifierThe domainIdentifier.
Todo:
remove the registering of the connection in the geometrynodes once the connection registers itself

Definition at line 448 of file Geometry.cpp.

unsigned int LbmLib::geometry::Geometry::addGeometryNode ( const double  x,
const double  y 
)

addGeometryNode Add a GeometryNode. The NodeID is bumped automatically.

Parameters
xThe x coordinate.
yThe y coordinate.
Returns
The ID under which the GeometryNode is registered.

Definition at line 396 of file Geometry.cpp.

bool LbmLib::geometry::Geometry::checkGeometryIntegrity ( ) const

checkGeometryIntegrity

Returns
true if integrity is given. fails otherwise.

Definition at line 508 of file Geometry.cpp.

void LbmLib::geometry::Geometry::eraseConnection ( std::shared_ptr< Connection toDelete)

eraseConnection Erase the connection.

Parameters
toDeleteThe pointer to the Connection which shall be deleted.
Todo:
this has to be tested!!!!!!

Definition at line 486 of file Geometry.cpp.

std::map< unsigned int, unsigned int > LbmLib::geometry::Geometry::getCellTypeTrackerMap ( void  ) const

Returns a reference to the cellTypeTrackerMap.

Returns
The reference to the cellTypeTrackerMap.

Definition at line 552 of file Geometry.cpp.

const std::vector< std::shared_ptr< Connection > > & LbmLib::geometry::Geometry::getConnections ( ) const

getConnections Getter for connections

Returns
The connections

Definition at line 391 of file Geometry.cpp.

const std::map<unsigned int, std::shared_ptr<nodes::GeometryNode> >& LbmLib::geometry::Geometry::getGeometryNodes ( ) const
inline

Getter for the geometry nodes.

Returns
a list of all geometry nodes

Definition at line 92 of file Geometry.hpp.

const std::vector< std::shared_ptr< nodes::GeometryNode > > LbmLib::geometry::Geometry::getGeometryNodesWithinRadius ( const double  x,
const double  y,
const double  radius 
) const

getGeometryNodesWithinRadius Range query

Parameters
xThe x coordinate.
yThe ycoordinate.
radiusThe radius to search within.
Returns
A map containing the *GeometryNode*s

Definition at line 324 of file Geometry.cpp.

const std::vector< std::shared_ptr< nodes::GeometryNode > > LbmLib::geometry::Geometry::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 avoidDomainID

Parameters
xThe x coordinate.
yThe ycoordinate.
avoidDomainIDThe domainID to be avoided when returning *GeometryNode*s.
radiusThe radius to search within.
Returns
A vector containing the *GeometryNode*s

Definition at line 341 of file Geometry.cpp.

std::shared_ptr< nodes::GeometryNode > LbmLib::geometry::Geometry::getGeometryNodesWithinRadiusWithAvoidanceClosest ( const double  x,
const double  y,
const double  radius,
const unsigned int  avoidDomainID 
) const

getGeometryNodesWithinRadiusWithAvoidanceClosest Return closest GeometryNode, but only nodes with domainID different from avoidDomainID

Parameters
xThe x coordinate.
yThe ycoordinate.
avoidDomainIDThe domainID to be avoided when returning *GeometryNode*s.
radiusThe radius to search within.
Returns
The closest different GeometryNode, or nullptr if none.

Definition at line 366 of file Geometry.cpp.

unsigned int LbmLib::geometry::Geometry::removeGeometryNode ( const unsigned int  nodeid)

removeGeometryNode Removes the GeometryNode with nodeid. One of the connections is removed, the other is connected accordingly.

Parameters
nodeidThe GeometryNode identifier.
Returns
1 if successful, 0 otherwise.

<

Todo:
some error here; domainid is automatically bumped

Definition at line 416 of file Geometry.cpp.

void LbmLib::geometry::Geometry::writeGeometry ( const std::string &  fileName) const

writeGeometry Writes the geometry to the file

Parameters
fileNamethe filename

Definition at line 77 of file Geometry.cpp.


The documentation for this class was generated from the following files: