# PhasicFlow: src/Interaction/contactSearch/methods/particleWallContactSearchs.hpp 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.

particleWallContactSearchs.hpp
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.
-----------------------------------------------------------------------------*/
#ifndef __particleWallContactSearchs_hpp__
#define __particleWallContactSearchs_hpp__
#include "pointFlag.hpp"
#include "contactSearchGlobals.hpp"
#include "box.hpp"
namespace pFlow
{
template<typename method>
class particleWallContactSearchs
{
public:
using MethodType = method;
using IndexType = uint32;
using execution_space = DefaultExecutionSpace;
using memory_space = typename execution_space::memory_space;
private:
// friend
friend MethodType;
box domainBox_;
protected:
inline
auto& getMethod()
{
return static_cast< MethodType&>(*this);
}
inline
const auto& getMethod()const
{
return static_cast<const MethodType&>(*this);
}
public:
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
);
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
);
real sizeRatio()const
{
return getMethod().sizeRatio();
}
real cellExtent()const
{
return getMethod().cellExtent();
}
};
} // pFlow
#include "particleWallContactSearchs.cpp"
#endif //__particleWallContactSearchs_hpp__
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::particleWallContactSearchs< NBS >::IndexType
uint32 IndexType
Definition: particleWallContactSearchs.hpp:37
pFlow::particleWallContactSearchs
Definition: particleWallContactSearchs.hpp:31
pFlow::particleWallContactSearchs::domainBox_
box domainBox_
box enclosing the simulation domain (local to processor)
Definition: particleWallContactSearchs.hpp:49
pFlow::particleWallContactSearchs::MethodType
friend MethodType
Definition: particleWallContactSearchs.hpp:46
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::particleWallContactSearchs< NBS >::memory_space
typename execution_space::memory_space memory_space
Definition: particleWallContactSearchs.hpp:41
box.hpp
pFlow::particleWallContactSearchs::getMethod
auto & getMethod()
Definition: particleWallContactSearchs.hpp:54
pFlow::DefaultExecutionSpace
Kokkos::DefaultExecutionSpace DefaultExecutionSpace
Default execution space, it can be device exe.
Definition: KokkosTypes.hpp:61
pFlow::particleWallContactSearchs< NBS >::execution_space
DefaultExecutionSpace execution_space
Definition: particleWallContactSearchs.hpp:39
pFlow::particleWallContactSearchs::sizeRatio
real sizeRatio() const
Definition: particleWallContactSearchs.hpp:90
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::particleWallContactSearchs::cellExtent
real cellExtent() const
Definition: particleWallContactSearchs.hpp:95
pFlow::particleWallContactSearchs::getMethod
const auto & getMethod() const
Definition: particleWallContactSearchs.hpp:60
contactSearchGlobals.hpp
particleWallContactSearchs.cpp
pFlow::NBS
Definition: NBS.hpp:34
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 >
pointFlag.hpp
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