sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > > Class Template Reference

#include <CudaSpatialGridContainer.h>

Collaboration diagram for sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >:

Collaboration graph
[legend]

Public Types

typedef SpatialGridTypes
< gpu::cuda::CudaVectorTypes
< TCoord, TDeriv, TReal > > 
DataTypes
typedef DataTypes::Real Real
typedef DataTypes::Coord Coord
typedef DataTypes::VecCoord VecCoord
typedef DataTypes::CellData CellData
typedef DataTypes::GridData GridData
typedef DataTypes::ParticleField ParticleField

Public Member Functions

 SpatialGrid (Real cellWidth)
void update (const VecCoord &x)
void draw ()
template<class NeighborListener >
void findNeighbors (NeighborListener *dest, Real dist)
void computeField (ParticleField *field, Real dist)
void reorderIndices (helper::vector< unsigned int > *old2new, helper::vector< unsigned int > *new2old)
 Change particles ordering inside a given cell have contiguous indices.
Real getCellWidth () const
Real getInvCellWidth () const

Data Fields

GridData data

Static Protected Member Functions

static void kernel_updateGrid (int cellBits, float cellWidth, int nbPoints, void *particleHash, void *sortTmp, void *cellStart, const void *x)
static void kernel_reorderData (int nbPoints, const void *particleHash, void *sorted, const void *x)

Protected Attributes

const Real cellWidth
const Real invCellWidth
int cellBits
int nbCells
sofa::gpu::cuda::CudaVector
< sofa::helper::fixed_array
< int, 2 > > 
particleHash
sofa::gpu::cuda::CudaVector
< sofa::helper::fixed_array
< int, 2 > > 
sortTmp
sofa::gpu::cuda::CudaVector< int > cellStart
sofa::gpu::cuda::CudaVector
< sofa::gpu::cuda::Vec3f1 > 
sortedPos
const VecCoord * lastX

Detailed Description

template<class TCoord, class TDeriv, class TReal>
class sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >

Definition at line 56 of file CudaSpatialGridContainer.h.


Member Typedef Documentation

template<class TCoord , class TDeriv , class TReal >
typedef DataTypes::CellData sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::CellData

Definition at line 63 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
typedef DataTypes::Coord sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::Coord

Definition at line 61 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
typedef SpatialGridTypes< gpu::cuda::CudaVectorTypes<TCoord,TDeriv,TReal> > sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::DataTypes

Definition at line 59 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
typedef DataTypes::GridData sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::GridData

Definition at line 64 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
typedef DataTypes::ParticleField sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::ParticleField

Definition at line 66 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
typedef DataTypes::Real sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::Real

Definition at line 60 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
typedef DataTypes::VecCoord sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::VecCoord

Definition at line 62 of file CudaSpatialGridContainer.h.


Constructor & Destructor Documentation

template<class TCoord , class TDeriv , class TReal >
sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::SpatialGrid ( Real  cellWidth  )  [inline]

Definition at line 76 of file CudaSpatialGridContainer.inl.


Member Function Documentation

template<class TCoord , class TDeriv , class TReal >
void sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::computeField ( ParticleField *  field,
Real  dist 
) [inline]

Definition at line 90 of file CudaSpatialGridContainer.inl.

template<class TCoord , class TDeriv , class TReal >
void sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::draw (  )  [inline]

Definition at line 140 of file CudaSpatialGridContainer.inl.

template<class TCoord , class TDeriv , class TReal >
template<class NeighborListener >
void sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::findNeighbors ( NeighborListener *  dest,
Real  dist 
) [inline]

Definition at line 84 of file CudaSpatialGridContainer.inl.

template<class TCoord , class TDeriv , class TReal >
Real sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::getCellWidth (  )  const [inline]

template<class TCoord , class TDeriv , class TReal >
Real sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::getInvCellWidth (  )  const [inline]

template<class TCoord , class TDeriv , class TReal >
static void sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::kernel_reorderData ( int  nbPoints,
const void *  particleHash,
void *  sorted,
const void *  x 
) [static, protected]

template<class TCoord , class TDeriv , class TReal >
static void sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::kernel_updateGrid ( int  cellBits,
float  cellWidth,
int  nbPoints,
void *  particleHash,
void *  sortTmp,
void *  cellStart,
const void *  x 
) [static, protected]

template<class TCoord , class TDeriv , class TReal >
void sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::reorderIndices ( helper::vector< unsigned int > *  old2new,
helper::vector< unsigned int > *  new2old 
) [inline]

Change particles ordering inside a given cell have contiguous indices.

Fill the old2new and new2old arrays giving the permutation to apply

Definition at line 96 of file CudaSpatialGridContainer.inl.

template<class TCoord , class TDeriv , class TReal >
void sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::update ( const VecCoord &  x  )  [inline]

Definition at line 126 of file CudaSpatialGridContainer.inl.


Field Documentation

template<class TCoord , class TDeriv , class TReal >
int sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::cellBits [protected]

Definition at line 118 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
sofa::gpu::cuda::CudaVector<int> sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::cellStart [protected]

Definition at line 120 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
const Real sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::cellWidth [protected]

Definition at line 116 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
GridData sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::data

Definition at line 110 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
const Real sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::invCellWidth [protected]

Definition at line 117 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
const VecCoord* sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::lastX [protected]

Definition at line 122 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
int sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::nbCells [protected]

Definition at line 118 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
sofa::gpu::cuda::CudaVector< sofa::helper::fixed_array<int,2> > sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::particleHash [protected]

Definition at line 119 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
sofa::gpu::cuda::CudaVector< sofa::gpu::cuda::Vec3f1 > sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::sortedPos [protected]

Definition at line 121 of file CudaSpatialGridContainer.h.

template<class TCoord , class TDeriv , class TReal >
sofa::gpu::cuda::CudaVector< sofa::helper::fixed_array<int,2> > sofa::component::container::SpatialGrid< SpatialGridTypes< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > > >::sortTmp [protected]

Definition at line 119 of file CudaSpatialGridContainer.h.


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

Generated on Sun Nov 23 04:18:32 2008 for Sofa by  doxygen 1.5.7.1