www.cemf.ir
particleWallContactSearchs.cpp
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 template <typename method>
24 (
25  const dictionary &dict,
26  const box &domain,
27  real minSize,
28  real maxSize,
29  const ViewType1D<realx3, memory_space> &position,
30  const pFlagTypeDevice &flags,
32 )
33 :
34  domainBox_(domain)
35 {}
36 
37 template <typename method>
39 (
40  uint32 iter,
41  real t,
42  real dt,
43  csPairContainerType& ppPairs,
44  csPairContainerType& pwPairs,
45  const deviceViewType1D<realx3>& pointPos,
46  const pFlagTypeDevice& flags,
47  const deviceViewType1D<real>& diameter,
48  bool force
49 )
50 {
51 
52  if(!getMethod().impl_broadSearch(
53  ppPairs,
54  pwPairs,
55  pointPos,
56  flags,
57  diameter))
58  {
60  "Error in performing particle-particle broadSearch in method"<<
61  getMethod().typeName()<<endl;
62  return false;
63  }
64 
65  return true;
66 }
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::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::endl
iOstream & endl(iOstream &os)
Add newline and flush stream.
Definition: iOstream.hpp:341
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
fatalErrorInFunction
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
Definition: error.hpp:77
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 >
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