aimstil  5.0.5
til::functor::SpringForce< TPoint3D, TVector3DRes > Struct Template Reference

Spring force functor. More...

#include <cathier/Forces.h>

Inheritance diagram for til::functor::SpringForce< TPoint3D, TVector3DRes >:
Collaboration diagram for til::functor::SpringForce< TPoint3D, TVector3DRes >:

Public Types

enum  { PerVertex = 0 }
 
typedef til::value_type_of< TVector3DRes >::type precision_t
 

Public Member Functions

void operator() (const TPoint3D &v, const TPoint3D &v0, const precision_t &l0, TVector3DRes &res) const
 Compute -(v-v0)/||v-v0|| * (||v-v0|| - l0)^2, store result in res. More...
 

Detailed Description

template<typename TPoint3D, typename TVector3DRes>
struct til::functor::SpringForce< TPoint3D, TVector3DRes >

Spring force functor.

Definition at line 69 of file Forces.h.

Member Typedef Documentation

◆ precision_t

template<typename TPoint3D , typename TVector3DRes >
typedef til::value_type_of<TVector3DRes>::type til::functor::SpringForce< TPoint3D, TVector3DRes >::precision_t

Definition at line 73 of file Forces.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename TPoint3D , typename TVector3DRes >
anonymous enum
Enumerator
PerVertex 

Definition at line 75 of file Forces.h.

Member Function Documentation

◆ operator()()

template<typename TPoint3D , typename TVector3DRes >
void til::functor::SpringForce< TPoint3D, TVector3DRes >::operator() ( const TPoint3D &  v,
const TPoint3D &  v0,
const precision_t l0,
TVector3DRes &  res 
) const
inline

Compute -(v-v0)/||v-v0|| * (||v-v0|| - l0)^2, store result in res.

This corresponds to -grad(E) where E = 1/2.(||v-v0|| - l0)^2.

Definition at line 83 of file Forces.h.

References til::norm2(), and til::sqrt().


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