# PhasicFlow: ContactSearch< searchMethod > Class Template Reference
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.

ContactSearch< searchMethod > Class Template Reference
Inheritance diagram for ContactSearch< searchMethod >:
[legend]
Collaboration diagram for ContactSearch< searchMethod >:
[legend]

## Public Types

using | IdType = uint32
using | ExecutionSpace = DefaultExecutionSpace
using | SearchMethodType = searchMethod

## Public Member Functions

| TypeInfoTemplate11 ("ContactSearch", SearchMethodType)
| ContactSearch (const dictionary &csDict, const box &extDomain, const particles &prtcl, const geometry &geom, Timers &timers)
| add_vCtor (contactSearch, ContactSearch, dictionary)
bool | enterBroadSearchBoundary (const timeInfo &ti, bool force=false) const override
real | sizeRatio () const override
real | cellExtent () const override
Public Member Functions inherited from contactSearch
| TypeInfo ("contactSearch")
| contactSearch (const dictionary &dict, const box &extDomain, const particles &prtcl, const geometry &geom, Timers &timers)
virtual | ~contactSearch ()=default
| create_vCtor (contactSearch, dictionary,(const dictionary &dict, const box &domain, const particles &prtcl, const geometry &geom, Timers &timers),(dict, domain, prtcl, geom, timers))
bool | performedSearch () const
bool | performedSearchBoundary () const
bool | performSearch (uint32 iter, bool force=false) const
bool | enterBroadSearch (const timeInfo &ti, bool force=false) const
uint32 | updateInterval () const
const dictionary & | dict () const
const box & | extendedDomainBox () const
const particles & | Particles () const
const pointStructure & | pStruct () const
const geometry & | Geometry () const
Timer & | ppTimer ()
Timer & | bTimer ()
bool | broadSearch (const timeInfo &ti, csPairContainerType &ppPairs, csPairContainerType &pwPairs, bool force=false)
bool | boundaryBroadSearch (uint32 bndryIndex, const timeInfo &ti, csPairContainerType &ppPairs, csPairContainerType &pwPairs, bool force=false)

## Private Member Functions

bool | BroadSearch (const timeInfo &ti, csPairContainerType &ppPairs, csPairContainerType &pwPairs, bool force=false) override
bool | BoundaryBroadSearch (uint32 bndryIndex, const timeInfo &ti, csPairContainerType &ppPairs, csPairContainerType &pwPairs, bool force=false) override

## Private Attributes

uniquePtr< SearchMethodType > | ppwContactSearch_ = nullptr
boundaryContactSearchList | csBoundaries_

## Additional Inherited Members

Static Public Member Functions inherited from contactSearch
static uniquePtr< contactSearch > | create (const dictionary &dict, const box &extDomain, const particles &prtcl, const geometry &geom, Timers &timers)

## Detailed Description

### template<class searchMethod>
class pFlow::ContactSearch< searchMethod >

Definition at line 38 of file ContactSearch.hpp.

## Member Typedef Documentation

## IdType

using IdType = uint32

Definition at line 44 of file ContactSearch.hpp.

## ExecutionSpace

using ExecutionSpace = DefaultExecutionSpace

Definition at line 46 of file ContactSearch.hpp.

## SearchMethodType

using SearchMethodType = searchMethod

Definition at line 48 of file ContactSearch.hpp.

## Constructor & Destructor Documentation

## ContactSearch()

ContactSearch | ( | const dictionary & | csDict,
|  | const box & | extDomain,
|  | const particles & | prtcl,
|  | const geometry & | geom,
|  | Timers & | timers
| ) |  |

inline

Definition at line 101 of file ContactSearch.hpp.

References particles::boundingSphere(), particles::boundingSphereMinMax(), internalField< T, MemorySpace >::deviceViewAll(), VectorSingle< T, MemorySpace >::deviceViewAll(), contactSearch::dict(), particles::dynPointStruct(), contactSearch::extendedDomainBox(), contactSearch::Geometry(), triSurface::normals(), triSurface::numPoints(), contactSearch::Particles(), particles::pointPosition(), triSurface::points(), triSurface::size(), and triSurface::vertices().

Here is the call graph for this function:

## Member Function Documentation

## BroadSearch()

bool BroadSearch | ( | const timeInfo & | ti,
|  | csPairContainerType & | ppPairs,
|  | csPairContainerType & | pwPairs,
|  | bool | force = `false`
| ) |  |

inlineoverrideprivatevirtual

Implements contactSearch.

Definition at line 56 of file ContactSearch.hpp.

References particles::boundingSphere(), internalField< T, MemorySpace >::deviceViewAll(), timeInfo::dt(), particles::dynPointStruct(), timeInfo::iter(), contactSearch::Particles(), particles::pointPosition(), ContactSearch< searchMethod >::ppwContactSearch_, and timeInfo::t().

Here is the call graph for this function:

## BoundaryBroadSearch()

bool BoundaryBroadSearch | ( | uint32 | bndryIndex,
|  | const timeInfo & | ti,
|  | csPairContainerType & | ppPairs,
|  | csPairContainerType & | pwPairs,
|  | bool | force = `false`
| ) |  |

inlineoverrideprivatevirtual

Implements contactSearch.

Definition at line 80 of file ContactSearch.hpp.

References ContactSearch< searchMethod >::csBoundaries_, timeInfo::dt(), timeInfo::iter(), and timeInfo::t().

Here is the call graph for this function:

## TypeInfoTemplate11()

TypeInfoTemplate11 | ( | "ContactSearch< searchMethod >" | ,
|  | SearchMethodType |
| ) |  |

## add_vCtor()

add_vCtor | ( | contactSearch | ,
|  | ContactSearch< searchMethod > | ,
|  | dictionary |
| ) |  |

## enterBroadSearchBoundary()

bool enterBroadSearchBoundary | ( | const timeInfo & | ti,
|  | bool | force = `false`
| ) |  | const

inlineoverridevirtual

Implements contactSearch.

Definition at line 157 of file ContactSearch.hpp.

References boundaryContactSearchList::boundariesUpdated(), ContactSearch< searchMethod >::csBoundaries_, and contactSearch::enterBroadSearch().

Here is the call graph for this function:

## sizeRatio()

real sizeRatio | ( |  | ) | const

inlineoverridevirtual

Implements contactSearch.

Definition at line 162 of file ContactSearch.hpp.

References ContactSearch< searchMethod >::ppwContactSearch_.

## cellExtent()

real cellExtent | ( |  | ) | const

inlineoverridevirtual

Implements contactSearch.

Definition at line 167 of file ContactSearch.hpp.

References ContactSearch< searchMethod >::ppwContactSearch_.

## Member Data Documentation

## ppwContactSearch_

uniquePtr<SearchMethodType> ppwContactSearch_ = nullptr

private

Definition at line 52 of file ContactSearch.hpp.

Referenced by ContactSearch< searchMethod >::BroadSearch(), ContactSearch< searchMethod >::cellExtent(), and ContactSearch< searchMethod >::sizeRatio().

## csBoundaries_

boundaryContactSearchList csBoundaries_

private

Definition at line 54 of file ContactSearch.hpp.

Referenced by ContactSearch< searchMethod >::BoundaryBroadSearch(), and ContactSearch< searchMethod >::enterBroadSearchBoundary().

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

- src/Interaction/contactSearch/ContactSearch/ContactSearch.hpp