randomReal.cpp
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 #include "randomReal.hpp"
23 
24 
26 (
27  word distribution
28 )
29 {
30  word dist = angleBracketsNames("randomReal", distribution);
31 
32  if( wordvCtorSelector_.search(dist) )
33  {
34  return wordvCtorSelector_[dist] (distribution);
35  }
36  else
37  {
38  printKeys
39  (
40  fatalError << "Ctor Selector "<< dist << " dose not exist. \n"
41  <<"Avaiable ones are: \n\n"
42  ,
43  wordvCtorSelector_
44  );
45  fatalExit();
46  }
47 
48  return nullptr;
49 }
50 
51 
fatalExit
#define fatalExit
Definition: error.hpp:57
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::printKeys
iOstream & printKeys(iOstream &os, const wordHashMap< T > &m)
pFlow::randomReal::create
static uniquePtr< randomReal > create(word distribution)
Definition: randomReal.cpp:26
pFlow::angleBracketsNames
word angleBracketsNames(const word &w1, const word &w2)
Definition: bTypesFunctions.cpp:131
randomReal.hpp
fatalError
#define fatalError
Definition: error.hpp:36
pFlow::uniquePtr
Definition: uniquePtr.hpp:44