www.cemf.ir
RandomReal.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 __RandomReal_hpp__
22 #define __RandomReal_hpp__
23 
24 //#include <random>
25 
26 #include "randomReal.hpp"
27 #include "uniformRandomReal.hpp"
28 
29 
30 namespace pFlow
31 {
32 
33 template<typename DistributionType>
35 :
36  public randomReal
37 {
38 protected:
39 
40  DistributionType distribution_;
41 
42 public:
43 
44  // type info
45  TypeInfoTemplate("randomReal", DistributionType);
46 
47 
48  RandomReal(word distribution);
49 
50  add_vCtor
51  (
52  randomReal,
53  RandomReal,
54  word
55  );
56 
57  virtual ~RandomReal()= default;
58 
59  virtual real randomNumber(real a, real b)override;
60 
61  virtual realx3 randomNumber(realx3 a, realx3 b)override;
62 
63 
64 };
65 
66 
67 }
68 
69 #include "RandomReal.cpp"
70 
71 
72 
73 #endif
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::RandomReal::~RandomReal
virtual ~RandomReal()=default
RandomReal.cpp
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::RandomReal
Definition: RandomReal.hpp:34
pFlow::RandomReal::TypeInfoTemplate
TypeInfoTemplate("randomReal", DistributionType)
pFlow
Definition: demGeometry.hpp:27
pFlow::RandomReal::RandomReal
RandomReal(word distribution)
Definition: RandomReal.cpp:26
randomReal.hpp
uniformRandomReal.hpp
pFlow::RandomReal::distribution_
DistributionType distribution_
Definition: RandomReal.hpp:40
pFlow::RandomReal::randomNumber
virtual real randomNumber(real a, real b) override
Definition: RandomReal.cpp:38
pFlow::randomReal
Definition: randomReal.hpp:31
pFlow::triple< real >
pFlow::RandomReal::add_vCtor
add_vCtor(randomReal, RandomReal, word)