# PhasicFlow: src/phasicFlow/structuredData/pointStructure/selectors/selectorRandomPoints/selectorRandomPoints.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.

selectorRandomPoints.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 __selectRandom_hpp__
#define __selectRandom_hpp__
#include "pStructSelector.hpp"
#include "pointStructure.hpp"
namespace pFlow
{
class dictionary;
class selectorRandomPoints
:
public pStructSelector
{
private:
uint32Vector selectedPoints_;
// begin index
uint32 begin_;
// end index
uint32 end_;
// stride
uint32 number_;
bool selectAllPointsInRange();
public:
// - type info
TypeInfo("selector<randomPoints>");
selectorRandomPoints(const pointStructure& pStruct, const dictionary& dict);
selectorRandomPoints(
const word& type,
const pointStructure& pStruct,
const dictionary& UNUSED(dict));
add_vCtor
(
pStructSelector,
selectorRandomPoints,
dictionary
);
add_vCtor
(
pStructSelector,
selectorRandomPoints,
word
);
~selectorRandomPoints() final = default;
const uint32Vector& selectedPoints()const final
{
return selectedPoints_;
}
uint32Vector& selectedPoints() final
{
return selectedPoints_;
}
};
} // pFlow
#endif //__pStructSelector_hpp__
pFlow::selectorRandomPoints::selectedPoints
uint32Vector & selectedPoints() final
Definition: selectorRandomPoints.hpp:88
UNUSED
#define UNUSED(x)
Definition: pFlowMacros.hpp:35
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::selectorRandomPoints::begin_
uint32 begin_
Definition: selectorRandomPoints.hpp:43
pFlow::selectorRandomPoints::selectedPoints_
uint32Vector selectedPoints_
Definition: selectorRandomPoints.hpp:40
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::selectorRandomPoints::selectedPoints
const uint32Vector & selectedPoints() const final
Definition: selectorRandomPoints.hpp:83
pFlow::selectorRandomPoints::selectorRandomPoints
selectorRandomPoints(const pointStructure &pStruct, const dictionary &dict)
Definition: selectorRandomPoints.cpp:78
pFlow::selectorRandomPoints::TypeInfo
TypeInfo("selector<randomPoints>")
pFlow
Definition: demGeometry.hpp:27
pFlow::selectorRandomPoints::number_
uint32 number_
Definition: selectorRandomPoints.hpp:49
pStructSelector.hpp
pFlow::selectorRandomPoints::end_
uint32 end_
Definition: selectorRandomPoints.hpp:46
pFlow::pointStructure
Definition: pointStructure.hpp:34
pFlow::selectorRandomPoints::add_vCtor
add_vCtor(pStructSelector, selectorRandomPoints, dictionary)
pFlow::selectorRandomPoints
Definition: selectorRandomPoints.hpp:34
pFlow::pStructSelector::pStruct
const pointStructure & pStruct() const
Definition: pStructSelector.cpp:45
pFlow::selectorRandomPoints::~selectorRandomPoints
~selectorRandomPoints() final=default
pFlow::pStructSelector
Definition: pStructSelector.hpp:36
pFlow::Vector< uint32 >
pointStructure.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::selectorRandomPoints::selectAllPointsInRange
bool selectAllPointsInRange()
Definition: selectorRandomPoints.cpp:27