sofa::gpu::cuda::CudaTestForceField Class Reference

#include <CudaTestForceField.h>

Inheritance diagram for sofa::gpu::cuda::CudaTestForceField:

Inheritance graph
[legend]
Collaboration diagram for sofa::gpu::cuda::CudaTestForceField:

Collaboration graph
[legend]

Data Structures

struct  GPUElement
 Static data associated with each element. More...
struct  GPUElementState
 Varying data associated with each element. More...

Public Types

typedef CudaVec3fTypes::Real Real
typedef CudaVec3fTypes::Coord Coord
typedef
sofa::core::componentmodel::topology::BaseMeshTopology::Cube 
Element
typedef
sofa::core::componentmodel::topology::BaseMeshTopology::SeqCubes 
VecElement

Public Member Functions

 CudaTestForceField ()
void init ()
 Initialization method called at graph modification, during bottom-up traversal.
void reinit ()
 Update method called when variables used in precomputation are modified.
void addForce (VecDeriv &f, const VecCoord &x, const VecDeriv &)
void addDForce (VecDeriv &df, const VecDeriv &dx)
double getPotentialEnergy (const VecCoord &)

Data Fields

CudaVector< GPUElement > elems
CudaVector< GPUElementState > state
int nbVertex
 number of vertices to process to compute all elements
int nbElementPerVertex
 max number of elements connected to a vertex
CudaVector< int > velems
 Index of elements attached to each points (layout per bloc of NBLOC vertices, with first element of each vertex, then second element, etc) No that each integer is actually equat the the index of the element * 8 + the index of this vertex inside the element.

Protected Member Functions

void init (int nbe, int nbv, int nbelemperv)
void setV (int vertex, int num, int index)
void setE (int i, const Element &indices, Real vol, Real r, Real Kvol, Real Kr)

Detailed Description

Definition at line 43 of file CudaTestForceField.h.


Member Typedef Documentation

typedef sofa::core::componentmodel::topology::BaseMeshTopology::Cube sofa::gpu::cuda::CudaTestForceField::Element

Definition at line 52 of file CudaTestForceField.h.

Definition at line 46 of file CudaTestForceField.h.

typedef sofa::core::componentmodel::topology::BaseMeshTopology::SeqCubes sofa::gpu::cuda::CudaTestForceField::VecElement

Definition at line 53 of file CudaTestForceField.h.


Constructor & Destructor Documentation

sofa::gpu::cuda::CudaTestForceField::CudaTestForceField (  ) 

Definition at line 50 of file CudaTestForceField.cpp.


Member Function Documentation

void sofa::gpu::cuda::CudaTestForceField::addDForce ( VecDeriv &  df,
const VecDeriv &  dx 
)

void sofa::gpu::cuda::CudaTestForceField::addForce ( VecDeriv &  f,
const VecCoord &  x,
const VecDeriv &  v 
)

double sofa::gpu::cuda::CudaTestForceField::getPotentialEnergy ( const VecCoord &   )  [inline]

Definition at line 99 of file CudaTestForceField.h.

void sofa::gpu::cuda::CudaTestForceField::init ( int  nbe,
int  nbv,
int  nbelemperv 
) [inline, protected]

void sofa::gpu::cuda::CudaTestForceField::init ( void   )  [virtual]

Initialization method called at graph modification, during bottom-up traversal.

Reimplemented from sofa::core::componentmodel::behavior::ForceField< TDataTypes >.

Definition at line 55 of file CudaTestForceField.cpp.

References reinit().

Referenced by reinit().

void sofa::gpu::cuda::CudaTestForceField::reinit (  )  [virtual]

void sofa::gpu::cuda::CudaTestForceField::setE ( int  i,
const Element &  indices,
Real  vol,
Real  r,
Real  Kvol,
Real  Kr 
) [inline, protected]

void sofa::gpu::cuda::CudaTestForceField::setV ( int  vertex,
int  num,
int  index 
) [inline, protected]

Definition at line 114 of file CudaTestForceField.h.

References BSIZE, nbElementPerVertex, and velems.

Referenced by reinit().


Field Documentation

Definition at line 73 of file CudaTestForceField.h.

Referenced by addDForce(), addForce(), init(), and setE().

max number of elements connected to a vertex

Definition at line 89 of file CudaTestForceField.h.

Referenced by addDForce(), addForce(), init(), and setV().

number of vertices to process to compute all elements

Definition at line 88 of file CudaTestForceField.h.

Referenced by addDForce(), addForce(), and init().

Definition at line 86 of file CudaTestForceField.h.

Referenced by addDForce(), addForce(), and init().

Index of elements attached to each points (layout per bloc of NBLOC vertices, with first element of each vertex, then second element, etc) No that each integer is actually equat the the index of the element * 8 + the index of this vertex inside the element.

Definition at line 92 of file CudaTestForceField.h.

Referenced by addDForce(), addForce(), init(), and setV().


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

Generated on Sun Nov 23 04:24:05 2008 for Sofa by  doxygen 1.5.7.1