# PhasicFlow: unsortedPairs< executionSpace, idType > 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.

unsortedPairs< executionSpace, idType > Class Template Reference
Inheritance diagram for unsortedPairs< executionSpace, idType >:
[legend]

## Classes

struct | pairAccessor

## Public Types

using | UnsortedPairs = unsortedPairs< executionSpace, idType >
using | IdType = idType
using | ExecutionSpace = executionSpace
using | memory_space = typename ExecutionSpace::memory_space
using | PairType = Pair< idType, idType >
using | ContainerType = unorderedSet< PairType, ExecutionSpace >

## Public Member Functions

| TypeInfoNV ("unsorderedPairs")
| unsortedPairs (uint32 capacity=1)
bool | beforeBroadSearch ()
bool | afterBroadSearch ()
INLINE_FUNCTION_HD uint32 | insert (idType i, idType j) const
INLINE_FUNCTION_HD uint32 | insert (const PairType &p) const
INLINE_FUNCTION_HD PairType | getPair (uint32 idx) const
INLINE_FUNCTION_HD bool | getPair (uint32 idx, PairType &p) const
INLINE_FUNCTION_HD uint32 | find (const PairType &p) const
INLINE_FUNCTION_HD bool | isValid (uint32 idx) const
INLINE_FUNCTION_HD uint32 | capacity () const
uint32 | loopCount () const
INLINE_FUNCTION_H uint32 | size () const
pairAccessor | getPairs () const
INLINE_FUNCTION_H void | increaseCapacityBy (uint32 len)
| increase the capacity of the container by at-least len the content will be erased. More...
INLINE_FUNCTION_H void | clear ()
const ContainerType & | container () const

## Protected Attributes

ContainerType | container_

## Detailed Description

### template<typename executionSpace, typename idType>
class pFlow::unsortedPairs< executionSpace, idType >

Definition at line 32 of file unsortedPairs.hpp.

## Member Typedef Documentation

## UnsortedPairs

using UnsortedPairs = unsortedPairs<executionSpace,idType>

Definition at line 36 of file unsortedPairs.hpp.

## IdType

using IdType = idType

Definition at line 38 of file unsortedPairs.hpp.

## ExecutionSpace

using ExecutionSpace = executionSpace

Definition at line 40 of file unsortedPairs.hpp.

## memory_space

using memory_space = typename ExecutionSpace::memory_space

Definition at line 42 of file unsortedPairs.hpp.

## PairType

using PairType = Pair<idType,idType>

Definition at line 44 of file unsortedPairs.hpp.

## ContainerType

using ContainerType = unorderedSet<PairType, ExecutionSpace>

Definition at line 46 of file unsortedPairs.hpp.

## Constructor & Destructor Documentation

## unsortedPairs()

unsortedPairs | ( | uint32 | capacity = `1` | ) |

inlineexplicit

Definition at line 87 of file unsortedPairs.hpp.

## Member Function Documentation

## TypeInfoNV()

TypeInfoNV | ( | "unsorderedPairs" |  | ) |

## beforeBroadSearch()

bool beforeBroadSearch | ( |  | ) |

inline

Definition at line 92 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

Referenced by unsortedContactList< valueType, executionSpace, idType >::beforeBroadSearch().

Here is the caller graph for this function:

## afterBroadSearch()

bool afterBroadSearch | ( |  | ) |

inline

Definition at line 98 of file unsortedPairs.hpp.

Referenced by unsortedContactList< valueType, executionSpace, idType >::afterBroadSearch().

Here is the caller graph for this function:

## insert() [1/2]

INLINE_FUNCTION_HD uint32 insert | ( | idType | i,
|  | idType | j
| ) |  | const

inline

Definition at line 105 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

Referenced by pFlow::pweBndryContactSearchKernels::broadSearchPP(), and cellsWallLevel0::findPairsElementRangeCount().

Here is the caller graph for this function:

## insert() [2/2]

INLINE_FUNCTION_HD uint32 insert | ( | const PairType & | p | ) | const

inline

Definition at line 115 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

## getPair() [1/2]

INLINE_FUNCTION_HD PairType getPair | ( | uint32 | idx | ) | const

inline

Definition at line 128 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

## getPair() [2/2]

INLINE_FUNCTION_HD bool getPair | ( | uint32 | idx,
|  | PairType & | p
| ) |  | const

inline

Definition at line 136 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

## find()

INLINE_FUNCTION_HD uint32 find | ( | const PairType & | p | ) | const

inline

Definition at line 151 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

Referenced by unsortedContactList< valueType, executionSpace, idType >::getValue(), and unsortedContactList< valueType, executionSpace, idType >::setValue().

Here is the caller graph for this function:

## isValid()

INLINE_FUNCTION_HD bool isValid | ( | uint32 | idx | ) | const

inline

Definition at line 161 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

Referenced by unsortedContactList< valueType, executionSpace, idType >::operator()().

Here is the caller graph for this function:

## capacity()

INLINE_FUNCTION_HD uint32 capacity | ( |  | ) | const

inline

Definition at line 168 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

Referenced by unsortedContactList< valueType, executionSpace, idType >::adjustCapacity(), unsortedContactList< valueType, executionSpace, idType >::afterBroadSearch(), wallBoundaryContactSearch::broadSearch(), ppwBndryContactSearch::broadSearchPP(), NBSLevel0::findPairs(), cellsWallLevel0::particleWallFindPairs(), and sortedPairs< executionSpace, idType >::prepareSorted().

Here is the caller graph for this function:

## loopCount()

uint32 loopCount | ( |  | ) | const

inline

Definition at line 173 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

## size()

INLINE_FUNCTION_H uint32 size | ( |  | ) | const

inline

Definition at line 180 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

## getPairs()

pairAccessor getPairs | ( |  | ) | const

inline

Definition at line 185 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

## increaseCapacityBy()

INLINE_FUNCTION_H void increaseCapacityBy | ( | uint32 | len | ) |

inline

increase the capacity of the container by at-least len the content will be erased.

Definition at line 193 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::clear(), and unsortedPairs< executionSpace, idType >::container_.

Referenced by wallBoundaryContactSearch::broadSearch(), ppwBndryContactSearch::broadSearchPP(), NBSLevel0::findPairs(), and cellsWallLevel0::particleWallFindPairs().

Here is the call graph for this function:
Here is the caller graph for this function:

## clear()

INLINE_FUNCTION_H void clear | ( |  | ) |

inline

Definition at line 201 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

Referenced by sortedPairs< executionSpace, idType >::clear(), and unsortedPairs< executionSpace, idType >::increaseCapacityBy().

Here is the caller graph for this function:

## container()

const ContainerType& container | ( |  | ) | const

inline

Definition at line 206 of file unsortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_.

## Member Data Documentation

## container_

ContainerType container_

protected

Definition at line 78 of file unsortedPairs.hpp.

Referenced by unsortedPairs< executionSpace, idType >::beforeBroadSearch(), unsortedContactList< valueType, executionSpace, idType >::beforeBroadSearch(), unsortedPairs< executionSpace, idType >::capacity(), unsortedPairs< executionSpace, idType >::clear(), unsortedPairs< executionSpace, idType >::container(), unsortedPairs< executionSpace, idType >::find(), unsortedPairs< executionSpace, idType >::getPair(), unsortedPairs< executionSpace, idType >::getPairs(), unsortedPairs< executionSpace, idType >::increaseCapacityBy(), unsortedPairs< executionSpace, idType >::insert(), unsortedPairs< executionSpace, idType >::isValid(), unsortedPairs< executionSpace, idType >::loopCount(), sortedPairs< executionSpace, idType >::operator()(), and unsortedPairs< executionSpace, idType >::size().

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

- src/Interaction/contactLists/unsortedPairs.hpp