Go to the documentation of this file.
21 #ifndef __cellsWallLevel0_hpp__
22 #define __cellsWallLevel0_hpp__
35 typename executionSpace
82 Kokkos::Schedule<Kokkos::Dynamic>,
83 Kokkos::IndexType<int32>
87 Kokkos::RangePolicy<TagFindCellRange2, execution_space, Kokkos::IndexType<int32>>;
105 const Cells& ppCells,
158 template<
typename PairsContainer,
typename particleMapType>
159 bool broadSearch(PairsContainer& pairs, particleMapType& particleMap)
172 Kokkos::parallel_for(
173 "cellsSimple::findcellrange2",
180 template<
typename PairsContainer,
typename particleMapType>
196 auto oldCap = pairs.capacity();
197 pairs.increaseCapacityBy(len);
199 INFORMATION<<
"Contact pair container capacity increased from "<<
201 << pairs.capacity() <<
" in cellsWallLevel0."<<
endINFO;
211 template<
typename PairsContainer,
typename CellIteratorType>
216 const auto pwPairs = pairs;
219 Kokkos::parallel_reduce(
220 "cellsSimple::findPairsElementRangeModified2",
223 const typename tpPWContactSearch::member_type & teamMember,
224 int32& valueToUpdate){
226 const int32 iTri = teamMember.league_rank();
233 int32 numCellBox = bExtent.x()*bExtent.y()*bExtent.z();
235 Kokkos::parallel_reduce(
236 Kokkos::TeamThreadRange( teamMember, numCellBox ),
237 [&] (
const int32 linIndex,
int32 &innerUpdate )
243 int32 n = cellIter.start(cell.x(),cell.y(),cell.z());
248 if( pairs.insert(
static_cast<IdType>(
n), iTri) < 0 )
250 n = cellIter.getNext(
n);
257 if ( teamMember.team_rank() == 0 ) valueToUpdate += getFull2;
285 #endif // __cellsWallLevel0_hpp__
INLINE_FUNCTION_HD cellsWallLevel0()
Kokkos::RangePolicy< TagFindCellRange2, execution_space, Kokkos::IndexType< int32 > > rpFindCellRange2Type
ViewType1D< iBoxType, memory_space > elementBox_
INLINE_FUNCTION_HD void indexToCell(const indexType idx, const triple< cellIndexType > &extent, triple< cellIndexType > &cell)
bool broadSearch(PairsContainer &pairs, particleMapType &particleMap)
typename Cells::CellType CellType
INLINE_FUNCTION_HD void extendBox(const CellType &p1, const CellType &p2, const CellType &p3, int32 extent, CellType &minP, CellType &maxP) const
INLINE_FUNCTION_H void reallocNoInit(ViewType1D< Type, Properties... > &view, int32 len)
ViewType1D< realx3, memory_space > points_
INLINE_FUNCTION_HD int32 numElements() const
triple< indexType > CellType
bool particleWallFindPairs(PairsContainer &pairs, particleMapType &particleMap)
executionSpace execution_space
TypeInfoNV("cellsWallLevel0")
iBox< IndexType > iBoxType
bool resetElements(int32 numElements, int32 numPoints, ViewType1D< realx3, memory_space > &points, ViewType1D< int32x3, memory_space > &vertices)
INLINE_FUNCTION_HD iBoxType elementBox(int32 i) const
typename execution_space::memory_space memory_space
INLINE_FUNCTION_HD void operator()(TagFindCellRange2, int32 i) const
INLINE_FUNCTION_HD triple< cellIndexType > boxExtent(const iBox< cellIndexType > &box)
Kokkos::TeamPolicy< execution_space, Kokkos::Schedule< Kokkos::Dynamic >, Kokkos::IndexType< int32 > > tpPWContactSearch
T max(const Vector< T, Allocator > &v)
int32 findPairsElementRangeCount(PairsContainer &pairs, CellIteratorType cellIter)
Kokkos::View< T *, properties... > ViewType1D
#define INLINE_FUNCTION_HD
INLINE_FUNCTION_HD CellType pointIndex(const realx3 &p) const
FUNCTION_H cellsWallLevel0(const Cells &ppCells, real cellExtent, int32 numPoints, int32 numElements, const ViewType1D< realx3, memory_space > &points, const ViewType1D< int32x3, memory_space > &vertices)
ViewType1D< int32x3, memory_space > vertices_
FUNCTION_H void allocateArrays()