Wall.hpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 
21 
22 #ifndef __Wall_hpp__
23 #define __Wall_hpp__
24 
25 #include <vector>
26 
27 #include "virtualConstructor.hpp"
28 #include "dictionary.hpp"
29 
30 namespace pFlow
31 {
32 
33 
34 bool checkNormalVec(
35  const realx3 &p1,
36  const realx3 &p2,
37  const realx3 &p3,
38  realx3& norm );
39 
40 
41 class Wall
42 {
43 protected:
44 
45  std::vector<realx3x3> triangles_;
46 
48 
50 
52 
53  bool readCommon(const dictionary& ditc);
54 
55 public:
56 
57  // - type info
58  TypeInfo("Wall");
59 
61 
62  // - empty
63  Wall(){}
64 
65  // - from dictionary
66  Wall(const dictionary& dict);
67 
68 
69  virtual ~Wall()=default;
70 
72  (
73  Wall,
74  dictionary,
75  (const dictionary& dict),
76  (dict)
77  );
78 
80 
81  // -
82  const auto& triangles()const
83  {
84  return triangles_;
85  }
86 
87  word name()const
88  {
89  return name_;
90  }
91 
93  {
94  return materialName_;
95  }
96 
98  {
99  return motionName_;
100  }
101 
102  static
103  bool checkTrianlge(const realx3& p1, const realx3& p2, const realx3& p3);
104 
105  static
106  uniquePtr<Wall> create(const dictionary& dict);
107 
108 };
109 
110 }
111 
112 
113 #endif
pFlow::Wall::triangles_
std::vector< realx3x3 > triangles_
Definition: Wall.hpp:45
pFlow::Wall::materialName
word materialName() const
Definition: Wall.hpp:92
pFlow::Wall::materialName_
word materialName_
Definition: Wall.hpp:49
pFlow::Wall::readCommon
bool readCommon(const dictionary &ditc)
Definition: Wall.cpp:24
pFlow::Wall::name
word name() const
Definition: Wall.hpp:87
pFlow::Wall::triangles
const auto & triangles() const
Definition: Wall.hpp:82
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::checkNormalVec
bool checkNormalVec(const realx3 &p1, const realx3 &p2, const realx3 &p3, realx3 &norm)
Definition: Wall.cpp:88
pFlow::realx3
triple< real > realx3
Definition: types.hpp:48
pFlow
Definition: demComponent.hpp:28
pFlow::Wall::create
static uniquePtr< Wall > create(const dictionary &dict)
Definition: Wall.cpp:61
dictionary.hpp
pFlow::Wall::~Wall
virtual ~Wall()=default
virtualConstructor.hpp
pFlow::Wall::motionName_
word motionName_
Definition: Wall.hpp:51
pFlow::Wall::name_
word name_
Definition: Wall.hpp:47
pFlow::Wall::motionName
word motionName() const
Definition: Wall.hpp:97
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::Wall::checkTrianlge
static bool checkTrianlge(const realx3 &p1, const realx3 &p2, const realx3 &p3)
Definition: Wall.cpp:46
pFlow::Wall::TypeInfo
TypeInfo("Wall")
pFlow::triple< real >
pFlow::Wall::create_vCtor
create_vCtor(Wall, dictionary,(const dictionary &dict),(dict))
pFlow::Wall
Definition: Wall.hpp:41
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::Wall::Wall
Wall()
Definition: Wall.hpp:63