Go to the documentation of this file.
35 box domainBox = domainCells_.domainBox();
40 lastCheckForBox_ = buildCount_;
51 minP =
max( minP - enlargementFactor_*cellSize, domainBox.
minPoint());
52 maxP =
min( maxP + enlargementFactor_*cellSize, domainBox.
maxPoint());
54 box searchBox = {minP, maxP};
55 searchCells_ =
cells(searchBox, cellSize);
56 INFORMATION<<
"Search box for contact search has changed: "<<
57 "search box is ["<<searchCells_.domainBox().minPoint()<<
58 " "<<searchCells_.domainBox().maxPoint()<<
"]"<<
END_INFO;
65 searchCells_ =
cells(domainBox, cellSize);
84 auto newCap = nextRng.
end();
86 if( nextCapacity_ < newCap)
88 nextCapacity_ = newCap;
89 if(!nextOwner_)
return;
101 if(!nextOwner_)
return;
102 fill(next_, nextRng, NoPos);
114 domainCells_(
domain, cellSize),
115 searchCells_(
domain, cellSize),
116 adjustableBox_(adjustableBox),
117 nextOwner_(nextOwner)
128 bool& searchBoxChanged
133 if(adjustableBox_ && buildCount_%checkInterval_ == 0)
136 if(searchBoxChanged =
137 setSearchBox(pointPos, flags, searchCells_.cellSize());searchBoxChanged)
139 allocateArrays(aRange);
145 checkAllocateNext(aRange);
161 setSearchBox(pointPos, flags, searchCells_.cellSize());
163 searchBoxChanged =
true;
188 searchBoxChanged =
false;
bool buildLists(const cells &searchCell, const deviceViewType3D< uint32 > &head, const deviceViewType1D< uint32 > &next, const deviceViewType1D< realx3 > &points, const pFlagTypeDevice &flags)
INLINE_FUNCTION_HD mapperNBS()=default
INLINE_FUNCTION_H void reallocFill(ViewType1D< Type, Properties... > &view, uint32 len, Type val)
void allocateArrays(rangeU32 nextRng)
INLINE_FUNCTION_HD int32 nz() const
void fill(Vector< T, Allocator > &vec, const T &val)
INLINE_FUNCTION_HD int32 ny() const
bool build(const deviceViewType1D< realx3 > &pointPos, const pFlagTypeDevice &flags, bool &searchBoxChanged)
INLINE_FUNCTION_HD T & end()
End.
INLINE_FUNCTION_H Type max(const Type *first, uint32 numElems)
INLINE_FUNCTION_H Type min(const Type *first, int32 numElems)
INLINE_FUNCTION_H void reallocNoInit(ViewType1D< Type, Properties... > &view, uint32 len)
bool setSearchBox(const deviceViewType1D< realx3 > &pointPos, const pFlagTypeDevice &flags, real cellSize)
INLINE_FUNCTION_HD int32 nx() const
void findPointExtends(const deviceViewType1D< realx3 > &points, const pFlagTypeDevice &flags, realx3 &minPoint, realx3 &maxPoint)
static constexpr uint32 NoPos
iOstream & endl(iOstream &os)
Add newline and flush stream.
const INLINE_FUNCTION_HD realx3 & maxPoint() const
Kokkos::View< T * > deviceViewType1D
1D array (vector) with default device (memory space and execution space)
void nullifyNext(rangeU32 nextRng)
static real enlargementFactor_
bool buildListsReduce(const cells &searchCell, const deviceViewType3D< uint32 > &head, const deviceViewType1D< uint32 > &next, const deviceViewType1D< realx3 > &points, const pFlagTypeDevice &flags)
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
const INLINE_FUNCTION_HD auto & activeRange() const
static uint32 checkInterval_
const INLINE_FUNCTION_HD realx3 & minPoint() const
void checkAllocateNext(rangeU32 nextRng)