# PhasicFlow: NBSLevel0 Class 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.

NBSLevel0 Class Reference
Inheritance diagram for NBSLevel0:
[legend]
Collaboration diagram for NBSLevel0:
[legend]

## Public Types

using | MapperType = mapperNBS
using | CellIterator = typename MapperType::CellIterator
using | HeadType = typename MapperType::HeadType
using | NextType = typename MapperType::NextType
Public Types inherited from mapperNBS
using | HeadType = deviceViewType3D< uint32 >
using | NextType = deviceViewType1D< uint32 >

## Public Member Functions

| TypeInfoNV ("NBSLevel0")
INLINE_FUNCTION_HD | NBSLevel0 ()=default
| NBSLevel0 (const box &domain, real cellSize, real sizeRatio, const deviceViewType1D< realx3 > &pointPos, const pFlagTypeDevice &flags, bool adjustableBox)
INLINE_FUNCTION_HD | NBSLevel0 (const NBSLevel0 &)=default
INLINE_FUNCTION_HD NBSLevel0 & | operator= (const NBSLevel0 &)=default
INLINE_FUNCTION_HD | ~NBSLevel0 ()=default
bool | broadSearch (csPairContainerType &pairs, const deviceViewType1D< realx3 > &pointPos, const pFlagTypeDevice &flags, const deviceViewType1D< real > &diameter, bool &searchBoxChanged)
Public Member Functions inherited from mapperNBS
| TypeInfoNV ("mapperNBS")
INLINE_FUNCTION_HD | mapperNBS ()=default
| mapperNBS (const box &domain, real cellSize, const deviceViewType1D< realx3 > &pointPos, const pFlagTypeDevice &flags, bool adjustableBox, bool nextOwner=true)
INLINE_FUNCTION_HD | mapperNBS (const mapperNBS &)=default
INLINE_FUNCTION_HD | mapperNBS (mapperNBS &&)=default
INLINE_FUNCTION_HD mapperNBS & | operator= (const mapperNBS &)=default
INLINE_FUNCTION_HD mapperNBS & | operator= (mapperNBS &&)=default
INLINE_FUNCTION_HD | ~mapperNBS ()=default
auto | getCellIterator () const
const auto & | getDomainCells () const
const auto & | getSearchCells () const
bool | build (const deviceViewType1D< realx3 > &pointPos, const pFlagTypeDevice &flags, bool &searchBoxChanged)

## Private Member Functions

bool | findPairs (csPairContainerType &pairs, const deviceViewType1D< realx3 > &pointPos, const pFlagTypeDevice &flags, const deviceViewType1D< real > &diameter)

## Private Attributes

real | sizeRatio_ = 1.0

## Additional Inherited Members

Static Public Attributes inherited from mapperNBS
static constexpr uint32 | NoPos = 0xFFFFFFFF

## Detailed Description

Definition at line 32 of file NBSLevel0.hpp.

## Member Typedef Documentation

## MapperType

using MapperType = mapperNBS

Definition at line 38 of file NBSLevel0.hpp.

## CellIterator

using CellIterator = typename MapperType::CellIterator

Definition at line 40 of file NBSLevel0.hpp.

## HeadType

using HeadType = typename MapperType::HeadType

Definition at line 42 of file NBSLevel0.hpp.

## NextType

using NextType = typename MapperType::NextType

Definition at line 44 of file NBSLevel0.hpp.

## Constructor & Destructor Documentation

## NBSLevel0() [1/3]

INLINE_FUNCTION_HD NBSLevel0 | ( |  | ) |

default

## NBSLevel0() [2/3]

NBSLevel0 | ( | const box & | domain,
|  | real | cellSize,
|  | real | sizeRatio,
|  | const deviceViewType1D< realx3 > & | pointPos,
|  | const pFlagTypeDevice & | flags,
|  | bool | adjustableBox
| ) |  |

Definition at line 70 of file NBSLevel0.cpp.

## NBSLevel0() [3/3]

INLINE_FUNCTION_HD NBSLevel0 | ( | const NBSLevel0 & |  | ) |

default

## ~NBSLevel0()

INLINE_FUNCTION_HD ~NBSLevel0 | ( |  | ) |

default

## Member Function Documentation

## findPairs()

bool findPairs | ( | csPairContainerType & | pairs,
|  | const deviceViewType1D< realx3 > & | pointPos,
|  | const pFlagTypeDevice & | flags,
|  | const deviceViewType1D< real > & | diameter
| ) |  |

private

Definition at line 25 of file NBSLevel0.cpp.

References unsortedPairs< executionSpace, idType >::capacity(), END_INFO, pFlow::NBSLevel0Kernels::findPairsCount(), unsortedPairs< executionSpace, idType >::increaseCapacityBy(), INFORMATION, and pFlow::algorithms::KOKKOS::max().

Here is the call graph for this function:

## TypeInfoNV()

TypeInfoNV | ( | "NBSLevel0" |  | ) |

## operator=()

INLINE_FUNCTION_HD NBSLevel0& operator= | ( | const NBSLevel0 & |  | ) |

default

## broadSearch()

bool broadSearch | ( | csPairContainerType & | pairs,
|  | const deviceViewType1D< realx3 > & | pointPos,
|  | const pFlagTypeDevice & | flags,
|  | const deviceViewType1D< real > & | diameter,
|  | bool & | searchBoxChanged
| ) |  |

Definition at line 94 of file NBSLevel0.cpp.

References fatalErrorInFunction.

Referenced by NBS::impl_broadSearch().

Here is the caller graph for this function:

## Member Data Documentation

## sizeRatio_

real sizeRatio_ = 1.0

private

Definition at line 49 of file NBSLevel0.hpp.

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

- src/Interaction/contactSearch/methods/cellBased/NBS/NBSLevel0.hpp
- src/Interaction/contactSearch/methods/cellBased/NBS/NBSLevel0.cpp