www.cemf.ir
wallBoundaryContactSearch.hpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 
21 #ifndef __wallBoundaryContactSearch_hpp__
22 #define __wallBoundaryContactSearch_hpp__
23 
24 
25 #include "contactSearchGlobals.hpp"
27 #include "scatteredFieldAccess.hpp"
28 #include "iBox.hpp"
29 #include "cells.hpp"
30 
31 
32 
33 namespace pFlow
34 {
35 
37 {
38 public:
39 
41 
42  using memory_space = typename execution_space::memory_space;
43 
45 
46 private:
47 
48  // - box extent
50 
51  // - number of triangle elements
53 
54  // - number of points
56 
57  // - ref to vectices (borrowed)
59 
60  // - ref to points in the trisurface (borrowed)
62 
63  // - ref to normal vectors of triangles (borrowed)
65 
66  // cell range of element/triangle bounding box
68 
70 
71 
74  {
77  }
78 
79 public:
80 
81  TypeInfoNV("wallBoundaryContactSearch");
82 
84  wallBoundaryContactSearch()=default;
85 
88  real cellExtent,
89  uint32 numPoints,
91  const ViewType1D<realx3,memory_space>& points,
92  const ViewType1D<uint32x3,memory_space>& vertices,
93  const ViewType1D<realx3, memory_space>& normals);
94 
95 
96 
99  {
100  return numElements_;
101  }
102 
103 
104  bool build(const cells& searchBox, const realx3& transferVec);
105 
106  bool broadSearch(
107  csPairContainerType& pairs,
108  const cells &searchCells,
109  const deviceScatteredFieldAccess<realx3>& thisPoints,
110  const deviceScatteredFieldAccess<real>& thisDiams,
111  const deviceScatteredFieldAccess<realx3>& mirrorPoints,
112  const deviceScatteredFieldAccess<real>& mirroDiams,
113  const realx3& transferVec,
114  real sizeRatio);
115 
117  csPairContainerType &pairs,
118  const cells &searchCells,
119  const deviceScatteredFieldAccess<realx3> &pPoints,
120  const deviceScatteredFieldAccess<real> &pDiams,
121  const realx3 &transferVec,
122  uint baseTriIndex);
123 
124 
125 
126 }; // wallBoundaryContactSearch
127 
128 } // pFlow
129 
130 
131 #endif // __wallBoundaryContactSearch_hpp__
pFlow::wallBoundaryContactSearch
Definition: wallBoundaryContactSearch.hpp:36
pFlow::scatteredFieldAccess
Definition: scatteredFieldAccess.hpp:32
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::wallBoundaryContactSearch::cellExtent_
real cellExtent_
Definition: wallBoundaryContactSearch.hpp:49
pFlow::wallBoundaryContactSearch::execution_space
csExecutionSpace execution_space
Definition: wallBoundaryContactSearch.hpp:40
pFlow::wallBoundaryContactSearch::allocateArrays
FUNCTION_H void allocateArrays()
Definition: wallBoundaryContactSearch.hpp:73
contactSearchFunctions.hpp
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::reallocNoInit
INLINE_FUNCTION_H void reallocNoInit(ViewType1D< Type, Properties... > &view, uint32 len)
Definition: KokkosUtilities.hpp:64
pFlow::wallBoundaryContactSearch::normals_
ViewType1D< realx3, memory_space > normals_
Definition: wallBoundaryContactSearch.hpp:64
pFlow::wallBoundaryContactSearch::vertices_
ViewType1D< uint32x3, memory_space > vertices_
Definition: wallBoundaryContactSearch.hpp:58
pFlow::wallBoundaryContactSearch::TypeInfoNV
TypeInfoNV("wallBoundaryContactSearch")
pFlow::wallBoundaryContactSearch::findPairsElementRangeCount
uint32 findPairsElementRangeCount(csPairContainerType &pairs, const cells &searchCells, const deviceScatteredFieldAccess< realx3 > &pPoints, const deviceScatteredFieldAccess< real > &pDiams, const realx3 &transferVec, uint baseTriIndex)
Definition: wallBoundaryContactSearch.cpp:102
pFlow::unsortedPairs
Definition: unsortedPairs.hpp:32
pFlow
Definition: demGeometry.hpp:27
FUNCTION_H
#define FUNCTION_H
Definition: pFlowMacros.hpp:62
iBox.hpp
pFlow::csExecutionSpace
DefaultExecutionSpace csExecutionSpace
Definition: contactSearchGlobals.hpp:30
pFlow::wallBoundaryContactSearch::wallBoundaryContactSearch
INLINE_FUNCTION_HD wallBoundaryContactSearch()=default
pFlow::wallBoundaryContactSearch::build
bool build(const cells &searchBox, const realx3 &transferVec)
Definition: wallBoundaryContactSearch.cpp:24
contactSearchGlobals.hpp
pFlow::wallBoundaryContactSearch::numElements
INLINE_FUNCTION_HD uint32 numElements() const
Definition: wallBoundaryContactSearch.hpp:98
pFlow::wallBoundaryContactSearch::broadSearch
bool broadSearch(csPairContainerType &pairs, const cells &searchCells, const deviceScatteredFieldAccess< realx3 > &thisPoints, const deviceScatteredFieldAccess< real > &thisDiams, const deviceScatteredFieldAccess< realx3 > &mirrorPoints, const deviceScatteredFieldAccess< real > &mirroDiams, const realx3 &transferVec, real sizeRatio)
Definition: wallBoundaryContactSearch.cpp:50
pFlow::ViewType1D
Kokkos::View< T *, properties... > ViewType1D
1D veiw as a vector
Definition: KokkosTypes.hpp:93
pFlow::wallBoundaryContactSearch::elementBox_
ViewType1D< iBoxType, memory_space > elementBox_
Definition: wallBoundaryContactSearch.hpp:67
pFlow::wallBoundaryContactSearch::numElements_
uint32 numElements_
Definition: wallBoundaryContactSearch.hpp:52
pFlow::wallBoundaryContactSearch::memory_space
typename execution_space::memory_space memory_space
Definition: wallBoundaryContactSearch.hpp:42
pFlow::iBox
Definition: iBox.hpp:33
pFlow::cells
Definition: cells.hpp:31
INLINE_FUNCTION_HD
#define INLINE_FUNCTION_HD
Definition: pFlowMacros.hpp:55
pFlow::triple< real >
pFlow::wallBoundaryContactSearch::validBox_
ViewType1D< uint8, memory_space > validBox_
Definition: wallBoundaryContactSearch.hpp:69
scatteredFieldAccess.hpp
pFlow::wallBoundaryContactSearch::points_
ViewType1D< realx3, memory_space > points_
Definition: wallBoundaryContactSearch.hpp:61
pFlow::wallBoundaryContactSearch::numPoints_
uint32 numPoints_
Definition: wallBoundaryContactSearch.hpp:55