www.cemf.ir
positionParticles.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 #ifndef __positionParticles_hpp__
22 #define __positionParticles_hpp__
23 
24 #include "virtualConstructor.hpp"
25 #include "Vectors.hpp"
26 #include "peakableRegion.hpp"
27 
28 namespace pFlow
29 {
30 
31 class dictionary;
32 class systemControl;
33 
34 
36 {
37 private:
38 
40 
42 
44 
46 
47 
48 
50 
51 protected:
52 
53  static const uint32 numReports_ = 40;
54 
55  const auto& pRegion()const
56  {
57  return pRegion_();
58  }
59 
60 public:
61 
62  // - type Info
63  TypeInfo("positionParticles");
64 
66  systemControl& control,
67  const dictionary& dict);
68 
70  (
72  dictionary,
73  (systemControl& control, const dictionary& dict),
74  (control, dict)
75  );
76 
77  virtual ~positionParticles() = default;
78 
80 
81  bool mortonSorting()const
82  {
83  return mortonSorting_();
84  }
85 
86  inline
88  {
89  return maxNumberOfParticles_;
90  }
91 
92  virtual uint32 numPoints()const = 0;
93 
94  virtual uint32 size()const = 0;
95 
96  virtual real maxDiameter() const = 0;
97 
98  // - const access to position
99  virtual const realx3Vector& position()const = 0;
100 
101 
102  // - access to position
103  virtual realx3Vector& position() = 0;
104 
105  virtual realx3Vector getFinalPosition();
106 
107  static
109  create(systemControl& control, const dictionary & dict);
110 
111 };
112 
113 
114 }
115 
116 
117 
118 #endif // __positionParticles_hpp__
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::positionParticles::positionParticles
positionParticles(systemControl &control, const dictionary &dict)
Definition: positionParticles.cpp:75
pFlow::positionParticles::numReports_
static const uint32 numReports_
Definition: positionParticles.hpp:53
pFlow::positionParticles::maxNumberOfParticles
auto maxNumberOfParticles() const
Definition: positionParticles.hpp:87
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::systemControl
Definition: systemControl.hpp:41
pFlow::positionParticles::mortonSorting
bool mortonSorting() const
Definition: positionParticles.hpp:81
pFlow::positionParticles::~positionParticles
virtual ~positionParticles()=default
Vectors.hpp
pFlow::positionParticles::size
virtual uint32 size() const =0
pFlow
Definition: demGeometry.hpp:27
pFlow::positionParticles::create_vCtor
create_vCtor(positionParticles, dictionary,(systemControl &control, const dictionary &dict),(control, dict))
pFlow::positionParticles::pRegion
const auto & pRegion() const
Definition: positionParticles.hpp:55
pFlow::positionParticles::position
virtual const realx3Vector & position() const =0
pFlow::positionParticles::pRegion_
uniquePtr< peakableRegion > pRegion_
Definition: positionParticles.hpp:39
pFlow::positionParticles::sortByMortonCode
realx3Vector sortByMortonCode(const realx3Vector &position) const
Definition: positionParticles.cpp:26
pFlow::positionParticles::maxDiameter
virtual real maxDiameter() const =0
virtualConstructor.hpp
pFlow::positionParticles::maxNumberOfParticles_
uint32 maxNumberOfParticles_
Definition: positionParticles.hpp:43
pFlow::positionParticles::mortonSorting_
Logical mortonSorting_
Definition: positionParticles.hpp:45
peakableRegion.hpp
pFlow::positionParticles::regionType_
word regionType_
Definition: positionParticles.hpp:41
pFlow::positionParticles::create
static uniquePtr< positionParticles > create(systemControl &control, const dictionary &dict)
Definition: positionParticles.cpp:128
pFlow::positionParticles::TypeInfo
TypeInfo("positionParticles")
pFlow::Logical
Holds a bool value and converts strings to bool.
Definition: Logical.hpp:39
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
pFlow::positionParticles
Definition: positionParticles.hpp:35
pFlow::positionParticles::getFinalPosition
virtual realx3Vector getFinalPosition()
Definition: positionParticles.cpp:112
pFlow::positionParticles::numPoints
virtual uint32 numPoints() const =0
pFlow::Vector< realx3 >
pFlow::dictionary
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
Definition: dictionary.hpp:67