www.cemf.ir
subSurface.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 #include "types.hpp"
22 #include "List.hpp"
23 
24 namespace pFlow
25 {
26 
28 {
29 private:
31 
32  uint32 end_ = 0;
33 
35 
37 
39 
40 public:
41  subSurface()=default;
42 
44  :
45  start_(start),
46  end_(end),
49  name_(name)
50  {}
51 
52  subSurface(const subSurface&) = default;
53 
54  subSurface& operator = (const subSurface&) = default;
55 
56  ~subSurface()=default;
57 
59  {
60  return start_ + i;
61  }
62  uint32 start()const
63  {
64  return start_;
65  }
66 
67  uint32 end()const
68  {
69  return end_;
70  }
71 
73  {
74  return pointStart_;
75  }
76 
78  {
79  return pointEnd_;
80  }
81 
82  const auto& name()const
83  {
84  return name_;
85  }
86 
87  uint32 size()const
88  {
89  return end_-start_;
90  }
91 
93  {
94  return pointEnd_ - pointStart_;
95  }
96 
97  friend iOstream& operator<< (iOstream& str, const subSurface & sub);
98 
100  friend iIstream& operator >> (iIstream & str, subSurface & sub);
101 };
102 
103 iOstream& operator<< (iOstream& str, const subSurface & sub);
104 
105 iIstream& operator >> (iIstream & str, subSurface & sub);
106 
108 
109 
110 }
pFlow::List< subSurface >
pFlow::subSurface::end
uint32 end() const
Definition: subSurface.hpp:67
types.hpp
pFlow::subSurface::pointEnd
uint32 pointEnd() const
Definition: subSurface.hpp:77
List.hpp
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::subSurface::size
uint32 size() const
Definition: subSurface.hpp:87
pFlow::subSurface::subSurface
subSurface(const word &name, uint32 start, uint32 end, uint32 pointStart, uint32 pointEnd)
Definition: subSurface.hpp:43
pFlow
Definition: demGeometry.hpp:27
pFlow::subSurface::subSurface
subSurface()=default
pFlow::subSurface::name
const auto & name() const
Definition: subSurface.hpp:82
pFlow::subSurface::operator>>
friend iIstream & operator>>(iIstream &str, subSurface &sub)
operator
pFlow::iIstream
Interface class for any input stream
Definition: iIstream.hpp:37
pFlow::subSurface::pointEnd_
uint32 pointEnd_
Definition: subSurface.hpp:36
pFlow::subSurface::numPoints
uint32 numPoints() const
Definition: subSurface.hpp:92
pFlow::subSurface::start
uint32 start() const
Definition: subSurface.hpp:62
pFlow::subSurface::end_
uint32 end_
Definition: subSurface.hpp:32
pFlow::operator>>
INLINE_FUNCTION iIstream & operator>>(iIstream &str, AB3History &ab3)
Definition: AdamsBashforth3.hpp:41
pFlow::operator<<
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
Definition: AdamsBashforth3.hpp:57
pFlow::subSurface::name_
word name_
Definition: subSurface.hpp:38
pFlow::subSurface::start_
uint32 start_
Definition: subSurface.hpp:30
pFlow::subSurface::operator=
subSurface & operator=(const subSurface &)=default
pFlow::subSurface::pointStart
uint32 pointStart() const
Definition: subSurface.hpp:72
pFlow::subSurface::pointStart_
uint32 pointStart_
Definition: subSurface.hpp:34
pFlow::subSurface::~subSurface
~subSurface()=default
pFlow::subSurface
Definition: subSurface.hpp:27
pFlow::iOstream
Interface class for any output stream.
Definition: iOstream.hpp:59
pFlow::subSurface::operator<<
friend iOstream & operator<<(iOstream &str, const subSurface &sub)
pFlow::subSurface::operator()
uint32 operator()(uint32 i) const
Definition: subSurface.hpp:58