# PhasicFlow: NBSLevels< executionSpace > Class Template Reference

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

## Public Types

using | NBSLevelType = NBSLevel< executionSpace >
using | cellIterator = typename NBSLevelType::cellIterator
using | IdType = typename NBSLevelType::IdType
using | IndexType = typename NBSLevelType::IndexType
using | Cells = typename NBSLevelType::Cells
using | CellType = typename Cells::CellType
using | execution_space = typename NBSLevelType::execution_space
using | memory_space = typename NBSLevelType::memory_space
using | realRange = kPair< real, real >

## Public Member Functions

| NBSLevels (const box &domain, real minSize, real maxSize, real sizeRatio, const ViewType1D< realx3, memory_space > &position, const ViewType1D< real, memory_space > &diam)
auto | getCellIterator (int32 lvl) const
int32 | numLevels () const
Cells | getCells (int32 lvl) const
template<typename PairsContainer >
INLINE_FUNCTION_H bool | findPairs (PairsContainer &pairs)
template<typename PairsContainer >
INLINE_FUNCTION_H int32 | findPairsCount (PairsContainer &pairs)
INLINE_FUNCTION_H void | build (range activeRange)
template<typename IncludeFunction >
INLINE_FUNCTION_H void | build (range activeRange, IncludeFunction incld)
bool | findParticleLevel (int32 first, int32 last)

## Protected Types

using | rangePolicyType = Kokkos::RangePolicy< Kokkos::IndexType< int32 >, Kokkos::Schedule< Kokkos::Static >, execution_space >

## Protected Member Functions

int32 | setNumLevels ()
bool | setDiameterRange (real sizeRatio)
bool | initLevels (const box &domain, real sizeRatio, const ViewType1D< realx3, memory_space > &position, const ViewType1D< real, memory_space > &diam)
void | manageAllocateNext (range active)
void | nullify (range active)

## Protected Attributes

real | minSize_
real | maxSize_
int32 | numLevels_ =1
Vector< NBSLevelType > | nbsLevels_
ViewType1D< realRange, memory_space > | sizeRangeLevels_
ViewType1D< realRange, HostSpace > | sizeRangeLevelsHost_
ViewType1D< real, memory_space > | maxSizeLevels_
ViewType1D< real, HostSpace > | maxSizeLevelsHost_
ViewType1D< int8, memory_space > | particleLevel_
range | activeRange_ {0,0}

## Detailed Description

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

Definition at line 12 of file NBSLevels.hpp.

## Member Typedef Documentation

## NBSLevelType

using NBSLevelType = NBSLevel<executionSpace>

Definition at line 17 of file NBSLevels.hpp.

## cellIterator

using cellIterator = typename NBSLevelType::cellIterator

Definition at line 19 of file NBSLevels.hpp.

## IdType

using IdType = typename NBSLevelType::IdType

Definition at line 21 of file NBSLevels.hpp.

## IndexType

using IndexType = typename NBSLevelType::IndexType

Definition at line 23 of file NBSLevels.hpp.

## Cells

using Cells = typename NBSLevelType::Cells

Definition at line 25 of file NBSLevels.hpp.

## CellType

using CellType = typename Cells::CellType

Definition at line 27 of file NBSLevels.hpp.

## execution_space

using execution_space = typename NBSLevelType::execution_space

Definition at line 29 of file NBSLevels.hpp.

## memory_space

using memory_space = typename NBSLevelType::memory_space

Definition at line 31 of file NBSLevels.hpp.

## realRange

using realRange = kPair<real,real>

Definition at line 33 of file NBSLevels.hpp.

## rangePolicyType

using rangePolicyType = Kokkos::RangePolicy< Kokkos::IndexType<int32>, Kokkos::Schedule<Kokkos::Static>, execution_space>

protected

Definition at line 61 of file NBSLevels.hpp.

## Constructor & Destructor Documentation

## NBSLevels()

NBSLevels | ( | const box & | domain,
|  | real | minSize,
|  | real | maxSize,
|  | real | sizeRatio,
|  | const ViewType1D< realx3, memory_space > & | position,
|  | const ViewType1D< real, memory_space > & | diam
| ) |  |

inline

Definition at line 177 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::initLevels(), and NBSLevels< executionSpace >::setDiameterRange().

Here is the call graph for this function:

## Member Function Documentation

## setNumLevels()

int32 setNumLevels | ( |  | ) |

inlineprotected

Definition at line 63 of file NBSLevels.hpp.

References pFlow::endl(), fatalErrorInFunction, fatalExit, NBSLevels< executionSpace >::maxSize_, and NBSLevels< executionSpace >::minSize_.

Here is the call graph for this function:

## setDiameterRange()

bool setDiameterRange | ( | real | sizeRatio | ) |

inlineprotected

Definition at line 92 of file NBSLevels.hpp.

References pFlow::copy(), endREPORT, NBSLevels< executionSpace >::maxSize_, NBSLevels< executionSpace >::maxSizeLevels_, NBSLevels< executionSpace >::maxSizeLevelsHost_, NBSLevels< executionSpace >::minSize_, NBSLevels< executionSpace >::numLevels_, REPORT, NBSLevels< executionSpace >::sizeRangeLevels_, NBSLevels< executionSpace >::sizeRangeLevelsHost_, and yellowText.

Referenced by NBSLevels< executionSpace >::NBSLevels().

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

## initLevels()

bool initLevels | ( | const box & | domain,
|  | real | sizeRatio,
|  | const ViewType1D< realx3, memory_space > & | position,
|  | const ViewType1D< real, memory_space > & | diam
| ) |  |

inlineprotected

Definition at line 121 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::maxSizeLevelsHost_, NBSLevels< executionSpace >::nbsLevels_, and NBSLevels< executionSpace >::numLevels_.

Referenced by NBSLevels< executionSpace >::NBSLevels().

Here is the caller graph for this function:

## manageAllocateNext()

void manageAllocateNext | ( | range | active | ) |

inlineprotected

Definition at line 150 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::activeRange_, NBSLevels< executionSpace >::nbsLevels_, and NBSLevels< executionSpace >::numLevels_.

Referenced by NBSLevels< executionSpace >::build().

Here is the caller graph for this function:

## nullify()

void nullify | ( | range | active | ) |

inlineprotected

Definition at line 167 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::nbsLevels_, and NBSLevels< executionSpace >::numLevels_.

Referenced by NBSLevels< executionSpace >::build().

Here is the caller graph for this function:

## getCellIterator()

auto getCellIterator | ( | int32 | lvl | ) | const

inline

Definition at line 200 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::nbsLevels_.

Referenced by multiGridNBS< executionSpace >::getCellIterator().

Here is the caller graph for this function:

## numLevels()

int32 numLevels | ( |  | ) | const

inline

Definition at line 205 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::numLevels_.

Referenced by multiGridNBS< executionSpace >::numLevels().

Here is the caller graph for this function:

## getCells()

Cells getCells | ( | int32 | lvl | ) | const

inline

Definition at line 210 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::nbsLevels_.

Referenced by multiGridNBS< executionSpace >::getCells(), and multiGridNBS< executionSpace >::getCellsLevels().

Here is the caller graph for this function:

## findPairs()

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

inline

Definition at line 217 of file NBSLevels.hpp.

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

Referenced by multiGridNBS< 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 252 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::nbsLevels_, and NBSLevels< executionSpace >::numLevels_.

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

Here is the caller graph for this function:

## build() [1/2]

INLINE_FUNCTION_H void build | ( | range | activeRange | ) |

inline

Definition at line 276 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::findParticleLevel(), LAMBDA_HD, NBSLevels< executionSpace >::manageAllocateNext(), pFlow::mapIndexLevels(), NBSLevels< executionSpace >::nbsLevels_, NBSLevels< executionSpace >::nullify(), NBSLevels< executionSpace >::numLevels_, and NBSLevels< executionSpace >::particleLevel_.

Referenced by multiGridNBS< executionSpace >::broadSearch().

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

## build() [2/2]

INLINE_FUNCTION_H void build | ( | range | activeRange,
|  | IncludeFunction | incld
| ) |  |

inline

Definition at line 337 of file NBSLevels.hpp.

References NBSLevels< executionSpace >::findParticleLevel(), LAMBDA_HD, NBSLevels< executionSpace >::manageAllocateNext(), pFlow::mapIndexLevels(), NBSLevels< executionSpace >::nbsLevels_, NBSLevels< executionSpace >::nullify(), NBSLevels< executionSpace >::numLevels_, and NBSLevels< executionSpace >::particleLevel_.

Here is the call graph for this function:

## findParticleLevel()

bool findParticleLevel | ( | int32 | first,
|  | int32 | last
| ) |  |

inline

Definition at line 396 of file NBSLevels.hpp.

References LAMBDA_HD, NBSLevels< executionSpace >::maxSizeLevels_, NBSLevels< executionSpace >::nbsLevels_, NBSLevels< executionSpace >::particleLevel_, pFlow::reallocNoInit(), and NBSLevels< executionSpace >::sizeRangeLevels_.

Referenced by NBSLevels< executionSpace >::build().

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

## Member Data Documentation

## minSize_

real minSize_

protected

Definition at line 37 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::setDiameterRange(), and NBSLevels< executionSpace >::setNumLevels().

## maxSize_

real maxSize_

protected

Definition at line 39 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::setDiameterRange(), and NBSLevels< executionSpace >::setNumLevels().

## numLevels_

int32 numLevels_ =1

protected

Definition at line 41 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::build(), NBSLevels< executionSpace >::findPairsCount(), NBSLevels< executionSpace >::initLevels(), NBSLevels< executionSpace >::manageAllocateNext(), NBSLevels< executionSpace >::nullify(), NBSLevels< executionSpace >::numLevels(), and NBSLevels< executionSpace >::setDiameterRange().

## nbsLevels_

Vector<NBSLevelType> nbsLevels_

protected

Definition at line 43 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::build(), NBSLevels< executionSpace >::findPairsCount(), NBSLevels< executionSpace >::findParticleLevel(), NBSLevels< executionSpace >::getCellIterator(), NBSLevels< executionSpace >::getCells(), NBSLevels< executionSpace >::initLevels(), NBSLevels< executionSpace >::manageAllocateNext(), and NBSLevels< executionSpace >::nullify().

## sizeRangeLevels_

ViewType1D<realRange, memory_space> sizeRangeLevels_

protected

Definition at line 45 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::findParticleLevel(), and NBSLevels< executionSpace >::setDiameterRange().

## sizeRangeLevelsHost_

ViewType1D<realRange, HostSpace> sizeRangeLevelsHost_

protected

Definition at line 47 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::setDiameterRange().

## maxSizeLevels_

ViewType1D<real, memory_space> maxSizeLevels_

protected

Definition at line 49 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::findParticleLevel(), and NBSLevels< executionSpace >::setDiameterRange().

## maxSizeLevelsHost_

ViewType1D<real, HostSpace> maxSizeLevelsHost_

protected

Definition at line 51 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::initLevels(), and NBSLevels< executionSpace >::setDiameterRange().

## particleLevel_

ViewType1D<int8, memory_space> particleLevel_

protected

Definition at line 53 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::build(), and NBSLevels< executionSpace >::findParticleLevel().

## activeRange_

range activeRange_ {0,0}

protected

Definition at line 55 of file NBSLevels.hpp.

Referenced by NBSLevels< executionSpace >::manageAllocateNext().

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

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