www.cemf.ir
positionRandom.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 __positionRandom_hpp__
21 #define __positionRandom_hpp__
22 
23 #include "positionParticles.hpp"
24 #include "dictionary.hpp"
25 
26 namespace pFlow
27 {
28 
29 class collisionCheck;
30 
32 {
33 private:
34 
36 
38 
40 
42 
44 
46 
48 
49  bool positionOnePass(collisionCheck& collCheck);
50 
51  bool positionPointsRandom();
52 
53 public:
54 
55  // - type Info
56  TypeInfo("random");
57 
58  positionRandom(systemControl& control, const dictionary& dict);
59 
60  // - add this class to vCtor selection table
61  add_vCtor
62  (
66  );
67 
68  ~positionRandom() final = default;
69 
71 
72  uint32 numPoints() const final
73  {
74  return position_.size();
75  }
76 
77  uint32 size() const final
78  {
79  return position_.size();
80  }
81 
82  real maxDiameter() const override
83  {
84  return diameter_;
85  }
86 
87  // - const access to position
88  const realx3Vector& position() const final
89  {
90  return position_;
91  }
92 
93  // - access to position
95  {
96  return position_;
97  }
98 };
99 
100 }
101 
102 #endif // __positionOrdered_hpp__
pFlow::positionRandom::reportInterval_
uint32 reportInterval_
Definition: positionRandom.hpp:47
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::collisionCheck
Definition: collisionCheck.hpp:13
pFlow::positionRandom::~positionRandom
~positionRandom() final=default
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::positionRandom::position_
realx3Vector position_
Definition: positionRandom.hpp:43
pFlow::positionRandom::positionOnePass
bool positionOnePass(collisionCheck &collCheck)
Definition: positionRandom.cpp:27
pFlow::positionRandom::maxDiameter
real maxDiameter() const override
Definition: positionRandom.hpp:82
pFlow::systemControl
Definition: systemControl.hpp:41
pFlow::Vector::size
auto size() const
Size of the vector.
Definition: Vector.hpp:265
pFlow::positionRandom::positionRandom
positionRandom(systemControl &control, const dictionary &dict)
Definition: positionRandom.cpp:100
pFlow::positionRandom::position
const realx3Vector & position() const final
Definition: positionRandom.hpp:88
pFlow::positionRandom::numPoints_
uint32 numPoints_
Definition: positionRandom.hpp:39
pFlow
Definition: demGeometry.hpp:27
pFlow::positionRandom::size
uint32 size() const final
Definition: positionRandom.hpp:77
pFlow::positionRandom::position
realx3Vector & position() final
Definition: positionRandom.hpp:94
pFlow::positionRandom::positionPointsRandom
bool positionPointsRandom()
Definition: positionRandom.cpp:57
dictionary.hpp
pFlow::positionRandom::diameter_
real diameter_
Definition: positionRandom.hpp:37
pFlow::positionRandom::TypeInfo
TypeInfo("random")
pFlow::positionRandom::prDict_
dictionary prDict_
Definition: positionRandom.hpp:35
pFlow::positionRandom::diameters_
realVector diameters_
Definition: positionRandom.hpp:45
pFlow::positionParticles
Definition: positionParticles.hpp:35
pFlow::positionRandom
Definition: positionRandom.hpp:31
pFlow::positionRandom::add_vCtor
add_vCtor(positionParticles, positionRandom, dictionary)
pFlow::positionRandom::maxIterations_
uint32 maxIterations_
Definition: positionRandom.hpp:41
pFlow::Vector< realx3 >
positionParticles.hpp
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
pFlow::positionRandom::numPoints
uint32 numPoints() const final
Definition: positionRandom.hpp:72