SPH
Classes | Public Member Functions | Protected Member Functions | List of all members
HashMapFinder Class Reference

#include <HashMapFinder.h>

Inheritance diagram for HashMapFinder:
FinderTemplate< HashMapFinder > ISymmetricFinder IBasicFinder Polymorphic

Classes

struct  Cell
 

Public Member Functions

 HashMapFinder (const RunSettings &settings, const Float cellMult=1._f)
 
 ~HashMapFinder ()
 
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 &func) const
 
Outcome good () const
 
MinMaxMean getBucketStats () const
 
- Public Member Functions inherited from FinderTemplate< HashMapFinder >
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...
 
- Public Member Functions inherited from ISymmetricFinder
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...
 
- Public Member Functions inherited from IBasicFinder
void build (IScheduler &scheduler, ArrayView< const Vector > points)
 Constructs the struct with an array of vectors. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Protected Member Functions

virtual void buildImpl (IScheduler &scheduler, ArrayView< const Vector > points) override
 Builds finder from set of vectors. More...
 

Additional Inherited Members

- Protected Attributes inherited from ISymmetricFinder
Order rank
 Ranks of particles according to their smoothing lengths. More...
 
- Protected Attributes inherited from IBasicFinder
ArrayView< const Vectorvalues
 View of the source datapoints, updated every time (re)build is called. More...
 

Detailed Description

Definition at line 16 of file HashMapFinder.h.

Constructor & Destructor Documentation

◆ HashMapFinder()

HashMapFinder::HashMapFinder ( const RunSettings settings,
const Float  cellMult = 1._f 
)

Definition at line 12 of file HashMapFinder.cpp.

◆ ~HashMapFinder()

HashMapFinder::~HashMapFinder ( )
default

Member Function Documentation

◆ buildImpl()

void HashMapFinder::buildImpl ( IScheduler scheduler,
ArrayView< const Vector points 
)
overrideprotectedvirtual

Builds finder from set of vectors.

This must be called before findAll, can be called more than once.

Parameters
schedulerScheduler that can be used for parallelization.
pointsView of the array of points in space.

Implements IBasicFinder.

Definition at line 19 of file HashMapFinder.cpp.

◆ find()

template<bool FindAll>
template Size HashMapFinder::find< false > ( const Vector pos,
const Size  index,
const Float  radius,
Array< NeighbourRecord > &  neighs 
) const

Definition at line 36 of file HashMapFinder.cpp.

◆ getBucketStats()

MinMaxMean HashMapFinder::getBucketStats ( ) const
inline

Definition at line 61 of file HashMapFinder.h.

◆ good()

Outcome HashMapFinder::good ( ) const
inline

Definition at line 51 of file HashMapFinder.h.

◆ iterate()

template<typename TFunctor >
void HashMapFinder::iterate ( const TFunctor &  func) const
inline

Definition at line 41 of file HashMapFinder.h.


The documentation for this class was generated from the following files: