# PhasicFlow: utilities/particlesPhasicFlow/positionRandom/positionRandom.hpp Source File

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 __positionOrdered_hpp__
#define __positionOrdered_hpp__
#include "positionParticles.hpp"
#include "VectorSingles.hpp"
#include "VectorDuals.hpp"
namespace pFlow
{
class positionRandom
:
public positionParticles
{
protected:
dictionary prDict_;
real diameter_;
size_t numPoints_;
size_t maxIterations_;
realx3Vector position_;
size_t reportInterval_;
bool positionOnePass(int32 pass, int32 startNum);
bool positionPointsRandom();
bool inCollision(const realx3 &cntr, real diam);
void fillPoints(
uint numPoints,
realx3Vector_HD& points,
int32Vector_HD& flags );
public:
// - type Info
TypeInfo("positionRandom");
positionRandom(const dictionary& dict);
// - add this class to vCtor selection table
add_vCtor(
positionParticles,
positionRandom,
dictionary);
virtual ~positionRandom() = default;
virtual label numPoints()const
{
return position_.size();
}
virtual label size()const
{
return position_.size();
}
real maxDiameter() const override
{
return diameter_;
}
// - const access to position
virtual const realx3Vector& position()const
{
return position_;
}
// - access to position
virtual realx3Vector& position()
{
return position_;
}
};
}
#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