# PhasicFlow: utilities/particlesPhasicFlow/positionParticles/positionParticles.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.

positionParticles.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 __positionParticles_hpp__
#define __positionParticles_hpp__
#include "virtualConstructor.hpp"
#include "Vectors.hpp"
#include "peakableRegion.hpp"
namespace pFlow
{
class dictionary;
class systemControl;
class positionParticles
{
private:
uniquePtr<peakableRegion> pRegion_ = nullptr;
word regionType_;
uint32 maxNumberOfParticles_ = 10000;
Logical mortonSorting_;
realx3Vector sortByMortonCode(const realx3Vector& position)const;
protected:
static const uint32 numReports_ = 40;
const auto& pRegion()const
{
return pRegion_();
}
public:
// - type Info
TypeInfo("positionParticles");
positionParticles(
systemControl& control,
const dictionary& dict);
create_vCtor
(
positionParticles,
dictionary,
(systemControl& control, const dictionary& dict),
(control, dict)
);
virtual ~positionParticles() = default;
bool mortonSorting()const
{
return mortonSorting_();
}
inline
auto maxNumberOfParticles()const
{
return maxNumberOfParticles_;
}
virtual uint32 numPoints()const = 0;
virtual uint32 size()const = 0;
virtual real maxDiameter() const = 0;
// - const access to position
virtual const realx3Vector& position()const = 0;
// - access to position
virtual realx3Vector& position() = 0;
virtual realx3Vector getFinalPosition();
static
uniquePtr<positionParticles>
create(systemControl& control, const dictionary & dict);
};
}
#endif // __positionParticles_hpp__
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::positionParticles::positionParticles
positionParticles(systemControl &control, const dictionary &dict)
Definition: positionParticles.cpp:75
pFlow::positionParticles::numReports_
static const uint32 numReports_
Definition: positionParticles.hpp:53
pFlow::positionParticles::maxNumberOfParticles
auto maxNumberOfParticles() const
Definition: positionParticles.hpp:87
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::systemControl
Definition: systemControl.hpp:41
pFlow::positionParticles::mortonSorting
bool mortonSorting() const
Definition: positionParticles.hpp:81
pFlow::positionParticles::~positionParticles
virtual ~positionParticles()=default
Vectors.hpp
pFlow::positionParticles::size
virtual uint32 size() const =0
pFlow
Definition: demGeometry.hpp:27
pFlow::positionParticles::create_vCtor
create_vCtor(positionParticles, dictionary,(systemControl &control, const dictionary &dict),(control, dict))
pFlow::positionParticles::pRegion
const auto & pRegion() const
Definition: positionParticles.hpp:55
pFlow::positionParticles::position
virtual const realx3Vector & position() const =0
pFlow::positionParticles::pRegion_
uniquePtr< peakableRegion > pRegion_
Definition: positionParticles.hpp:39
pFlow::positionParticles::sortByMortonCode
realx3Vector sortByMortonCode(const realx3Vector &position) const
Definition: positionParticles.cpp:26
pFlow::positionParticles::maxDiameter
virtual real maxDiameter() const =0
virtualConstructor.hpp
pFlow::positionParticles::maxNumberOfParticles_
uint32 maxNumberOfParticles_
Definition: positionParticles.hpp:43
pFlow::positionParticles::mortonSorting_
Logical mortonSorting_
Definition: positionParticles.hpp:45
peakableRegion.hpp
pFlow::positionParticles::regionType_
word regionType_
Definition: positionParticles.hpp:41
pFlow::positionParticles::create
static uniquePtr< positionParticles > create(systemControl &control, const dictionary &dict)
Definition: positionParticles.cpp:128
pFlow::positionParticles::TypeInfo
TypeInfo("positionParticles")
pFlow::Logical
Holds a bool value and converts strings to bool.
Definition: Logical.hpp:39
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
pFlow::positionParticles
Definition: positionParticles.hpp:35
pFlow::positionParticles::getFinalPosition
virtual realx3Vector getFinalPosition()
Definition: positionParticles.cpp:112
pFlow::positionParticles::numPoints
virtual uint32 numPoints() const =0
pFlow::Vector< realx3 >
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