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 
21 
22 #ifndef __positionOrdered_hpp__
23 #define __positionOrdered_hpp__
24 
25 #include "positionParticles.hpp"
26 #include "VectorSingles.hpp"
27 #include "VectorDuals.hpp"
28 
29 
30 namespace pFlow
31 {
32 
33 
34 
36 :
37  public positionParticles
38 {
39 protected:
40 
42 
44 
45  size_t numPoints_;
46 
48 
50 
52 
53  bool positionOnePass(int32 pass, int32 startNum);
54 
55  bool positionPointsRandom();
56 
57  bool inCollision(const realx3 &cntr, real diam);
58 
59  void fillPoints(
60  uint numPoints,
61  realx3Vector_HD& points,
62  int32Vector_HD& flags );
63 
64 public:
65 
66  // - type Info
67  TypeInfo("positionRandom");
68 
69  positionRandom(const dictionary& dict);
70 
71  // - add this class to vCtor selection table
72  add_vCtor(
75  dictionary);
76 
77  virtual ~positionRandom() = default;
78 
80 
81  virtual label numPoints()const
82  {
83  return position_.size();
84  }
85 
86  virtual label size()const
87  {
88  return position_.size();
89  }
90 
91  real maxDiameter() const override
92  {
93  return diameter_;
94  }
95 
96  // - const access to position
97  virtual const realx3Vector& position()const
98  {
99  return position_;
100  }
101 
102  // - access to position
104  {
105  return position_;
106  }
107 
108 
109 
110 
111 };
112 
113 
114 }
115 
116 
117 
118 #endif // __positionOrdered_hpp__
pFlow::positionRandom::numPoints
virtual label numPoints() const
Definition: positionRandom.hpp:81
pFlow::real
float real
Definition: builtinTypes.hpp:46
pFlow::positionRandom::~positionRandom
virtual ~positionRandom()=default
pFlow::positionRandom::positionRandom
positionRandom(const dictionary &dict)
Definition: positionRandom.cpp:160
pFlow::positionRandom::maxIterations_
size_t maxIterations_
Definition: positionRandom.hpp:47
pFlow::positionRandom::position_
realx3Vector position_
Definition: positionRandom.hpp:49
pFlow::positionRandom::size
virtual label size() const
Definition: positionRandom.hpp:86
pFlow::positionRandom::maxDiameter
real maxDiameter() const override
Definition: positionRandom.hpp:91
pFlow::positionRandom::fillPoints
void fillPoints(uint numPoints, realx3Vector_HD &points, int32Vector_HD &flags)
Definition: positionRandom.cpp:203
pFlow::Vector::size
auto size() const
Definition: Vector.hpp:299
pFlow
Definition: demComponent.hpp:28
VectorSingles.hpp
pFlow::positionRandom::positionOnePass
bool positionOnePass(int32 pass, int32 startNum)
Definition: positionRandom.cpp:59
pFlow::int32
int int32
Definition: builtinTypes.hpp:53
pFlow::VectorDual
Definition: VectorDual.hpp:43
pFlow::positionRandom::positionPointsRandom
bool positionPointsRandom()
Definition: positionRandom.cpp:120
pFlow::positionRandom::diameter_
real diameter_
Definition: positionRandom.hpp:43
pFlow::positionRandom::prDict_
dictionary prDict_
Definition: positionRandom.hpp:41
pFlow::positionRandom::position
virtual const realx3Vector & position() const
Definition: positionRandom.hpp:97
pFlow::positionRandom::reportInterval_
size_t reportInterval_
Definition: positionRandom.hpp:51
pFlow::positionRandom::TypeInfo
TypeInfo("positionRandom")
pFlow::positionParticles
Definition: positionParticles.hpp:102
pFlow::label
std::size_t label
Definition: builtinTypes.hpp:61
pFlow::positionRandom
Definition: positionRandom.hpp:35
pFlow::positionRandom::add_vCtor
add_vCtor(positionParticles, positionRandom, dictionary)
pFlow::triple< real >
pFlow::Vector< realx3 >
positionParticles.hpp
pFlow::positionRandom::position
virtual realx3Vector & position()
Definition: positionRandom.hpp:103
pFlow::positionRandom::inCollision
bool inCollision(const realx3 &cntr, real diam)
Definition: positionRandom.cpp:146
VectorDuals.hpp
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::positionRandom::numPoints_
size_t numPoints_
Definition: positionRandom.hpp:45