# PhasicFlow: src/phasicFlow/structuredData/pointStructure/selectors/selectRandom/selectRandom.hpp Source File

selectRandom.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 selectRandom
:
public pStructSelector
{
protected:
int32Vector selectedPoints_;
// begin index
int32 begin_;
// end index
int32 end_;
// stride
int32 number_;
bool selectAllPointsInRange();
public:
// - type info
TypeInfo("selectRandom");
selectRandom(const pointStructure& pStruct, const dictionary& dict);
add_vCtor
(
pStructSelector,
selectRandom,
dictionary
);
virtual ~selectRandom() = default;
virtual const int32Vector& selectedPoinsts()const override
{
return selectedPoints_;
}
virtual int32Vector& selectedPoinsts() override
{
return selectedPoints_;
}
};
} // pFlow
#endif //__pStructSelector_hpp__
pFlow::selectRandom::number_
int32 number_
Definition: selectRandom.hpp:49
pFlow::selectRandom::TypeInfo
TypeInfo("selectRandom")
pFlow::selectRandom::selectRandom
selectRandom(const pointStructure &pStruct, const dictionary &dict)
Definition: selectRandom.cpp:83
pFlow::selectRandom::selectAllPointsInRange
bool selectAllPointsInRange()
Definition: selectRandom.cpp:28
pFlow::selectRandom::add_vCtor
add_vCtor(pStructSelector, selectRandom, dictionary)
pFlow
Definition: demComponent.hpp:28
pStructSelector.hpp
pFlow::selectRandom::selectedPoints_
int32Vector selectedPoints_
Definition: selectRandom.hpp:40
pFlow::pointStructure
Definition: pointStructure.hpp:44
pFlow::selectRandom::begin_
int32 begin_
Definition: selectRandom.hpp:43
pFlow::int32
int int32
Definition: builtinTypes.hpp:53
pFlow::pStructSelector::pStruct
const pointStructure & pStruct() const
Definition: pStructSelector.cpp:35
pFlow::selectRandom
Definition: selectRandom.hpp:34
pFlow::selectRandom::~selectRandom
virtual ~selectRandom()=default
pFlow::selectRandom::selectedPoinsts
virtual const int32Vector & selectedPoinsts() const override
Definition: selectRandom.hpp:72
pFlow::pStructSelector
Definition: pStructSelector.hpp:36
pFlow::selectRandom::selectedPoinsts
virtual int32Vector & selectedPoinsts() override
Definition: selectRandom.hpp:77
pFlow::Vector< int32 >
pointStructure.hpp
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::selectRandom::end_
int32 end_
Definition: selectRandom.hpp:46