SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::component::linearsolver::BlockVector< N, T > Class Template Reference

#include <BTDLinearSolver.h>

Inheritance diagram for sofa::component::linearsolver::BlockVector< N, T >:

Classes

class  Bloc
 

Public Member Functions

 BlockVector ()
 
 BlockVector (Index n)
 
virtual ~BlockVector ()
 
const Blocsub (Index i, Index) const
 
Blocsub (Index i, Index)
 
const Blocasub (Index bi, Index) const
 
Blocasub (Index bi, Index)
 
- Public Member Functions inherited from sofa::component::linearsolver::FullVector< T >
 FullVector ()
 
 FullVector (const FullVector &vect)
 
 FullVector (Index n)
 
 FullVector (T *ptr, Index n)
 
 FullVector (T *ptr, Index n, Index nmax)
 
 ~FullVector () override
 
T * ptr ()
 
const T * ptr () const
 
void setptr (T *p)
 
Index capacity () const
 
Iterator begin ()
 
Iterator end ()
 
ConstIterator begin () const
 
ConstIterator end () const
 
void fastResize (Index dim)
 
void resize (Index dim) override
 Resize the vector, and reset all values to 0. More...
 
void clear () override
 Reset all values to 0. More...
 
void swap (FullVector< T > &v)
 
void clear (Index dim) override
 Reset the value of element i to 0. More...
 
T & operator[] (Index i)
 
const T & operator[] (Index i) const
 
SReal element (Index i) const override
 Read the value of element i. More...
 
void set (Index i, SReal v) override
 Write the value of element i. More...
 
void add (Index i, SReal v) override
 Add v to the existing value of element i. More...
 
Index size () const override
 Number of elements. More...
 
FullVector< T > sub (Index i, Index n)
 
template<class TV >
void getsub (Index i, Index n, TV &v)
 
template<class TV >
void setsub (Index i, Index n, const TV &v)
 
void operator= (const FullVector< T > &a)
 v = a More...
 
void operator= (const T &a)
 
template<typename Real2 >
void operator+= (const FullVector< Real2 > &a)
 v += a More...
 
template<typename Real2 >
void operator-= (const FullVector< Real2 > &a)
 v -= a More...
 
template<typename Real2 , typename Real3 >
void eq (const FullVector< Real2 > &a, Real3 f)
 v = a*f More...
 
template<typename Real2 , typename Real3 >
void eq (const FullVector< Real2 > &a, const FullVector< Real2 > &b, Real3 f=1.0)
 v = a+b*f More...
 
template<typename Real2 , typename Real3 >
void peq (const FullVector< Real2 > &a, Real3 f)
 v += a*f More...
 
template<typename Real2 >
void operator*= (Real2 f)
 v *= f More...
 
Real dot (const FullVector< Real > &a) const
 
double norm () const
 
template<>
void set (Index i, SReal v)
 Write the value of element i. More...
 
template<>
void add (Index i, SReal v)
 Add v to the existing value of element i. More...
 
template<>
bool dot (const FullVector< Real > &a) const
 
template<>
double norm () const
 
template<>
SOFA_BASE_LINEAR_SOLVER_API void set (Index i, SReal v)
 Write the value of element i. More...
 
template<>
SOFA_BASE_LINEAR_SOLVER_API void add (Index i, SReal v)
 Add v to the existing value of element i. More...
 
template<>
SOFA_BASE_LINEAR_SOLVER_API bool dot (const FullVector< Real > &a) const
 
template<>
SOFA_BASE_LINEAR_SOLVER_API double norm () const
 
- Public Member Functions inherited from sofa::defaulttype::BaseVector
virtual ~BaseVector ()
 
virtual const floatelements (Index i0, Index n, float *src) const
 Get the values of n elements, starting at element i0, into given float buffer, or return the pointer to the data if the in-memory format is compatible. More...
 
virtual const doubleelements (Index i0, Index n, double *src) const
 Get the values of n elements, starting at element i0, into given double buffer, or return the pointer to the data if the in-memory format is compatible. More...
 
virtual const intelements (Index i0, Index n, int *src) const
 Get the values of n elements, starting at element i0, into given int buffer, or return the pointer to the data if the in-memory format is compatible. More...
 
virtual void set (Index i0, Index n, const float *src)
 Write the values of n float elements, starting at element i0. More...
 
virtual void set (Index i0, Index n, const double *src)
 Write the values of n double elements, starting at element i0. More...
 
virtual void set (Index i0, Index n, const int *src)
 Write the values of n int elements, starting at element i0. More...
 
virtual void add (Index i0, Index n, const float *src)
 Add to the values of n float elements, starting at element i0. More...
 
virtual void add (Index i0, Index n, const double *src)
 Add to the values of n double elements, starting at element i0. More...
 
virtual void add (Index i0, Index n, const int *src)
 Add to the values of n int elements, starting at element i0. More...
 
virtual ElementType getElementType () const
 
virtual std::size_t getElementSize () const
 
virtual bool isFull () const
 Return true if this vector is full, i.a. all elements are stored in memory. More...
 
bool isSparse () const
 

Additional Inherited Members

- Protected Attributes inherited from sofa::component::linearsolver::FullVector< T >
T * data
 
Index cursize
 
Index allocsize
 
- Static Public Member Functions inherited from sofa::component::linearsolver::FullVector< T >
static const char * Name ()
 
- Protected Member Functions inherited from sofa::component::linearsolver::FullVector< T >
void checkIndex (Index n) const
 
- Protected Member Functions inherited from sofa::defaulttype::BaseVector
template<class T >
const T * elementsDefaultImpl (Index i0, Index n, T *buffer) const
 
template<class T >
void setDefaultImpl (Index i0, Index n, const T *src)
 
template<class T >
void addDefaultImpl (Index i0, Index n, const T *src)
 

Constructor details

template<int N, typename T >
sofa::component::linearsolver::BlockVector< N, T >::BlockVector ( )
template<int N, typename T >
sofa::component::linearsolver::BlockVector< N, T >::BlockVector ( Index  n)
explicit
template<int N, typename T >
sofa::component::linearsolver::BlockVector< N, T >::~BlockVector ( )
virtual

Function details

template<int N, typename T >
const BlockVector< N, T >::Bloc & sofa::component::linearsolver::BlockVector< N, T >::asub ( Index  bi,
Index   
) const
template<int N, typename T >
BlockVector< N, T >::Bloc & sofa::component::linearsolver::BlockVector< N, T >::asub ( Index  bi,
Index   
)
template<int N, typename T >
const Bloc& sofa::component::linearsolver::BlockVector< N, T >::sub ( Index  i,
Index   
) const
inline
template<int N, typename T >
BlockVector< N, T >::Bloc & sofa::component::linearsolver::BlockVector< N, T >::sub ( Index  i,
Index   
)