contactSearch.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 
22 #ifndef __contactSearch_hpp__
23 #define __contactSearch_hpp__
24 
25 
26 #include "interactionBase.hpp"
27 #include "unsortedPairs.hpp"
28 #include "box.hpp"
29 #include "dictionary.hpp"
30 
31 namespace pFlow
32 {
33 
34 
36 :
37  public interactionBase
38 {
39 public:
40  using IdType = typename interactionBase::IdType;
41 
43 
45 
47 
48 protected:
49 
50  const box& domain_;
51 
53 
55 
57 
58  auto& dict()
59  {
60  return dict_;
61  }
62 
63 public:
64 
65  TypeInfo("contactSearch");
66 
68  const dictionary& dict,
69  const box& domain,
70  const particles& prtcl,
71  const geometry& geom,
72  Timers& timers);
73 
74  virtual ~contactSearch()=default;
75 
76 
78  (
80  dictionary,
81  (
82  const dictionary& dict,
83  const box& domain,
84  const particles& prtcl,
85  const geometry& geom,
86  Timers& timers
87  ),
88  (dict, domain, prtcl, geom, timers)
89  );
90 
91  const auto& domain()const
92  {
93  return domain_;
94  }
95 
96  const auto& dict()const
97  {
98  return dict_;
99  }
100 
101 
102  virtual
103  bool broadSearch(
104  PairContainerType& ppPairs,
105  PairContainerType& pwPairs,
106  bool force = false) = 0;
107 
108  virtual
109  bool ppEnterBroadSearch()const = 0;
110 
111  virtual
112  bool pwEnterBroadSearch()const = 0;
113 
114  virtual
115  bool ppPerformedBroadSearch()const = 0;
116 
117  virtual
118  bool pwPerformedBroadSearch()const = 0;
119 
120 
121  static
123  const dictionary& dict,
124  const box& domain,
125  const particles& prtcl,
126  const geometry& geom,
127  Timers& timers);
128 
129 };
130 
131 
132 }
133 
134 
135 #endif //__ContactSearch_hpp__
pFlow::contactSearch::dict
const auto & dict() const
Definition: contactSearch.hpp:96
pFlow::interactionBase::IndexType
CELL_INDEX_TYPE IndexType
Definition: interactionBase.hpp:35
pFlow::contactSearch::broadSearch
virtual bool broadSearch(PairContainerType &ppPairs, PairContainerType &pwPairs, bool force=false)=0
pFlow::interactionBase::IdType
ID_TYPE IdType
Definition: interactionBase.hpp:37
pFlow::contactSearch::pwEnterBroadSearch
virtual bool pwEnterBroadSearch() const =0
pFlow::contactSearch::domain
const auto & domain() const
Definition: contactSearch.hpp:91
pFlow::contactSearch::PairContainerType
unsortedPairs< ExecutionSpace, IdType > PairContainerType
Definition: contactSearch.hpp:46
box.hpp
pFlow::contactSearch::ExecutionSpace
typename interactionBase::ExecutionSpace ExecutionSpace
Definition: contactSearch.hpp:44
pFlow::Timers
Definition: Timers.hpp:33
pFlow::contactSearch::ppEnterBroadSearch
virtual bool ppEnterBroadSearch() const =0
pFlow::interactionBase::ExecutionSpace
DefaultExecutionSpace ExecutionSpace
Definition: interactionBase.hpp:39
pFlow::unsortedPairs
Definition: unsortedPairs.hpp:32
interactionBase.hpp
pFlow
Definition: demComponent.hpp:28
pFlow::contactSearch::sphereWallTimer_
Timer sphereWallTimer_
Definition: contactSearch.hpp:56
pFlow::contactSearch::dict
auto & dict()
Definition: contactSearch.hpp:58
pFlow::particles
Definition: particles.hpp:33
pFlow::Timer
Definition: Timer.hpp:39
dictionary.hpp
pFlow::contactSearch::sphereSphereTimer_
Timer sphereSphereTimer_
Definition: contactSearch.hpp:54
pFlow::contactSearch::pwPerformedBroadSearch
virtual bool pwPerformedBroadSearch() const =0
unsortedPairs.hpp
pFlow::interactionBase
Definition: interactionBase.hpp:31
pFlow::contactSearch::IndexType
typename interactionBase::IndexType IndexType
Definition: contactSearch.hpp:42
pFlow::contactSearch::create_vCtor
create_vCtor(contactSearch, dictionary,(const dictionary &dict, const box &domain, const particles &prtcl, const geometry &geom, Timers &timers),(dict, domain, prtcl, geom, timers))
pFlow::contactSearch::IdType
typename interactionBase::IdType IdType
Definition: contactSearch.hpp:40
pFlow::contactSearch
Definition: contactSearch.hpp:35
pFlow::contactSearch::TypeInfo
TypeInfo("contactSearch")
pFlow::contactSearch::create
static uniquePtr< contactSearch > create(const dictionary &dict, const box &domain, const particles &prtcl, const geometry &geom, Timers &timers)
Definition: contactSearch.cpp:42
pFlow::contactSearch::domain_
const box & domain_
Definition: contactSearch.hpp:50
pFlow::box
Definition: box.hpp:32
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::geometry
Definition: geometry.hpp:37
pFlow::contactSearch::~contactSearch
virtual ~contactSearch()=default
pFlow::contactSearch::contactSearch
contactSearch(const dictionary &dict, const box &domain, const particles &prtcl, const geometry &geom, Timers &timers)
Definition: contactSearch.cpp:25
pFlow::contactSearch::ppPerformedBroadSearch
virtual bool ppPerformedBroadSearch() const =0
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::contactSearch::dict_
dictionary dict_
Definition: contactSearch.hpp:52