www.cemf.ir
particleWallContactSearchs.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 __particleWallContactSearchs_hpp__
22 #define __particleWallContactSearchs_hpp__
23 
24 #include "pointFlag.hpp"
25 #include "contactSearchGlobals.hpp"
26 #include "box.hpp"
27 
28 namespace pFlow
29 {
30 template<typename method>
32 {
33 public:
34 
35  using MethodType = method;
36 
37  using IndexType = uint32;
38 
40 
41  using memory_space = typename execution_space::memory_space;
42 
43 private:
44 
45  // friend
46  friend MethodType;
47 
50 
51 protected:
52 
53  inline
54  auto& getMethod()
55  {
56  return static_cast<MethodType&>(*this);
57  }
58 
59  inline
60  const auto& getMethod()const
61  {
62  return static_cast<const MethodType&>(*this);
63  }
64 
65 public:
66 
68  const dictionary& dict,
69  const box& domain,
70  real minSize,
71  real maxSize,
72  const ViewType1D<realx3, memory_space>& position,
73  const pFlagTypeDevice &flags,
75  );
76 
77  bool broadSearch
78  (
79  uint32 iter,
80  real t,
81  real dt,
82  csPairContainerType& ppPairs,
83  csPairContainerType& pwPairs,
84  const deviceViewType1D<realx3>& pointPos,
85  const pFlagTypeDevice& flags,
86  const deviceViewType1D<real>& diameter,
87  bool force = false
88  );
89 
90  real sizeRatio()const
91  {
92  return getMethod().sizeRatio();
93  }
94 
96  {
97  return getMethod().cellExtent();
98  }
99 
100 };
101 
102 
103 } // pFlow
104 
106 
107 #endif //__particleWallContactSearchs_hpp__
pFlow::particleWallContactSearchs::broadSearch
bool broadSearch(uint32 iter, real t, real dt, csPairContainerType &ppPairs, csPairContainerType &pwPairs, const deviceViewType1D< realx3 > &pointPos, const pFlagTypeDevice &flags, const deviceViewType1D< real > &diameter, bool force=false)
Definition: particleWallContactSearchs.cpp:39
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::particleWallContactSearchs< NBS >::IndexType
uint32 IndexType
Definition: particleWallContactSearchs.hpp:37
pFlow::particleWallContactSearchs
Definition: particleWallContactSearchs.hpp:31
pFlow::particleWallContactSearchs::domainBox_
box domainBox_
box enclosing the simulation domain (local to processor)
Definition: particleWallContactSearchs.hpp:49
pFlow::particleWallContactSearchs::MethodType
friend MethodType
Definition: particleWallContactSearchs.hpp:46
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::particleWallContactSearchs< NBS >::memory_space
typename execution_space::memory_space memory_space
Definition: particleWallContactSearchs.hpp:41
box.hpp
pFlow::particleWallContactSearchs::getMethod
auto & getMethod()
Definition: particleWallContactSearchs.hpp:54
pFlow::DefaultExecutionSpace
Kokkos::DefaultExecutionSpace DefaultExecutionSpace
Default execution space, it can be device exe.
Definition: KokkosTypes.hpp:61
pFlow::particleWallContactSearchs< NBS >::execution_space
DefaultExecutionSpace execution_space
Definition: particleWallContactSearchs.hpp:39
pFlow::particleWallContactSearchs::sizeRatio
real sizeRatio() const
Definition: particleWallContactSearchs.hpp:90
pFlow::deviceViewType1D
Kokkos::View< T * > deviceViewType1D
1D array (vector) with default device (memory space and execution space)
Definition: KokkosTypes.hpp:121
pFlow::unsortedPairs
Definition: unsortedPairs.hpp:32
pFlow
Definition: demGeometry.hpp:27
pFlow::particleWallContactSearchs::cellExtent
real cellExtent() const
Definition: particleWallContactSearchs.hpp:95
pFlow::particleWallContactSearchs::getMethod
const auto & getMethod() const
Definition: particleWallContactSearchs.hpp:60
contactSearchGlobals.hpp
particleWallContactSearchs.cpp
pFlow::NBS
Definition: NBS.hpp:34
pFlow::ViewType1D
Kokkos::View< T *, properties... > ViewType1D
1D veiw as a vector
Definition: KokkosTypes.hpp:93
pFlow::box
Definition: box.hpp:32
pFlow::domain
Definition: domain.hpp:31
pFlow::dictionary
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
Definition: dictionary.hpp:67
pFlow::pointFlag< DefaultExecutionSpace >
pointFlag.hpp
pFlow::particleWallContactSearchs::particleWallContactSearchs
particleWallContactSearchs(const dictionary &dict, const box &domain, real minSize, real maxSize, const ViewType1D< realx3, memory_space > &position, const pFlagTypeDevice &flags, const ViewType1D< real, memory_space > &diam)
Definition: particleWallContactSearchs.cpp:24