# PhasicFlow: src/phasicFlow/structuredData/boundaries/boundariesMask.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.

boundariesMask.hpp
Go to the documentation of this file.
#ifndef __boundariesMask_hpp__
#define __boundariesMask_hpp__
#include <array>
namespace pFlow
{
template<size_t N>
class boundariesMask
:
public std::array<bool,N>
{
public:
boundariesMask()=default;
boundariesMask(bool val)
{
this->fill(val);
}
boundariesMask(std::initializer_list<bool> l)
:
std::array<bool,N>(l)
{}
inline
bool allElements(bool val)
{
return std::all_of(this->begin(), this->end(), [val](bool v) { return v==val;} );
}
inline
bool anyElement(bool val)
{
return std::any_of(this->begin(), this->end(), [val](bool v) { return v==val;} );
}
inline
bool noElement(bool val)
{
return std::none_of(this->begin(), this->end(), [val](bool v) { return v==val;} );
}
};
}
#endif //__boundariesMask_hpp__
pFlow::boundariesMask::allElements
bool allElements(bool val)
Definition: boundariesMask.hpp:30
pFlow::fill
void fill(Vector< T, Allocator > &vec, const T &val)
Definition: VectorAlgorithm.hpp:44
pFlow::boundariesMask::anyElement
bool anyElement(bool val)
Definition: boundariesMask.hpp:36
pFlow
Definition: demGeometry.hpp:27
pFlow::boundariesMask::boundariesMask
boundariesMask()=default
pFlow::boundariesMask::noElement
bool noElement(bool val)
Definition: boundariesMask.hpp:42
pFlow::boundariesMask::boundariesMask
boundariesMask(std::initializer_list< bool > l)
Definition: boundariesMask.hpp:24
pFlow::boundariesMask
Definition: boundariesMask.hpp:11
pFlow::boundariesMask::boundariesMask
boundariesMask(bool val)
Definition: boundariesMask.hpp:19