# PhasicFlow: NBSLevel0< executionSpace > Class Template Reference

NBSLevel0< executionSpace > Class Template Reference
Inheritance diagram for NBSLevel0< executionSpace >:
[legend]
Collaboration diagram for NBSLevel0< executionSpace >:
[legend]

## Classes

struct | TagFindPairs

## Public Types

using | MapperType = mapperNBS< executionSpace >
using | cellIterator = typename MapperType::cellIterator
using | IdType = typename MapperType::IdType
using | IndexType = typename MapperType::IndexType
using | Cells = typename MapperType::Cells
using | CellType = typename Cells::CellType
using | execution_space = typename MapperType::execution_space
using | memory_space = typename MapperType::memory_space
using | HeadType = typename MapperType::HeadType
using | NextType = typename MapperType::NextType
Public Types inherited from mapperNBS< executionSpace >
using | IdType = int32
using | IndexType = int32
using | Cells = cells< IndexType >
using | CellType = typename Cells::CellType
using | execution_space = executionSpace
using | memory_space = typename execution_space::memory_space
using | HeadType = ViewType3D< int32, memory_space >
using | NextType = ViewType1D< int32, memory_space >
Public Types inherited from cells< int32 >
using | CellType = triple< int32 >

## Public Member Functions

| TypeInfoNV ("NBSLevel0")
INLINE_FUNCTION_HD | NBSLevel0 ()
| NBSLevel0 (const box &domain, real cellSize, const ViewType1D< realx3, memory_space > &position, const ViewType1D< real, memory_space > &diam)
| NBSLevel0 (const box &domain, int32 nx, int32 ny, int32 nz, const ViewType1D< realx3, memory_space > &position, const ViewType1D< real, memory_space > &diam)
| NBSLevel0 (const box &domain, real cellSize, real sizeRatio, const ViewType1D< realx3, memory_space > &position, const ViewType1D< real, memory_space > &diam, bool nextOwner=true)
INLINE_FUNCTION_HD | NBSLevel0 (const NBSLevel0 &)=default
INLINE_FUNCTION_HD NBSLevel0 & | operator= (const NBSLevel0 &)=default
INLINE_FUNCTION_HD | ~NBSLevel0 ()=default
INLINE_FUNCTION_HD auto | sizeRatio () const
INLINE_FUNCTION_HD auto & | diameter ()
template<typename PairsContainer >
bool | broadSearch (PairsContainer &pairs, range activeRange)
template<typename PairsContainer , typename IncludeFunction >
bool | broadSearch (PairsContainer &pairs, range activeRange, IncludeFunction incld)
template<typename PairsContainer >
INLINE_FUNCTION_H bool | findPairs (PairsContainer &pairs)
template<typename PairsContainer >
INLINE_FUNCTION_H int32 | findPairsCount (PairsContainer &pairs)
Public Member Functions inherited from mapperNBS< executionSpace >
| TypeInfoNV ("mapperNBS")
INLINE_FUNCTION_HD | mapperNBS ()
| mapperNBS (const box &domain, real cellSize, const ViewType1D< realx3, memory_space > &position, bool nextOwner=true)
| mapperNBS (const box &domain, int32 nx, int32 ny, int32 nz, const ViewType1D< realx3, memory_space > &position, bool nextOwner=true)
INLINE_FUNCTION_HD | mapperNBS (const mapperNBS &)=default
INLINE_FUNCTION_HD mapperNBS & | operator= (const mapperNBS &)=default
INLINE_FUNCTION_HD | ~mapperNBS ()=default
INLINE_FUNCTION_HD auto | capacity () const
cellIterator | getCellIterator () const
bool | particlesCapcityChanged (int32 newCap)
INLINE_FUNCTION_HD auto & | head ()
INLINE_FUNCTION_HD auto & | next ()
const INLINE_FUNCTION_HD auto & | head () const
const INLINE_FUNCTION_HD auto & | next () const
INLINE_FUNCTION_HD auto & | pointPosition ()
INLINE_FUNCTION_H void | setNext (ViewType1D< int32, memory_space > &next)
INLINE_FUNCTION_H void | build (range activeRange)
template<typename IncludeFunction >
INLINE_FUNCTION_H void | build (range activeRange, IncludeFunction incld)
INLINE_FUNCTION_H void | buildCheckInDomain (range activeRange)
template<typename IncludeFunction >
INLINE_FUNCTION_H void | buildCheckInDomain (range activeRange, IncludeFunction incld)
Public Member Functions inherited from cells< int32 >
INLINE_FUNCTION_HD | cells ()
INLINE_FUNCTION_H | cells (const box &domain, real cellSize)
INLINE_FUNCTION_H | cells (const box &domain, int32 nx, int32 ny, int32 nz)
INLINE_FUNCTION_HD | cells (const cells &)=default
INLINE_FUNCTION_HD | cells (cells &&)=default
INLINE_FUNCTION_HD cells & | operator= (const cells &)=default
INLINE_FUNCTION_HD cells & | operator= (cells &&)=default
cells | getCells () const
INLINE_FUNCTION_H void | setCellSize (real cellSize)
INLINE_FUNCTION_H void | setCellSize (realx3 cellSize)
INLINE_FUNCTION_HD realx3 | cellSize () const
const INLINE_FUNCTION_HD CellType & | numCells () const
INLINE_FUNCTION_HD int32 | nx () const
INLINE_FUNCTION_HD int32 | ny () const
INLINE_FUNCTION_HD int32 | nz () const
INLINE_FUNCTION_HD int64 | totalCells () const
const auto & | domain () const
INLINE_FUNCTION_HD CellType | pointIndex (const realx3 &p) const
INLINE_FUNCTION_HD bool | pointIndexInDomain (const realx3 p, CellType &index) const
INLINE_FUNCTION_HD bool | inDomain (const realx3 &p) const
INLINE_FUNCTION_HD bool | isInRange (const CellType &cell) const
INLINE_FUNCTION_HD bool | isInRange (int32 i, int32 j, int32 k) const
INLINE_FUNCTION_HD void | extendBox (const CellType &p1, const CellType &p2, const CellType &p3, int32 extent, CellType &minP, CellType &maxP) const
INLINE_FUNCTION_HD void | extendBox (const realx3 &p1, const realx3 &p2, const realx3 &p3, real extent, realx3 &minP, realx3 &maxP) const
INLINE_FUNCTION_HD CellType | bound (CellType p) const
INLINE_FUNCTION_HD realx3 | bound (realx3 p) const

## Protected Types

using | mdrPolicyFindPairs = Kokkos::MDRangePolicy< Kokkos::Rank< 3 >, Kokkos::Schedule< Kokkos::Dynamic >, execution_space >
Protected Types inherited from mapperNBS< executionSpace >
using | rangePolicyType = Kokkos::RangePolicy< Kokkos::IndexType< int32 >, Kokkos::Schedule< Kokkos::Static >, execution_space >

## Static Protected Member Functions

static INLINE_FUNCTION_HD void | Swap (int32 &x, int32 &y)

## Protected Attributes

real | sizeRatio_ = 1.0
ViewType1D< real, memory_space > | diameter_
Protected Attributes inherited from mapperNBS< executionSpace >
int32 | capacity_ = 1
ViewType3D< int32, memory_space > | head_
ViewType1D< int32, memory_space > | next_
bool | nextOwner_ = true
ViewType1D< realx3, memory_space > | pointPosition_
Protected Attributes inherited from cells< int32 >
box | domain_
realx3 | cellSize_
CellType | numCells_

## Additional Inherited Members

Protected Member Functions inherited from mapperNBS< executionSpace >
INLINE_FUNCTION_H void | nullifyHead ()
void | nullifyNext (range nextRng)
void | nullify ()
void | nullify (range nextRng)
void | checkAllocateNext (int newCap)
void | allocateHead ()
Protected Member Functions inherited from cells< int32 >
INLINE_FUNCTION_H void | calculate ()

## Detailed Description

### template<typename executionSpace>
class pFlow::NBSLevel0< executionSpace >

Definition at line 32 of file NBSLevel0.hpp.

## Member Typedef Documentation

## MapperType

using MapperType = mapperNBS<executionSpace>

Definition at line 38 of file NBSLevel0.hpp.

## cellIterator

using cellIterator = typename MapperType::cellIterator

Definition at line 40 of file NBSLevel0.hpp.

## IdType

using IdType = typename MapperType::IdType

Definition at line 42 of file NBSLevel0.hpp.

## IndexType

using IndexType = typename MapperType::IndexType

Definition at line 44 of file NBSLevel0.hpp.

## Cells

using Cells = typename MapperType::Cells

Definition at line 46 of file NBSLevel0.hpp.

## CellType

using CellType = typename Cells::CellType

Definition at line 48 of file NBSLevel0.hpp.

## execution_space

using execution_space = typename MapperType::execution_space

Definition at line 50 of file NBSLevel0.hpp.

## memory_space

using memory_space = typename MapperType::memory_space

Definition at line 52 of file NBSLevel0.hpp.

## HeadType

using HeadType = typename MapperType::HeadType

Definition at line 54 of file NBSLevel0.hpp.

## NextType

using NextType = typename MapperType::NextType

Definition at line 56 of file NBSLevel0.hpp.

## mdrPolicyFindPairs

using mdrPolicyFindPairs = Kokkos::MDRangePolicy< Kokkos::Rank<3>, Kokkos::Schedule<Kokkos::Dynamic>, execution_space>

protected

Definition at line 73 of file NBSLevel0.hpp.

## Constructor & Destructor Documentation

## NBSLevel0() [1/5]

INLINE_FUNCTION_HD NBSLevel0 | ( |  | ) |

inline

Definition at line 88 of file NBSLevel0.hpp.

## NBSLevel0() [2/5]

NBSLevel0 | ( | const box & | domain,
|  | real | cellSize,
|  | const ViewType1D< realx3, memory_space > & | position,
|  | const ViewType1D< real, memory_space > & | diam
| ) |  |

inline

Definition at line 90 of file NBSLevel0.hpp.

## NBSLevel0() [3/5]

NBSLevel0 | ( | const box & | domain,
|  | int32 | nx,
|  | int32 | ny,
|  | int32 | nz,
|  | const ViewType1D< realx3, memory_space > & | position,
|  | const ViewType1D< real, memory_space > & | diam
| ) |  |

inline

Definition at line 100 of file NBSLevel0.hpp.

## NBSLevel0() [4/5]

NBSLevel0 | ( | const box & | domain,
|  | real | cellSize,
|  | real | sizeRatio,
|  | const ViewType1D< realx3, memory_space > & | position,
|  | const ViewType1D< real, memory_space > & | diam,
|  | bool | nextOwner = `true`
| ) |  |

inline

Definition at line 112 of file NBSLevel0.hpp.

## NBSLevel0() [5/5]

INLINE_FUNCTION_HD NBSLevel0 | ( | const NBSLevel0< executionSpace > & |  | ) |

default

## ~NBSLevel0()

INLINE_FUNCTION_HD ~NBSLevel0 | ( |  | ) |

default

## Member Function Documentation

## Swap()

static INLINE_FUNCTION_HD void Swap | ( | int32 & | x,
|  | int32 & | y
| ) |  |

inlinestaticprotected

Definition at line 76 of file NBSLevel0.hpp.

## TypeInfoNV()

TypeInfoNV | ( | "NBSLevel0< executionSpace >" |  | ) |

## operator=()

INLINE_FUNCTION_HD NBSLevel0& operator= | ( | const NBSLevel0< executionSpace > & |  | ) |

default

## sizeRatio()

INLINE_FUNCTION_HD auto sizeRatio | ( |  | ) | const

inline

Definition at line 136 of file NBSLevel0.hpp.

References NBSLevel0< executionSpace >::sizeRatio_.

## diameter()

INLINE_FUNCTION_HD auto& diameter | ( |  | ) |

inline

Definition at line 142 of file NBSLevel0.hpp.

References NBSLevel0< executionSpace >::diameter_.

## broadSearch() [1/2]

bool broadSearch | ( | PairsContainer & | pairs,
|  | range | activeRange
| ) |  |

inline

Definition at line 152 of file NBSLevel0.hpp.

References mapperNBS< executionSpace >::build(), and NBSLevel0< executionSpace >::findPairs().

Referenced by positionRandom::positionOnePass().

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

## broadSearch() [2/2]

bool broadSearch | ( | PairsContainer & | pairs,
|  | range | activeRange,
|  | IncludeFunction | incld
| ) |  |

inline

Definition at line 168 of file NBSLevel0.hpp.

References mapperNBS< executionSpace >::build(), and NBSLevel0< executionSpace >::findPairs().

Here is the call graph for this function:

## findPairs()

INLINE_FUNCTION_H bool findPairs | ( | PairsContainer & | pairs | ) |

inline

Definition at line 180 of file NBSLevel0.hpp.

References endINFO, NBSLevel0< executionSpace >::findPairsCount(), INFORMATION, and pFlow::max().

Referenced by NBSLevel0< executionSpace >::broadSearch(), and NBS< executionSpace >::broadSearch().

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

## findPairsCount()

INLINE_FUNCTION_H int32 findPairsCount | ( | PairsContainer & | pairs | ) |

inline

Definition at line 216 of file NBSLevel0.hpp.

References CLASS_LAMBDA_HD, cells< int32 >::nx(), cells< int32 >::ny(), and cells< int32 >::nz().

Referenced by NBSLevel0< executionSpace >::findPairs().

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

## Member Data Documentation

## sizeRatio_

real sizeRatio_ = 1.0

protected

Definition at line 63 of file NBSLevel0.hpp.

Referenced by NBSLevel0< executionSpace >::sizeRatio().

## diameter_

ViewType1D<real, memory_space> diameter_

protected

Definition at line 66 of file NBSLevel0.hpp.

Referenced by NBSLevel0< executionSpace >::diameter().

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

- src/Interaction/contactSearch/methods/NBSLevel0.hpp