LBIBCell
 All Classes Functions Variables Friends Pages
BoundaryNode.hpp
1 /* Copyright (c) 2013 David Sichau <mail"at"sichau"dot"eu>
2  * 2013-2015 Simon Tanaka <tanakas"at"gmx"dot"ch>
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22 #ifndef INTERSECTIONPOINT_HPP
23 #define INTERSECTIONPOINT_HPP
24 
25 
26 #include <LbmLib/include/nodes/LagrangianPoint.hpp>
27 #include <LbmLib/include/Direction.hpp>
28 #include <vector>
29 #include <string>
30 #include <map>
31 
32 namespace LbmLib {
33 namespace geometry {
34 class Connection;
35 }
36 namespace solver {
37 class BoundaryAbstractSolver;
38 }
39 
40 namespace nodes {
41 class PhysicalNode;
42 
46 class BoundaryNode : public LagrangianPoint {
47  public:
55  explicit BoundaryNode(
56  double x,
57  double y,
58  const std::map<std::string,
59  std::vector<std::string> >& connectionType,
60  unsigned int domainId);
64  ~BoundaryNode();
65 
72  PhysicalNode* const physicalNode,
73  const Direction& dir);
74 
80 
85  virtual std::string getType() const;
86 
91  void dumpNode(std::ostream* oStream) const;
92 
98  solver::BoundaryAbstractSolver& getBoundarySolver(const std::string& name);
99 
104  std::map<std::string, solver::BoundaryAbstractSolver*>& getBoundarySolvers();
105 
110  Direction getDirectionToNeighbour() const;
111 
116  unsigned int getDomainIdentifier() const;
117 
118  private:
122  Direction directionToPhysicalNeighbour_;
126  const unsigned int domainId_;
127 
131  PhysicalNode* physicalNeighbour_;
135  std::map<std::string, solver::BoundaryAbstractSolver*> boundarySolvers_;
140  void addBoundarySolver(const std::string& name);
141 };
142 } // end namespace
143 } // end namespace
144 #endif // INTERSECTIONPOINT_HPP
BoundaryNode(double x, double y, const std::map< std::string, std::vector< std::string > > &connectionType, unsigned int domainId)
BoundaryNode Constructor for a boundary node.
The BoundaryAbstractSolver class The abstract base class for all Boundary Solvers.
std::map< std::string, solver::BoundaryAbstractSolver * > & getBoundarySolvers()
getBoundarySolvers Getter method for all Boundary Solvers
class representing a physical node
PhysicalNode * getPhysicalNeighbour() const
getFluidNeighbour Getter for the Physical neighbour
unsigned int getDomainIdentifier() const
getDomainIdentifier Getter for the domain Identifier
~BoundaryNode()
~BoundaryNode Destructor
Direction getDirectionToNeighbour() const
getDirectionToNeighbour returns the direction to the next neighbour
virtual std::string getType() const
getType The type of a node class
class representing a boundary node
void dumpNode(std::ostream *oStream) const
dumpNode dumps the node for dot
solver::BoundaryAbstractSolver & getBoundarySolver(const std::string &name)
getBoundarySolver Getter method for the boundary Solver
The LagrangianPoint class A class for storing a point's coordinates and its velocity This class is th...
void setPhysicalNeighbours(PhysicalNode *const physicalNode, const Direction &dir)
setPhysicalNeighbours Sets the corresponding Physical neighbours of this node