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

All PhysicalNodes on the left of the connection are defined as inside. More...

#include <Connection.hpp>

Public Member Functions

 Connection (std::shared_ptr< nodes::GeometryNode > const p1, std::shared_ptr< nodes::GeometryNode > const p2, const std::map< std::string, std::vector< std::string > > connectionType, unsigned int domainId)
 Connection A simple connection connecting two geometry nodes. More...
 
 ~Connection ()
 ~Connection non-virutal Destructor More...
 
void writeConnection (std::ofstream *const stream)
 writes the connection ot the stream More...
 
void generateBoundaryNodes (const std::vector< std::vector< nodes::PhysicalNode * > > &physicalNode, std::unordered_set< nodes::BoundaryNode * > &boundaryNodes)
 generateBoundaryNodes Calculates all possible boundary points defined by this connection, generates and connects them accordingly More...
 
std::pair< std::shared_ptr
< nodes::GeometryNode > const,
std::shared_ptr
< nodes::GeometryNode > const > 
getGeometryNodes () const
 getGeometryNodes Getter method for the geometry nodes defining this connection More...
 
void perturbConnection ()
 perturbConnection makes sure that the connection has a slope not near to 0 or infinitive
 
double getLength () const
 Compute the length of the connection. More...
 
unsigned int getDomainIdentifier () const
 Getter for the domainID on the left side of this connection. More...
 
const std::map< std::string,
std::vector< std::string > > 
getBoundaryConditionDescriptor () const
 Getter for the boundary condition descriptor. More...
 
void setDomainIdentifier (const unsigned int domainIdentifier)
 Setter for the domainIdentifier_. More...
 

Detailed Description

All PhysicalNodes on the left of the connection are defined as inside.

Definition at line 47 of file Connection.hpp.

Constructor & Destructor Documentation

LbmLib::geometry::Connection::Connection ( std::shared_ptr< nodes::GeometryNode > const  p1,
std::shared_ptr< nodes::GeometryNode > const  p2,
const std::map< std::string, std::vector< std::string > >  connectionType,
unsigned int  domainId 
)
explicit

Connection A simple connection connecting two geometry nodes.

Parameters
p1GeometryNode 1; the first node defining this connection.
p2GeometryNode 2; the second node defining this connection.
connectionTypeThe connection type of the boundary solvers (first string: name of the BoundarySolver; second string: name of the affected CDESolver).
domainIdThe ID of the domain this connection sourrounds.
Todo:
: self-registration of connection

Definition at line 51 of file Connection.cpp.

LbmLib::geometry::Connection::~Connection ( )

~Connection non-virutal Destructor

Todo:
remove these lines. i don't know when the destructor is called -> random behaviour.

Definition at line 63 of file Connection.cpp.

Member Function Documentation

void LbmLib::geometry::Connection::generateBoundaryNodes ( const std::vector< std::vector< nodes::PhysicalNode * > > &  physicalNode,
std::unordered_set< nodes::BoundaryNode * > &  boundaryNodes 
)

generateBoundaryNodes Calculates all possible boundary points defined by this connection, generates and connects them accordingly

Parameters
physicalNodeAll physical nodes
boundaryNodesAll boundary nodes found so far

Definition at line 224 of file Connection.cpp.

const std::map< std::string, std::vector< std::string > > LbmLib::geometry::Connection::getBoundaryConditionDescriptor ( ) const

Getter for the boundary condition descriptor.

Returns
The boundary condition descriptor.

Definition at line 400 of file Connection.cpp.

unsigned int LbmLib::geometry::Connection::getDomainIdentifier ( ) const

Getter for the domainID on the left side of this connection.

Returns
The domainID on the left side of this connection.

Definition at line 396 of file Connection.cpp.

std::pair< const std::shared_ptr< nodes::GeometryNode >, const std::shared_ptr< nodes::GeometryNode > > LbmLib::geometry::Connection::getGeometryNodes ( ) const

getGeometryNodes Getter method for the geometry nodes defining this connection

Returns
The geometry nodes defining this connection

Definition at line 328 of file Connection.cpp.

double LbmLib::geometry::Connection::getLength ( ) const

Compute the length of the connection.

Returns
The length.

Definition at line 389 of file Connection.cpp.

void LbmLib::geometry::Connection::setDomainIdentifier ( const unsigned int  domainIdentifier)

Setter for the domainIdentifier_.

Parameters
domainIdentifier
Attention
This method is casting away constness of domainIdentifier_!

Definition at line 404 of file Connection.cpp.

void LbmLib::geometry::Connection::writeConnection ( std::ofstream *const  stream)

writes the connection ot the stream

Parameters
streamthe output stream

Definition at line 170 of file Connection.cpp.


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