# PhasicFlow: src/Particles/Insertion/collisionCheck/collisionCheck.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.

collisionCheck.hpp
Go to the documentation of this file.
#ifndef __collisionCheck_hpp__
#define __collisionCheck_hpp__
#include "Vectors.hpp"
#include "VectorSingles.hpp"
#include "box.hpp"
namespace pFlow
{
class collisionCheck
{
private:
box searchBox_;
real dx_;
int32x3 nCells_;
const realx3Vector& position_;
const realVector& diameters_;
uint32Vector next_;
ViewType3D<uint32, HostSpace> head_;
int32x3 pointIndex(const realx3& p)const
{
return int32x3( (p - searchBox_.minPoint())/dx_ );
}
bool build();
public:
collisionCheck(
box sBox,
real dx,
const realx3Vector& pos,
const realVector& diam
);
bool checkPoint(const realx3& p, const real d)const;
bool mapLastAddedParticle();
};
}
#endif //__collisionCheck_hpp__
pFlow::collisionCheck::build
bool build()
Definition: collisionCheck.cpp:4
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::collisionCheck
Definition: collisionCheck.hpp:13
pFlow::collisionCheck::collisionCheck
collisionCheck(box sBox, real dx, const realx3Vector &pos, const realVector &diam)
Definition: collisionCheck.cpp:25
pFlow::collisionCheck::head_
ViewType3D< uint32, HostSpace > head_
Definition: collisionCheck.hpp:29
box.hpp
Vectors.hpp
pFlow::collisionCheck::pointIndex
int32x3 pointIndex(const realx3 &p) const
Definition: collisionCheck.hpp:31
pFlow
Definition: demGeometry.hpp:27
VectorSingles.hpp
pFlow::collisionCheck::mapLastAddedParticle
bool mapLastAddedParticle()
Definition: collisionCheck.cpp:79
pFlow::collisionCheck::dx_
real dx_
Definition: collisionCheck.hpp:19
pFlow::collisionCheck::searchBox_
box searchBox_
Definition: collisionCheck.hpp:17
pFlow::collisionCheck::position_
const realx3Vector & position_
Definition: collisionCheck.hpp:23
pFlow::collisionCheck::checkPoint
bool checkPoint(const realx3 &p, const real d) const
Definition: collisionCheck.cpp:46
pFlow::collisionCheck::next_
uint32Vector next_
Definition: collisionCheck.hpp:27
pFlow::int32x3
triple< int32 > int32x3
Definition: types.hpp:38
pFlow::collisionCheck::nCells_
int32x3 nCells_
Definition: collisionCheck.hpp:21
pFlow::ViewType3D
Kokkos::View< T ***, properties... > ViewType3D
3D view as an array
Definition: KokkosTypes.hpp:101
pFlow::box::minPoint
const INLINE_FUNCTION_HD realx3 & minPoint() const
Definition: box.hpp:91
pFlow::collisionCheck::diameters_
const realVector & diameters_
Definition: collisionCheck.hpp:25
pFlow::box
Definition: box.hpp:32
pFlow::triple< int32 >
pFlow::Vector
Definition: Vector.hpp:48