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

Searches for neighbours by 'brute force', comparing every pair of vectors. More...

#include <BruteForceFinder.h>

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

Public Member Functions

template<bool FindAll>
Size find (const Vector &pos, const Size index, const Float radius, Array< NeighbourRecord > &neighs) const
 
- Public Member Functions inherited from FinderTemplate< BruteForceFinder >
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 &UNUSED(scheduler), ArrayView< const Vector > UNUSED(values)) override
 
- Protected Member Functions inherited from IBasicFinder
virtual void buildImpl (IScheduler &scheduler, ArrayView< const Vector > points)=0
 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

Searches for neighbours by 'brute force', comparing every pair of vectors.

This implementation is not intended for usage in high-performance code, as computing all particle pairs is too slow. Use other more efficient finders, such as KdTree of UniformGridFinder. BruteForceFinder should be used only for testing and debugging purposes.

Definition at line 18 of file BruteForceFinder.h.

Member Function Documentation

◆ buildImpl()

virtual void BruteForceFinder::buildImpl ( IScheduler UNUSEDscheduler,
ArrayView< const Vector >   UNUSEDvalues 
)
inlineoverrideprotectedvirtual

Definition at line 21 of file BruteForceFinder.h.

◆ find()

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

Definition at line 25 of file BruteForceFinder.h.


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