# PhasicFlow: src/phasicFlow/structuredData/pointStructure/pointStructure/pointSorting/pointSorting.cpp Source File
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

pointSorting.cpp
Go to the documentation of this file.
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#include "pointSorting.hpp"
#include "mortonIndexing.hpp"
pFlow::pointSorting::pointSorting(const dictionary & dict)
:
performSorting_(dict.getValOrSet("active", Logical(false))),
timeControl_(
performSorting_()?
baseTimeControl(dict, "sorting"):
baseTimeControl(0,1,1, "sorting")
),
dx_(
performSorting_()?
dict.getVal<real>("dx"):
1.0
)
{
if( performSorting_() )
REPORT(2)<<"Point sorting is "<<Yellow_Text("active")<<" in simulation"<<END_REPORT;
else
REPORT(2)<<"Point sorting is "<<Yellow_Text("inactive")<<" in simulation"<<END_REPORT;
}
pFlow::uint32IndexContainer
pFlow::pointSorting::getSortedIndices(
const box& boundingBox,
const ViewType1D<realx3> &pos,
const pFlagTypeDevice &flag
) const
{
return pFlow::getSortedIndices(boundingBox, dx_, pos, flag);
}
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