Go to the documentation of this file.
34 cellExtent_(
max(cellExtent, 0.5 ) ),
35 numElements_(numElements),
36 numPoints_(numPoints),
54 numElements_ = numElements;
55 numPoints_ = numPoints;
68 const cells& searchBox,
78 this->build(searchBox);
80 this->particleWallFindPairs(pairs, particleMap, pPoints, pDiams, sizeRatio);
94 "pFlow::cellsWallLevel0::build",
99 auto p1 = points[v.x()];
100 auto p2 = points[v.y()];
101 auto p3 = points[v.z()];
106 searchBox.
extendBox(p1, p2, p3, cellExtent, minP, maxP);
129 getFull = findPairsElementRangeCount(pairs, particleMap, pPoints, pDiams, sizeRatio);
139 INFORMATION<<
"Contact pair container capacity increased from "<<
161 const auto& elementBox = elementBox_;
162 const auto& normals = normals_;
163 const auto& points = points_;
164 const auto& vertices = vertices_;
165 const auto cellExtent = cellExtent_;
167 Kokkos::parallel_reduce(
168 "pFlow::cellsWallLevel0::findPairsElementRangeCount",
171 const typename tpPWContactSearch::member_type & teamMember,
174 const uint32 iTri = teamMember.league_rank();
176 const auto triBox = elementBox[iTri];
179 points[vertices[iTri].x()]);
184 uint32 numCellBox = bExtent.x()*bExtent.y()*bExtent.z();
186 Kokkos::parallel_reduce(
187 Kokkos::TeamThreadRange( teamMember, numCellBox ),
196 while(
n != particleMap.
NoPos)
199 if(
abs(triPlane.pointFromPlane(pPoints[
n]))< pDiams[
n]*sizeRatio*cellExtent)
215 if ( teamMember.team_rank() == 0 ) valueToUpdate += getFull2;
INLINE_FUNCTION_HD uint32 next(uint32 n) const
INLINE_FUNCTION_HD cellsWallLevel0()
INLINE_FUNCTION_HD uint32 capacity() const
ViewType1D< iBoxType, memory_space > elementBox_
INLINE_FUNCTION_H Type max(const Type *first, uint32 numElems)
INLINE_FUNCTION_HD void indexToCell(const indexType idx, const triple< cellIndexType > &extent, triple< cellIndexType > &cell)
INLINE_FUNCTION_HD uint32 insert(idType i, idType j) const
T max(const internalField< T, MemorySpace > &iField)
ViewType1D< realx3, memory_space > points_
INLINE_FUNCTION_HD void extendBox(const realx3 &p1, const realx3 &p2, const realx3 &p3, real extent, realx3 &minP, realx3 &maxP) const
Kokkos::View< T * > deviceViewType1D
1D array (vector) with default device (memory space and execution space)
Kokkos::TeamPolicy< execution_space, Kokkos::Schedule< Kokkos::Dynamic >, Kokkos::IndexType< uint32 > > tpPWContactSearch
INLINE_FUNCTION_HD T & y()
access component
INLINE_FUNCTION_H void increaseCapacityBy(uint32 len)
increase the capacity of the container by at-least len the content will be erased.
INLINE_FUNCTION_HD triple< cellIndexType > boxExtent(const iBox< cellIndexType > &box)
INLINE_FUNCTION_HD uint32 start(int32 i, int32 j, int32 k) const
Vector< T, Allocator > abs(const Vector< T, Allocator > &v)
INLINE_FUNCTION_HD T & z()
access component
Kokkos::View< T *, properties... > ViewType1D
1D veiw as a vector
INLINE_FUNCTION_HD iBoxType elementBox(uint32 i) const
INLINE_FUNCTION_HD int32x3 pointIndex(const realx3 &p) const
static constexpr uint32 NoPos
int32 findPairsElementRangeCount(csPairContainerType &pairs, const mapperNBS::CellIterator &particleMap, const deviceViewType1D< realx3 > &pPoints, const deviceViewType1D< real > &pDiams, real sizeRatio)
Kokkos::RangePolicy< Kokkos::DefaultExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< pFlow::uint32 > > deviceRPolicyStatic
bool build(const cells &searchBox)
INLINE_FUNCTION_HD T & x()
access component
bool resetElements(uint32 numElements, uint32 numPoints, const ViewType1D< realx3, memory_space > &points, const ViewType1D< uint32x3, memory_space > &vertices, const ViewType1D< realx3, memory_space > &normals)
bool broadSearch(csPairContainerType &pairs, const cells &searchBox, const mapperNBS::CellIterator &particleMap, const deviceViewType1D< realx3 > &pPoints, const deviceViewType1D< real > &pDiams, real sizeRatio)
ViewType1D< uint32x3, memory_space > vertices_
bool particleWallFindPairs(csPairContainerType &pairs, const mapperNBS::CellIterator &particleMap, const deviceViewType1D< realx3 > &pPoints, const deviceViewType1D< real > &pDiams, real sizeRatio)