www.cemf.ir
generalBoundary.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 #ifndef __generalBoundary_hpp__
21 #define __generalBoundary_hpp__
22 
23 // from STL
24 #include <any>
25 
26 // from phasicFlow
27 #include "types.hpp"
28 #include "observer.hpp"
29 #include "boundaryBase.hpp"
30 
31 namespace pFlow
32 {
33 
34 //- forward
35 class pointStructure;
36 class Time;
37 
39 :
40  public observer
41 {
42 private:
43 
45 
47 
48  const bool isBoundaryMaster_;
49 
50  static inline
52 
53 public:
54 
55  TypeInfo("generalBoundary");
56 
58  const boundaryBase& boundary,
59  const pointStructure& pStruct,
60  const word& dataType,
61  const word& option);
62 
63  ~generalBoundary()override = default;
64 
65  inline
67  {
69  }
70 
71  inline
73  {
75  }
76 
77  inline
78  auto size()const
79  {
80  return boundary_.size();
81  }
82 
83  inline
84  auto capacity()const
85  {
86  return boundary_.capacity();
87  }
88 
89  inline
90  auto neighborProcSize()const
91  {
92  return boundary_.neighborProcSize();
93  }
94 
95  inline
97  {
99  }
100 
101  inline
102  int thisProcessorNo()const
103  {
104  return boundary_.thisProcessorNo();
105  }
106 
107  inline
108  const auto& boundary()const
109  {
110  return boundary_;
111  }
112 
113  inline
114  const auto& indexList()const
115  {
116  return boundary_.indexList();
117  }
118 
119  inline
120  const auto& mirrorBoundary()const
121  {
122  return boundary_.mirrorBoundary();
123  }
124 
125  inline
126  const word& boundaryName()const
127  {
128  return boundary_.name();
129  }
130 
131  inline
132  const word& type()const
133  {
134  return boundary_.type();
135  }
136 
137  inline
138  const auto& pStruct()const
139  {
140  return pStruct_;
141  }
142 
143  inline
144  bool isBoundaryMaster()const
145  {
146  return isBoundaryMaster_;
147  }
148 
149  const Time& time()const;
150 
151 };
152 
153 } // pFlow
154 
155 
156 #endif
157 
pFlow::boundaryBase::neighborProcSize
virtual uint32 neighborProcSize() const
Return number of points in the neighbor processor boundary.
Definition: boundaryBase.hpp:382
pFlow::observer
Definition: observer.hpp:33
pFlow::generalBoundary::mirrorBoundaryindex
uint32 mirrorBoundaryindex() const
Definition: generalBoundary.hpp:72
pFlow::generalBoundary::indexList
const auto & indexList() const
Definition: generalBoundary.hpp:114
pFlow::generalBoundary::generalBoundary
generalBoundary(const boundaryBase &boundary, const pointStructure &pStruct, const word &dataType, const word &option)
Definition: generalBoundary.cpp:25
pFlow::generalBoundary::isBoundaryMaster
bool isBoundaryMaster() const
Definition: generalBoundary.hpp:144
pFlow::message
Definition: message.hpp:33
pFlow::generalBoundary::TypeInfo
TypeInfo("generalBoundary")
pFlow::boundaryBase::thisBoundaryIndex
uint32 thisBoundaryIndex() const
Definition: boundaryBase.hpp:300
types.hpp
pFlow::generalBoundary::thisProcessorNo
int thisProcessorNo() const
Definition: generalBoundary.hpp:102
observer.hpp
boundaryBase.hpp
pFlow::generalBoundary::neighborProcSize
auto neighborProcSize() const
Definition: generalBoundary.hpp:90
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::generalBoundary::defaultMessage_
static const message defaultMessage_
Definition: generalBoundary.hpp:51
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::boundaryBase::neighborProcessorNo
int neighborProcessorNo() const
Definition: boundaryBase.hpp:282
pFlow::boundaryBase::mirrorBoundary
boundaryBase & mirrorBoundary()
Definition: boundaryBase.cpp:259
pFlow::boundaryBase::name
const word & name() const
Definition: boundaryBase.hpp:258
pFlow::boundaryBase::thisProcessorNo
int thisProcessorNo() const
Definition: boundaryBase.hpp:288
pFlow::generalBoundary::isBoundaryMaster_
const bool isBoundaryMaster_
Definition: generalBoundary.hpp:48
pFlow::generalBoundary::pStruct
const auto & pStruct() const
Definition: generalBoundary.hpp:138
pFlow::generalBoundary::pStruct_
const pointStructure & pStruct_
Definition: generalBoundary.hpp:46
pFlow::generalBoundary::thisBoundaryIndex
uint32 thisBoundaryIndex() const
Definition: generalBoundary.hpp:66
pFlow
Definition: demGeometry.hpp:27
pFlow::boundaryBase::type
const word & type() const
Definition: boundaryBase.hpp:252
pFlow::message::BNDR_RESET
@ BNDR_RESET
Definition: message.hpp:48
pFlow::generalBoundary::type
const word & type() const
Definition: generalBoundary.hpp:132
pFlow::pointStructure
Definition: pointStructure.hpp:34
pFlow::boundaryBase::indexList
const auto & indexList() const
Definition: boundaryBase.hpp:328
pFlow::generalBoundary::time
const Time & time() const
Definition: generalBoundary.cpp:39
pFlow::generalBoundary::boundary_
const boundaryBase & boundary_
Definition: generalBoundary.hpp:44
pFlow::boundaryBase
Definition: boundaryBase.hpp:42
pFlow::boundaryBase::size
auto size() const
Definition: boundaryBase.hpp:270
pFlow::generalBoundary::boundary
const auto & boundary() const
Definition: generalBoundary.hpp:108
pFlow::generalBoundary::~generalBoundary
~generalBoundary() override=default
pFlow::boundaryBase::capacity
auto capacity() const
Definition: boundaryBase.hpp:276
pFlow::generalBoundary::size
auto size() const
Definition: generalBoundary.hpp:78
pFlow::generalBoundary::mirrorBoundary
const auto & mirrorBoundary() const
Definition: generalBoundary.hpp:120
pFlow::generalBoundary::capacity
auto capacity() const
Definition: generalBoundary.hpp:84
pFlow::boundaryBase::mirrorBoundaryIndex
uint32 mirrorBoundaryIndex() const
Definition: boundaryBase.hpp:306
pFlow::generalBoundary
Definition: generalBoundary.hpp:38
pFlow::generalBoundary::neighborProcessorNo
int neighborProcessorNo() const
Definition: generalBoundary.hpp:96
pFlow::generalBoundary::boundaryName
const word & boundaryName() const
Definition: generalBoundary.hpp:126
pFlow::Time
Definition: Time.hpp:37