OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
AdaptiveCylinderCone< dim, T > Class Template Reference

This class represent an Adaptive cylinder cone. More...

Detailed Description

template<unsigned int dim, typename T>
class AdaptiveCylinderCone< dim, T >

This class represent an Adaptive cylinder cone.

This class represent an N-dimensional adaptive cylinder cone

Parameters
Ttype of space ... Real Complex Integer
Ndimensionality of the adaptive cylinder cone

This shape is useful for adaptive particle search, in order to explain how is defined we take a 1D space where particles can interact each other with different radius

Given one particle we want to know all the neighborhood particles, all the neighborhood particles are given by all the particles included in the radius of interaction of the particle, plus all the other particles with radius big enough to interact with this particle or in other word all the particles that has this particle as neighborhood

If we see the problem to find the neighborhood of the 1D particles in a 2D space (x,r) with x=position and r=interaction radius of the particles.

all the particles neighborhood of one particle (x_p,r_p) are all the particles in the rectangle (x-r_p,0) and (x+r_p,r_p)

in the area r < r_p

and the cone defined by the two bases

(x-r_p,r_p) - (x+r_p,r_p) and (x-r_max,r_max) - (x+r_max,r_max)

This mean that one point (x_p,r_p) and r_max define the shape

Definition at line 71 of file AdaptiveCylinderCone.hpp.

#include <AdaptiveCylinderCone.hpp>

Public Types

typedef boost::fusion::vector
< T[dim]> 
type
 boost fusion that store the point
 

Public Member Functions

template<typename distance >
bool Intersect (Box< dim, T > b)
 This function check if a box intersect this shape. More...
 
template<typename distance >
bool Intersect (Box< dim, T > b, int div, T *dists, T &minsqdistance)
 This function check if a box intersect this shape. More...
 
 AdaptiveCylinderCone (const T *pt)
 Create an adaptive cylinder Cone for the point pt. More...
 
template<typename Distance >
bool isInside (Point< dim, T > pnt)
 Is a point inside the adaptive cone. More...
 
template<typename Distance >
bool isInside (float *pnt)
 Is a point inside the adaptive cone. More...
 

Data Fields

type data
 

Static Public Attributes

static const unsigned int p1 = 0
 Point where cone and cylinder base match.
 

Private Types

typedef Point< dim, T > PointA
 Base structure that define a Point.
 

Constructor & Destructor Documentation

template<unsigned int dim, typename T >
AdaptiveCylinderCone< dim, T >::AdaptiveCylinderCone ( const T *  pt)
inline

Create an adaptive cylinder Cone for the point pt.

Parameters
ptarray storing the multidimensional point

Definition at line 164 of file AdaptiveCylinderCone.hpp.

Member Function Documentation

template<unsigned int dim, typename T >
template<typename distance >
bool AdaptiveCylinderCone< dim, T >::Intersect ( Box< dim, T >  b)
inline

This function check if a box intersect this shape.

Parameters
bis the box to check
Returns
true if the box intersect the cylinder cone shape

Definition at line 94 of file AdaptiveCylinderCone.hpp.

template<unsigned int dim, typename T >
template<typename distance >
bool AdaptiveCylinderCone< dim, T >::Intersect ( Box< dim, T >  b,
int  div,
T *  dists,
T &  minsqdistance 
)
inline

This function check if a box intersect this shape.

It differer from the previous one because it try to optimize the intersection calculation from the previous box intersection, usefull in KDTree, where the child are divisions of the root

Template Parameters
distancefunctor to calculate the distance between two points
Parameters
bthe bounding Box
[in]divwhere we are cutting from the previous box
[in]distsarray of the previous distances calculated on each dimension
[in]minsqdistanceminimum square distance
Returns
true if the Box intersect the adaptive cylinder cone

Definition at line 150 of file AdaptiveCylinderCone.hpp.

template<unsigned int dim, typename T >
template<typename Distance >
bool AdaptiveCylinderCone< dim, T >::isInside ( Point< dim, T >  pnt)
inline

Is a point inside the adaptive cone.

Parameters
pntPoint to check
Returns
true if the point is inside, false otherwise

Definition at line 183 of file AdaptiveCylinderCone.hpp.

template<unsigned int dim, typename T >
template<typename Distance >
bool AdaptiveCylinderCone< dim, T >::isInside ( float *  pnt)
inline

Is a point inside the adaptive cone.

Parameters
pntPoint to check
Returns
true if the point is inside false otherwise

Definition at line 205 of file AdaptiveCylinderCone.hpp.

Field Documentation

template<unsigned int dim, typename T >
type AdaptiveCylinderCone< dim, T >::data

Center point of the cylynder cone (Where the cylinder finish), where the cone start

Definition at line 83 of file AdaptiveCylinderCone.hpp.


The documentation for this class was generated from the following file: