SPH
|
Finder projecting a uniform grid on the particles. More...
#include <UniformGrid.h>
Public Member Functions | |
UniformGridFinder (const Float relativeCellCnt=1) | |
~UniformGridFinder () | |
template<bool FindAll> | |
Size | find (const Vector &pos, const Size index, const Float radius, Array< NeighbourRecord > &neighs) const |
template<typename TFunctor > | |
void | iterate (const TFunctor &functor) |
INLINE Size | getDimensionSize () const |
![]() | |
virtual Size | findAll (const Size index, const Float radius, Array< NeighbourRecord > &neighbours) const override |
Finds all neighbours within given radius from the point given by index. More... | |
virtual Size | findAll (const Vector &pos, const Float radius, Array< NeighbourRecord > &neighbours) const override |
Finds all points within given radius from given position. More... | |
virtual Size | findLowerRank (const Size index, const Float radius, Array< NeighbourRecord > &neighbours) const override |
Finds all points within radius that have a lower rank in smoothing length. More... | |
![]() | |
void | build (IScheduler &scheduler, ArrayView< const Vector > points, Flags< FinderFlag > flags=FinderFlag::MAKE_RANK) |
Constructs the struct with an array of vectors. More... | |
template<typename TCompare > | |
void | buildWithRank (IScheduler &scheduler, ArrayView< const Vector > points, TCompare &&comp) |
Constructs the struct with custom predicate for ordering particles. More... | |
![]() | |
void | build (IScheduler &scheduler, ArrayView< const Vector > points) |
Constructs the struct with an array of vectors. More... | |
![]() | |
virtual | ~Polymorphic () |
Protected Member Functions | |
virtual void | buildImpl (IScheduler &scheduler, ArrayView< const Vector > points) override |
Builds finder from set of vectors. More... | |
Protected Attributes | |
LookupMap | lut |
Float | relativeCellCnt |
Multiplier of the number of cells. More... | |
![]() | |
Order | rank |
Ranks of particles according to their smoothing lengths. More... | |
![]() | |
ArrayView< const Vector > | values |
View of the source datapoints, updated every time (re)build is called. More... | |
Finder projecting a uniform grid on the particles.
Definition at line 14 of file UniformGrid.h.
NAMESPACE_SPH_BEGIN UniformGridFinder::UniformGridFinder | ( | const Float | relativeCellCnt = 1 | ) |
relativeCellCnt | Multiplier of the number of constructed voxels. The actual number scales with the number points; relative voxel count 1 means that on average, one cell will contain one particle. Higher value means more cells, therefore less than one particle per cell, etc. |
Definition at line 6 of file UniformGrid.cpp.
|
default |
|
overrideprotectedvirtual |
Builds finder from set of vectors.
This must be called before findAll, can be called more than once.
scheduler | Scheduler that can be used for parallelization. |
points | View of the array of points in space. |
Implements IBasicFinder.
Definition at line 13 of file UniformGrid.cpp.
template Size UniformGridFinder::find< false > | ( | const Vector & | pos, |
const Size | index, | ||
const Float | radius, | ||
Array< NeighbourRecord > & | neighs | ||
) | const |
Definition at line 27 of file UniformGrid.cpp.
Definition at line 52 of file UniformGrid.h.
|
inline |
Exposed for gravity
Definition at line 39 of file UniformGrid.h.
|
protected |
Definition at line 16 of file UniformGrid.h.
|
protected |
Multiplier of the number of cells.
Definition at line 19 of file UniformGrid.h.