www.cemf.ir
ppwBndryContactSearch.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 __ppwBndryContactSearch_hpp__
22 #define __ppwBndryContactSearch_hpp__
23 
24 #include "contactSearchGlobals.hpp"
25 #include "scatteredFieldAccess.hpp"
26 #include "cells.hpp"
27 
28 namespace pFlow
29 {
30 
32 {
33 public:
35 
37 
38 private:
39 
41 
42  HeadType head_{ "periodic::head", 1, 1, 1 };
43 
44  NextType next_{ "periodic::next", 1 };
45 
47 
49 
51 
52  void nullifyHead();
53 
54  void nullifyNext(uint32 n);
55 
56  void buildList(
58 
59 public:
61  const box &domain,
62  real cellSize,
63  real sizeRatio = 1.0);
64 
65  bool broadSearchPP(
66  csPairContainerType &ppPairs,
69  const deviceScatteredFieldAccess<realx3> &mirrorPoints,
70  const deviceScatteredFieldAccess<real> &mirrorDiams,
71  const realx3 &transferVec);
72 
73  const auto& searchCells()const
74  {
75  return searchCells_;
76  }
77 
78  real sizeRatio()const
79  {
80  return sizeRatio_;
81  }
82 };
83 
84 }
85 
86 #endif //__ppwBndryContactSearch_hpp__
pFlow::ppwBndryContactSearch::sizeRatio_
real sizeRatio_
Definition: ppwBndryContactSearch.hpp:46
pFlow::scatteredFieldAccess
Definition: scatteredFieldAccess.hpp:32
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::ppwBndryContactSearch::broadSearchPP
bool broadSearchPP(csPairContainerType &ppPairs, const deviceScatteredFieldAccess< realx3 > &points, const deviceScatteredFieldAccess< real > &diams, const deviceScatteredFieldAccess< realx3 > &mirrorPoints, const deviceScatteredFieldAccess< real > &mirrorDiams, const realx3 &transferVec)
Definition: ppwBndryContactSearch.cpp:58
pFlow::ppwBndryContactSearch::searchCells_
cells searchCells_
Definition: ppwBndryContactSearch.hpp:40
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::ppwBndryContactSearch::head_
HeadType head_
Definition: ppwBndryContactSearch.hpp:42
pFlow::ppwBndryContactSearch::nextCapacity_
uint32 nextCapacity_
Definition: ppwBndryContactSearch.hpp:48
pFlow::ppwBndryContactSearch::ppwBndryContactSearch
ppwBndryContactSearch(const box &domain, real cellSize, real sizeRatio=1.0)
Definition: ppwBndryContactSearch.cpp:44
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::ppwBndryContactSearch::next_
NextType next_
Definition: ppwBndryContactSearch.hpp:44
pFlow::ppwBndryContactSearch::NextType
deviceViewType1D< uint32 > NextType
Definition: ppwBndryContactSearch.hpp:36
contactSearchGlobals.hpp
pFlow::deviceViewType3D
Kokkos::View< T ***, Layout, void > deviceViewType3D
3D view on device as an array on device
Definition: KokkosTypes.hpp:129
pFlow::ppwBndryContactSearch::buildList
void buildList(const deviceScatteredFieldAccess< realx3 > &points)
Definition: ppwBndryContactSearch.cpp:26
pFlow::ppwBndryContactSearch::HeadType
deviceViewType3D< uint32 > HeadType
Definition: ppwBndryContactSearch.hpp:34
pFlow::ppwBndryContactSearch
Definition: ppwBndryContactSearch.hpp:31
pFlow::ppwBndryContactSearch::nullifyHead
void nullifyHead()
Definition: ppwBndryContactSearch.cpp:16
n
uint32 n
Definition: NBSLoop.hpp:24
pFlow::ppwBndryContactSearch::checkAllocateNext
void checkAllocateNext(uint32 n)
Definition: ppwBndryContactSearch.cpp:7
pFlow::box
Definition: box.hpp:32
pFlow::ppwBndryContactSearch::sizeRatio
real sizeRatio() const
Definition: ppwBndryContactSearch.hpp:78
pFlow::domain
Definition: domain.hpp:31
pFlow::cells
Definition: cells.hpp:31
pFlow::triple< real >
scatteredFieldAccess.hpp
pFlow::ppwBndryContactSearch::nullifyNext
void nullifyNext(uint32 n)
Definition: ppwBndryContactSearch.cpp:21
pFlow::ppwBndryContactSearch::searchCells
const auto & searchCells() const
Definition: ppwBndryContactSearch.hpp:73