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

class responsible for generating the internal geometry representation More...

#include <GeometryHandler.hpp>

Public Member Functions

 GeometryHandler (const Geometry &geometry)
 GeometryHandler Constructs the simulation grid. More...
 
void moveLattice ()
 moveLattcie Updates the Lattice after the Geometric Points have been moved
 
unsigned int remeshBoundary ()
 If a Connection is too long, a GeometryNode is added and linked. More...
 
void coarsenBoundary ()
 If *Connection*s are too short, a GeometryNode is remove.
 
 ~GeometryHandler ()
 ~GeometryHandler Destroyes all nodes.
 
const std::vector< std::vector
< nodes::PhysicalNode * > > & 
getPhysicalNodes () const
 getPhysicalNodes Getter method for the physical node grid More...
 
const GeometrygetGeometry () const
 getter for the geometry More...
 
const std::unordered_set
< nodes::BoundaryNode * > & 
getBoundaryNodes () const
 Getter for the Boundary nodes. More...
 
const std::map< unsigned int,
double > 
computeAreas () const
 Compute the areas of the domains by using the domainIdentifiers. More...
 
std::map< unsigned int, double > computeAccumulatedDomainConcentrations (const std::string &name) const
 Compute the accumulated concentrations of species name in all domains. More...
 
void cureLattice ()
 Cure the Lattice: update *BoundaryNode*s, DomainIdentifier, and IB connections.
 
unsigned int createGeometryNode (const double xpos, const double ypos)
 Add a new GeometryNode. More...
 
void createConnection (std::shared_ptr< nodes::GeometryNode > const p1, std::shared_ptr< nodes::GeometryNode > const p2, const std::map< std::string, std::vector< std::string > > boundaryconditiondescriptor, const unsigned int domainidentifier)
 Create a new connection. More...
 
void eraseConnection (std::shared_ptr< Connection > toErase)
 Erases the Connection. More...
 
const std::shared_ptr
< nodes::GeometryNode
returnGeometryNode (const unsigned int nodeID) const
 returnGeometryNode More...
 
void checkLatticeIntegrity ()
 Check lattice integrity.
 
void checkBoundaryNodeIntegrity ()
 checkBoundaryNodeIntegrity Checks the integrity of the boundary node pairs.
 
void copyCellTypeToPhysicalNodes (std::map< unsigned int, unsigned int > &celltrackermap)
 update the celltypes of all *PhysicalNode*s with domainid More...
 
void copyCellTypeToPhysicalNodes (unsigned int domainidentifier, unsigned int celltype)
 update the celltypes of only *PhysicalNode*s with domainidentifier to celltype More...
 
std::map< unsigned int,
unsigned int > & 
getCellTypeTrackerMap (void)
 Returns a reference to the cellTypeTrackerMap. More...
 
bool checkGeometryIntegrity (void) const
 checkGeometryIntegrity More...
 

Detailed Description

class responsible for generating the internal geometry representation

Definition at line 46 of file GeometryHandler.hpp.

Constructor & Destructor Documentation

LbmLib::geometry::GeometryHandler::GeometryHandler ( const Geometry geometry)
explicit

GeometryHandler Constructs the simulation grid.

Parameters
geometryThe geometry

Definition at line 51 of file GeometryHandler.cpp.

Member Function Documentation

bool LbmLib::geometry::GeometryHandler::checkGeometryIntegrity ( void  ) const

checkGeometryIntegrity

Returns
true if integrity is given. fails otherwise.

Definition at line 321 of file GeometryHandler.cpp.

std::map< unsigned int, double > LbmLib::geometry::GeometryHandler::computeAccumulatedDomainConcentrations ( const std::string &  name) const

Compute the accumulated concentrations of species name in all domains.

Parameters
nameThe species to look at.
Returns
map with domainIdentifier as key and it's accumulated concentration of species name

Definition at line 136 of file GeometryHandler.cpp.

const std::map< unsigned int, double > LbmLib::geometry::GeometryHandler::computeAreas ( ) const

Compute the areas of the domains by using the domainIdentifiers.

Returns
map with domainIdentifier as key and it's area

Definition at line 101 of file GeometryHandler.cpp.

void LbmLib::geometry::GeometryHandler::copyCellTypeToPhysicalNodes ( std::map< unsigned int, unsigned int > &  celltrackermap)

update the celltypes of all *PhysicalNode*s with domainid

Parameters
celltrackermapThe map storing {domainID,cellType}

Definition at line 267 of file GeometryHandler.cpp.

void LbmLib::geometry::GeometryHandler::copyCellTypeToPhysicalNodes ( unsigned int  domainidentifier,
unsigned int  celltype 
)

update the celltypes of only *PhysicalNode*s with domainidentifier to celltype

Parameters
domainidentifierThe affected domain.
celltypeThe celltype to be set.

Definition at line 303 of file GeometryHandler.cpp.

void LbmLib::geometry::GeometryHandler::createConnection ( std::shared_ptr< nodes::GeometryNode > const  p1,
std::shared_ptr< nodes::GeometryNode > const  p2,
const std::map< std::string, std::vector< std::string > >  boundaryconditiondescriptor,
const unsigned int  domainidentifier 
)

Create a new connection.

Parameters
p1The first GeometryNode.
p2The second GeometryNode.
boundaryconditiondescriptorThe boundary condition descriptor.
domainidentifierThe domain identifier.

Definition at line 177 of file GeometryHandler.cpp.

unsigned int LbmLib::geometry::GeometryHandler::createGeometryNode ( const double  xpos,
const double  ypos 
)

Add a new GeometryNode.

Parameters
xposThe x position.
yposThe y position.
Returns
the GeometryNode ID

Definition at line 172 of file GeometryHandler.cpp.

void LbmLib::geometry::GeometryHandler::eraseConnection ( std::shared_ptr< Connection toErase)

Erases the Connection.

Parameters
toEraseThe Connection to be erased.

Definition at line 188 of file GeometryHandler.cpp.

const std::unordered_set<nodes::BoundaryNode*>& LbmLib::geometry::GeometryHandler::getBoundaryNodes ( ) const
inline

Getter for the Boundary nodes.

Returns
a list of all boundary nodes

Definition at line 97 of file GeometryHandler.hpp.

std::map< unsigned int, unsigned int > & LbmLib::geometry::GeometryHandler::getCellTypeTrackerMap ( void  )

Returns a reference to the cellTypeTrackerMap.

Returns
The reference to the cellTypeTrackerMap.

Definition at line 316 of file GeometryHandler.cpp.

const Geometry& LbmLib::geometry::GeometryHandler::getGeometry ( ) const
inline

getter for the geometry

Returns
a reference to the geometry

Definition at line 89 of file GeometryHandler.hpp.

const std::vector<std::vector<nodes::PhysicalNode*> >& LbmLib::geometry::GeometryHandler::getPhysicalNodes ( ) const
inline

getPhysicalNodes Getter method for the physical node grid

Returns
The physical node grid

Definition at line 80 of file GeometryHandler.hpp.

unsigned int LbmLib::geometry::GeometryHandler::remeshBoundary ( )

If a Connection is too long, a GeometryNode is added and linked.

Returns
The number of remeshed *Connection*s

Definition at line 385 of file GeometryHandler.cpp.

const std::shared_ptr< nodes::GeometryNode > LbmLib::geometry::GeometryHandler::returnGeometryNode ( const unsigned int  nodeID) const

returnGeometryNode

Parameters
nodeID
Returns
pointer to the GeometryNode

Definition at line 193 of file GeometryHandler.cpp.


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