# PhasicFlow: utilities/particlesPhasicFlow/positionRandom/positionRandom.hpp Source File
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

positionRandom.hpp
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.
-----------------------------------------------------------------------------*/
#ifndef __positionRandom_hpp__
#define __positionRandom_hpp__
#include "positionParticles.hpp"
#include "dictionary.hpp"
namespace pFlow
{
class collisionCheck;
class positionRandom : public positionParticles
{
private:
dictionary prDict_;
real diameter_;
uint32 numPoints_;
uint32 maxIterations_;
realx3Vector position_;
realVector diameters_;
uint32 reportInterval_;
bool positionOnePass(collisionCheck& collCheck);
bool positionPointsRandom();
public:
// - type Info
TypeInfo("random");
positionRandom(systemControl& control, const dictionary& dict);
// - add this class to vCtor selection table
add_vCtor
(
positionParticles,
positionRandom,
dictionary
);
~positionRandom() final = default;
uint32 numPoints() const final
{
return position_.size();
}
uint32 size() const final
{
return position_.size();
}
real maxDiameter() const override
{
return diameter_;
}
// - const access to position
const realx3Vector& position() const final
{
return position_;
}
// - access to position
realx3Vector& position() final
{
return position_;
}
};
}
#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