SOFA plugin: SofaOpenCL  master
Open source framework for multi-physics simuation
sofa::component::interactionforcefield::SpringForceFieldInternalData< gpu::opencl::OpenCLVectorTypes< TCoord, TDeriv, TReal > >::GPUSpringSet Struct Reference

#include <OpenCLSpringForceField.h>

Public Attributes

int vertex0
 index of the first vertex connected to a spring More...
 
int nbVertex
 number of vertices to process to compute all springs More...
 
int nbSpringPerVertex
 max number of springs connected to a vertex More...
 
gpu::opencl::OpenCLVector< GPUSpring > springs
 springs attached to each points (layout per block of NBLOC vertices, with first spring of each vertex, then second spring, etc) More...
 
gpu::opencl::OpenCLVector< Realdfdx
 only used for StiffSpringForceField More...
 

Public Member Functions

 GPUSpringSet ()
 
void init (int v0, int nbv, int nbsperv)
 
void set (int vertex, int spring, int index, float initpos, float ks, float kd)
 

Attribute details

◆ dfdx

template<class TCoord , class TDeriv , class TReal >
gpu::opencl::OpenCLVector<Real> sofa::component::interactionforcefield::SpringForceFieldInternalData< gpu::opencl::OpenCLVectorTypes< TCoord, TDeriv, TReal > >::GPUSpringSet::dfdx

only used for StiffSpringForceField

◆ nbSpringPerVertex

template<class TCoord , class TDeriv , class TReal >
int sofa::component::interactionforcefield::SpringForceFieldInternalData< gpu::opencl::OpenCLVectorTypes< TCoord, TDeriv, TReal > >::GPUSpringSet::nbSpringPerVertex

max number of springs connected to a vertex

◆ nbVertex

template<class TCoord , class TDeriv , class TReal >
int sofa::component::interactionforcefield::SpringForceFieldInternalData< gpu::opencl::OpenCLVectorTypes< TCoord, TDeriv, TReal > >::GPUSpringSet::nbVertex

number of vertices to process to compute all springs

◆ springs

template<class TCoord , class TDeriv , class TReal >
gpu::opencl::OpenCLVector<GPUSpring> sofa::component::interactionforcefield::SpringForceFieldInternalData< gpu::opencl::OpenCLVectorTypes< TCoord, TDeriv, TReal > >::GPUSpringSet::springs

springs attached to each points (layout per block of NBLOC vertices, with first spring of each vertex, then second spring, etc)

◆ vertex0

template<class TCoord , class TDeriv , class TReal >
int sofa::component::interactionforcefield::SpringForceFieldInternalData< gpu::opencl::OpenCLVectorTypes< TCoord, TDeriv, TReal > >::GPUSpringSet::vertex0

index of the first vertex connected to a spring

Constructor details

◆ GPUSpringSet()

template<class TCoord , class TDeriv , class TReal >
sofa::component::interactionforcefield::SpringForceFieldInternalData< gpu::opencl::OpenCLVectorTypes< TCoord, TDeriv, TReal > >::GPUSpringSet::GPUSpringSet ( )
inline

Function details

◆ init()

template<class TCoord , class TDeriv , class TReal >
void sofa::component::interactionforcefield::SpringForceFieldInternalData< gpu::opencl::OpenCLVectorTypes< TCoord, TDeriv, TReal > >::GPUSpringSet::init ( int  v0,
int  nbv,
int  nbsperv 
)
inline

◆ set()

template<class TCoord , class TDeriv , class TReal >
void sofa::component::interactionforcefield::SpringForceFieldInternalData< gpu::opencl::OpenCLVectorTypes< TCoord, TDeriv, TReal > >::GPUSpringSet::set ( int  vertex,
int  spring,
int  index,
float  initpos,
float  ks,
float  kd 
)
inline