Go to the documentation of this file.
22 #ifndef __NBSLevel0_hpp__
23 #define __NBSLevel0_hpp__
31 template<
typename executionSpace>
70 Kokkos::MDRangePolicy<
72 Kokkos::Schedule<Kokkos::Dynamic>,
118 bool nextOwner =
true)
151 template<
typename PairsContainer>
156 this->
build(activeRange);
167 template<
typename PairsContainer,
typename IncludeFunction>
171 this->
build(activeRange, incld);
178 template<
typename PairsContainer>
199 auto oldCap = pairs.capacity();
201 pairs.increaseCapacityBy(len);
203 INFORMATION<<
"The contact pair container capacity increased from "<<
204 oldCap <<
" to "<<pairs.capacity()<<
" in NBSLevel0."<<
endINFO;
214 template<
typename PairsContainer>
221 {this->
nx(),this->
ny(),this->
nz()} );
223 int32 notInsertedPairs;
225 Kokkos::parallel_reduce (
226 "NBSLevel0::findPairs",
230 }, notInsertedPairs);
232 return notInsertedPairs;
240 #endif // __NBSLevel0_hpp__
INLINE_FUNCTION_HD int32 nz() const
INLINE_FUNCTION_HD ~NBSLevel0()=default
typename MapperType::cellIterator cellIterator
NBSLevel0(const box &domain, real cellSize, const ViewType1D< realx3, memory_space > &position, const ViewType1D< real, memory_space > &diam)
INLINE_FUNCTION_HD int32 nx() const
bool broadSearch(PairsContainer &pairs, range activeRange)
ViewType1D< int32, memory_space > NextType
INLINE_FUNCTION_HD auto sizeRatio() const
INLINE_FUNCTION_HD NBSLevel0 & operator=(const NBSLevel0 &)=default
const auto & domain() const
NBSLevel0(const box &domain, real cellSize, real sizeRatio, const ViewType1D< realx3, memory_space > &position, const ViewType1D< real, memory_space > &diam, bool nextOwner=true)
#define INLINE_FUNCTION_H
typename Cells::CellType CellType
T max(const Vector< T, Allocator > &v)
ViewType3D< int32, memory_space > HeadType
executionSpace execution_space
INLINE_FUNCTION_HD NBSLevel0()
INLINE_FUNCTION_H int32 findPairsCount(PairsContainer &pairs)
INLINE_FUNCTION_HD int32 ny() const
Kokkos::View< T *, properties... > ViewType1D
INLINE_FUNCTION_HD realx3 cellSize() const
INLINE_FUNCTION_H bool findPairs(PairsContainer &pairs)
static INLINE_FUNCTION_HD void Swap(int32 &x, int32 &y)
#define INLINE_FUNCTION_HD
INLINE_FUNCTION_HD auto & diameter()
typename execution_space::memory_space memory_space
NBSLevel0(const box &domain, int32 nx, int32 ny, int32 nz, const ViewType1D< realx3, memory_space > &position, const ViewType1D< real, memory_space > &diam)
INLINE_FUNCTION_H void build(range activeRange)
bool broadSearch(PairsContainer &pairs, range activeRange, IncludeFunction incld)
Kokkos::MDRangePolicy< Kokkos::Rank< 3 >, Kokkos::Schedule< Kokkos::Dynamic >, execution_space > mdrPolicyFindPairs
ViewType1D< real, memory_space > diameter_