SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::core::behavior::TParallelMultiVec< vtype > Class Template Reference

#include <ParallelMultiVec.h>

Inheritance diagram for sofa::core::behavior::TParallelMultiVec< vtype >:

Detailed Description

template<VecType vtype>
class sofa::core::behavior::TParallelMultiVec< vtype >

Helper class providing a high-level view of underlying state vectors.

It is used to convert math-like operations to call to computation methods.

Public Member Functions

 TParallelMultiVec (sofa::core::behavior::BaseVectorOperations *vop, MyMultiVecId v)
 Refers to a state vector with the given ID (core::VecId::position(), core::VecId::velocity(), etc). More...
 
 TParallelMultiVec (sofa::core::behavior::BaseVectorOperations *vop)
 Allocate a new temporary vector with the given type (sofa::core::V_COORD or sofa::core::V_DERIV). More...
 
 ~TParallelMultiVec ()
 
void peq (AllMultiVecId a, Shared< double > &fSh, double f=1.0)
 
void peq (AllMultiVecId a, double f=1.0)
 
void meq (AllMultiVecId a, Shared< double > &fSh)
 
void dot (Shared< double > &r, MyMultiVecId a)
 
void print ()
 
 operator MyMultiVecId ()
 
 operator ConstMyMultiVecId ()
 
 operator AllMultiVecId ()
 
 operator ConstAllMultiVecId ()
 
- Public Member Functions inherited from sofa::core::behavior::TMultiVec< vtype >
 TMultiVec (BaseVectorOperations *vop, MyMultiVecId v)
 Refers to a state vector with the given ID (VecId::position(), VecId::velocity(), etc). More...
 
 TMultiVec ()
 Refers to a not yet allocated state vector. More...
 
 TMultiVec (BaseVectorOperations *vop, bool dynamic=true)
 Allocate a new temporary vector with the given type (sofa::core::V_COORD or sofa::core::V_DERIV). More...
 
 ~TMultiVec ()
 
 operator MyMultiVecId ()
 Automatic conversion to the underlying VecId. More...
 
 operator ConstMyMultiVecId ()
 
 operator AllMultiVecId ()
 
 operator ConstAllMultiVecId ()
 
const MyMultiVecIdid () const
 
MyMultiVecIdid ()
 
BaseVectorOperationsops ()
 
void setOps (BaseVectorOperations *op)
 
void realloc (BaseVectorOperations *_vop, bool interactionForceField=false, bool propagate=false)
 
void clear ()
 v = 0 More...
 
void eq (MyMultiVecId a)
 v = a More...
 
void eq (MyMultiVecId a, SReal f)
 v = a*f More...
 
void peq (AllMultiVecId a, SReal f=1.0)
 v += a*f More...
 
void teq (SReal f)
 v *= f More...
 
void eq (AllMultiVecId a, AllMultiVecId b, SReal f=1.0)
 v = a+b*f More...
 
SReal dot (MyMultiVecId a)
 
void threshold (SReal threshold)
 nullify values below given threshold More...
 
SReal norm ()
 
SReal norm (unsigned l)
 
void operator= (MyMultiVecId a)
 v = a More...
 
void operator= (const TMultiVec< vtype > &a)
 v = a More...
 
void operator+= (MyMultiVecId a)
 v += a More...
 
void operator-= (MyMultiVecId a)
 v -= a More...
 
void operator*= (SReal f)
 v *= f More...
 
void operator/= (SReal f)
 v /= f More...
 
SReal operator* (MyMultiVecId a)
 return the scalar product dot(v,a) More...
 
size_t size () const
 

Additional Inherited Members

- Protected Attributes inherited from sofa::core::behavior::TMultiVec< vtype >
BaseVectorOperationsvop
 Solver who is using this vector. More...
 
MyMultiVecId v
 Identifier of this vector. More...
 
bool dynamic
 Flag indicating if this vector was dynamically allocated. More...
 

Constructor details

Refers to a state vector with the given ID (core::VecId::position(), core::VecId::velocity(), etc).

Allocate a new temporary vector with the given type (sofa::core::V_COORD or sofa::core::V_DERIV).

template<VecType vtype>
sofa::core::behavior::TParallelMultiVec< vtype >::~TParallelMultiVec ( )
inline

Function details

template<VecType vtype>
void sofa::core::behavior::TParallelMultiVec< vtype >::dot ( Shared< double > &  r,
MyMultiVecId  a 
)
inline
template<VecType vtype>
void sofa::core::behavior::TParallelMultiVec< vtype >::meq ( AllMultiVecId  a,
Shared< double > &  fSh 
)
inline
template<VecType vtype>
sofa::core::behavior::TParallelMultiVec< vtype >::operator AllMultiVecId ( )
inline
template<VecType vtype>
sofa::core::behavior::TParallelMultiVec< vtype >::operator ConstAllMultiVecId ( )
inline
template<VecType vtype>
sofa::core::behavior::TParallelMultiVec< vtype >::operator ConstMyMultiVecId ( )
inline
template<VecType vtype>
sofa::core::behavior::TParallelMultiVec< vtype >::operator MyMultiVecId ( )
inline
template<VecType vtype>
void sofa::core::behavior::TParallelMultiVec< vtype >::peq ( AllMultiVecId  a,
Shared< double > &  fSh,
double  f = 1.0 
)
inline
template<VecType vtype>
void sofa::core::behavior::TParallelMultiVec< vtype >::peq ( AllMultiVecId  a,
double  f = 1.0 
)
inline
template<VecType vtype>
void sofa::core::behavior::TParallelMultiVec< vtype >::print ( )
inline