www.cemf.ir
pointSorting.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 #include "pointSorting.hpp"
22 #include "mortonIndexing.hpp"
23 
25 :
26  performSorting_(dict.getValOrSet("active", Logical(false))),
27  timeControl_(
28  performSorting_()?
29  baseTimeControl(dict, "sorting"):
30  baseTimeControl(0,1,1, "sorting")
31  ),
32  dx_(
33  performSorting_()?
34  dict.getVal<real>("dx"):
35  1.0
36  )
37 {
38  if( performSorting_() )
39  REPORT(2)<<"Point sorting is "<<Yellow_Text("active")<<" in simulation"<<END_REPORT;
40  else
41  REPORT(2)<<"Point sorting is "<<Yellow_Text("inactive")<<" in simulation"<<END_REPORT;
42 
43 }
46  const box& boundingBox,
47  const ViewType1D<realx3> &pos,
48  const pFlagTypeDevice &flag
49 ) const
50 {
51  return pFlow::getSortedIndices(boundingBox, dx_, pos, flag);
52 }
pointSorting.hpp
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::pointSorting::getSortedIndices
uint32IndexContainer getSortedIndices(const box &boundingBox, const ViewType1D< realx3 > &pos, const pFlagTypeDevice &flag) const
Definition: pointSorting.cpp:45
REPORT
#define REPORT(n)
Definition: streams.hpp:39
Yellow_Text
#define Yellow_Text(text)
Definition: iOstream.hpp:40
pFlow::getSortedIndices
uint32IndexContainer getSortedIndices(box boundingBox, real dx, const ViewType1D< realx3 > &pos, const pFlagTypeDevice &flag)
Definition: mortonIndexing.cpp:24
pFlow::pointSorting::pointSorting
pointSorting(const dictionary &dict)
Definition: pointSorting.cpp:24
pFlow::baseTimeControl
Definition: baseTimeControl.hpp:29
END_REPORT
#define END_REPORT
Definition: streams.hpp:40
pFlow::ViewType1D
Kokkos::View< T *, properties... > ViewType1D
1D veiw as a vector
Definition: KokkosTypes.hpp:93
pFlow::Logical
Holds a bool value and converts strings to bool.
Definition: Logical.hpp:39
pFlow::box
Definition: box.hpp:32
mortonIndexing.hpp
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::indexContainer
It holds two vectors of indecis on Host and Device.
Definition: indexContainer.hpp:39
pFlow::pointSorting::performSorting_
Logical performSorting_
Definition: pointSorting.hpp:38