phasicFlow/utilities/particlesPhasicFlow/positionRandom/positionRandom.hpp

103 lines
2.1 KiB
C++
Raw Normal View History

2022-09-05 06:44:41 +00:00
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
2022-09-05 06:44:41 +00:00
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
2022-09-05 06:44:41 +00:00
Licence:
This file is part of phasicFlow code. It is a free software for simulating
2022-09-05 06:44:41 +00:00
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
2022-09-05 06:44:41 +00:00
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__
2022-09-05 06:44:41 +00:00
2022-12-09 22:02:54 +00:00
#include "positionParticles.hpp"
#include "dictionary.hpp"
2022-09-05 06:44:41 +00:00
namespace pFlow
{
class collisionCheck;
2022-09-10 12:42:12 +00:00
class positionRandom : public positionParticles
2022-09-05 06:44:41 +00:00
{
private:
dictionary prDict_;
2022-09-05 06:44:41 +00:00
real diameter_;
2022-09-05 06:44:41 +00:00
uint32 numPoints_;
2022-09-05 06:44:41 +00:00
uint32 maxIterations_;
2022-09-05 06:44:41 +00:00
realx3Vector position_;
2022-09-05 06:44:41 +00:00
realVector diameters_;
2022-09-05 06:44:41 +00:00
uint32 reportInterval_;
2022-09-05 06:44:41 +00:00
bool positionOnePass(collisionCheck& collCheck);
2022-09-05 06:44:41 +00:00
bool positionPointsRandom();
2022-09-10 12:42:12 +00:00
2022-09-05 06:44:41 +00:00
public:
// - type Info
TypeInfo("random");
2022-09-05 06:44:41 +00:00
positionRandom(systemControl& control, const dictionary& dict);
2022-09-05 06:44:41 +00:00
// - add this class to vCtor selection table
add_vCtor
(
positionParticles,
positionRandom,
dictionary
);
2022-09-05 06:44:41 +00:00
~positionRandom() final = default;
2022-09-05 06:44:41 +00:00
//// - Methods
2022-09-05 06:44:41 +00:00
uint32 numPoints() const final
2022-09-05 06:44:41 +00:00
{
return position_.size();
}
uint32 size() const final
2022-09-05 06:44:41 +00:00
{
return position_.size();
}
real maxDiameter() const override
{
return diameter_;
}
// - const access to position
const realx3Vector& position() const final
2022-09-05 06:44:41 +00:00
{
return position_;
}
// - access to position
realx3Vector& position() final
2022-09-05 06:44:41 +00:00
{
return position_;
}
};
2022-09-05 06:44:41 +00:00
}
2022-12-09 22:02:54 +00:00
#endif // __positionOrdered_hpp__