# PhasicFlow: src/phasicFlow/random/randomReal/randomReal.cpp Source File

randomReal.cpp
Go to the documentation of this file.
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#include "randomReal.hpp"
pFlow::uniquePtr<pFlow::randomReal> pFlow::randomReal::create
(
word distribution
)
{
word dist = angleBracketsNames("randomReal", distribution);
if( wordvCtorSelector_.search(dist) )
{
return wordvCtorSelector_[dist] (distribution);
}
else
{
printKeys
(
fatalError << "Ctor Selector "<< dist << " dose not exist. \n"
<<"Avaiable ones are: \n\n"
,
wordvCtorSelector_
);
fatalExit();
}
return nullptr;
}
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