# PhasicFlow: unsortedContactList< valueType, 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.

unsortedContactList< valueType, executionSpace, idType > Class Template Reference
Inheritance diagram for unsortedContactList< valueType, executionSpace, idType >:
[legend]
Collaboration diagram for unsortedContactList< valueType, executionSpace, idType >:
[legend]

## Classes

class | TagReFillPairs

## Public Types

using | ValueType = valueType
using | UnsortedPairs = unsortedPairs< executionSpace, idType >
using | IdType = typename UnsortedPairs::IdType
using | ExecutionSpace = typename UnsortedPairs::ExecutionSpace
using | memory_space = typename ExecutionSpace::memory_space
using | PairType = typename UnsortedPairs::PairType
using | ContainerType = typename UnsortedPairs::ContainerType
Public Types inherited from unsortedPairs< executionSpace, idType >
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 ("unsortedContactList")
| unsortedContactList (uint32 capacity=1)
bool | beforeBroadSearch ()
bool | afterBroadSearch ()
INLINE_FUNCTION_HD ValueType | getValue (int32 idx) const
INLINE_FUNCTION_HD bool | getValue (const PairType &p, ValueType &val) const
INLINE_FUNCTION_HD void | setValue (uint32 idx, const ValueType &val) const
INLINE_FUNCTION_HD bool | setValue (const PairType &p, const ValueType &val) const
INLINE_FUNCTION_HD void | operator() (TagReFillPairs, uint32 idx) const
Public Member Functions inherited from unsortedPairs< executionSpace, idType >
| 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 Types

using | rpFillPairs = Kokkos::RangePolicy< ExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< uint32 >, TagReFillPairs >

## Protected Member Functions

void | adjustCapacity ()

## Protected Attributes

ViewType1D< ValueType, ExecutionSpace > | values_
| storage for keeping the values of the current list More...
ContainerType | container0_
| storage for keeping pairs from the previous list More...
ViewType1D< ValueType, ExecutionSpace > | values0_
| storage for keeping values from the previous list More...
Protected Attributes inherited from unsortedPairs< executionSpace, idType >
ContainerType | container_

## Detailed Description

### template<typename valueType, typename executionSpace, typename idType>
class pFlow::unsortedContactList< valueType, executionSpace, idType >

Definition at line 30 of file unsortedContactList.hpp.

## Member Typedef Documentation

## ValueType

using ValueType = valueType

Definition at line 36 of file unsortedContactList.hpp.

## UnsortedPairs

using UnsortedPairs = unsortedPairs<executionSpace, idType>

Definition at line 38 of file unsortedContactList.hpp.

## IdType

using IdType = typename UnsortedPairs::IdType

Definition at line 40 of file unsortedContactList.hpp.

## ExecutionSpace

using ExecutionSpace = typename UnsortedPairs::ExecutionSpace

Definition at line 42 of file unsortedContactList.hpp.

## memory_space

using memory_space = typename ExecutionSpace::memory_space

Definition at line 44 of file unsortedContactList.hpp.

## PairType

using PairType = typename UnsortedPairs::PairType

Definition at line 46 of file unsortedContactList.hpp.

## ContainerType

using ContainerType = typename UnsortedPairs::ContainerType

Definition at line 48 of file unsortedContactList.hpp.

## rpFillPairs

using rpFillPairs = Kokkos::RangePolicy< ExecutionSpace, Kokkos::Schedule<Kokkos::Static>, Kokkos::IndexType<uint32>, TagReFillPairs>

protected

Definition at line 77 of file unsortedContactList.hpp.

## Constructor & Destructor Documentation

## unsortedContactList()

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

inlineexplicit

Definition at line 84 of file unsortedContactList.hpp.

## Member Function Documentation

## adjustCapacity()

void adjustCapacity | ( |  | ) |

inlineprotected

Definition at line 63 of file unsortedContactList.hpp.

References unsortedPairs< executionSpace, idType >::capacity(), pFlow::reallocNoInit(), and unsortedContactList< valueType, executionSpace, idType >::values_.

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

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

## TypeInfoNV()

TypeInfoNV | ( | "unsortedContactList< valueType, executionSpace, idType >" |  | ) |

## beforeBroadSearch()

bool beforeBroadSearch | ( |  | ) |

inline

Definition at line 93 of file unsortedContactList.hpp.

References unsortedPairs< executionSpace, idType >::beforeBroadSearch(), unsortedContactList< valueType, executionSpace, idType >::container0_, unsortedPairs< executionSpace, idType >::container_, pFlow::swapViews(), unsortedContactList< valueType, executionSpace, idType >::values0_, and unsortedContactList< valueType, executionSpace, idType >::values_.

Here is the call graph for this function:

## afterBroadSearch()

bool afterBroadSearch | ( |  | ) |

inline

Definition at line 102 of file unsortedContactList.hpp.

References unsortedContactList< valueType, executionSpace, idType >::adjustCapacity(), unsortedPairs< executionSpace, idType >::afterBroadSearch(), and unsortedPairs< executionSpace, idType >::capacity().

Here is the call graph for this function:

## getValue() [1/2]

INLINE_FUNCTION_HD ValueType getValue | ( | int32 | idx | ) | const

inline

Definition at line 119 of file unsortedContactList.hpp.

References unsortedContactList< valueType, executionSpace, idType >::values_.

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

Here is the caller graph for this function:

## getValue() [2/2]

INLINE_FUNCTION_HD bool getValue | ( | const PairType & | p,
|  | ValueType & | val
| ) |  | const

inline

Definition at line 125 of file unsortedContactList.hpp.

References unsortedPairs< executionSpace, idType >::find(), and unsortedContactList< valueType, executionSpace, idType >::getValue().

Here is the call graph for this function:

## setValue() [1/2]

INLINE_FUNCTION_HD void setValue | ( | uint32 | idx,
|  | const ValueType & | val
| ) |  | const

inline

Definition at line 136 of file unsortedContactList.hpp.

References unsortedContactList< valueType, executionSpace, idType >::values_.

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

Here is the caller graph for this function:

## setValue() [2/2]

INLINE_FUNCTION_HD bool setValue | ( | const PairType & | p,
|  | const ValueType & | val
| ) |  | const

inline

Definition at line 142 of file unsortedContactList.hpp.

References unsortedPairs< executionSpace, idType >::find(), and unsortedContactList< valueType, executionSpace, idType >::setValue().

Here is the call graph for this function:

## operator()()

INLINE_FUNCTION_HD void operator() | ( | TagReFillPairs | ,
|  | uint32 | idx
| ) |  | const

inline

Definition at line 153 of file unsortedContactList.hpp.

References unsortedContactList< valueType, executionSpace, idType >::container0_, unsortedPairs< executionSpace, idType >::isValid(), unsortedContactList< valueType, executionSpace, idType >::values0_, and unsortedContactList< valueType, executionSpace, idType >::values_.

Here is the call graph for this function:

## Member Data Documentation

## values_

ViewType1D<ValueType,ExecutionSpace> values_

protected

storage for keeping the values of the current list

Definition at line 55 of file unsortedContactList.hpp.

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

## container0_

ContainerType container0_

protected

storage for keeping pairs from the previous list

Definition at line 58 of file unsortedContactList.hpp.

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

## values0_

ViewType1D<ValueType,ExecutionSpace> values0_

protected

storage for keeping values from the previous list

Definition at line 61 of file unsortedContactList.hpp.

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

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

- src/Interaction/contactLists/unsortedContactList.hpp