NuTo
Numerics Tool
Public Member Functions | Protected Attributes | Friends | List of all members
NuTo::DofVector< T > Class Template Reference

#include <DofVector.h>

Public Member Functions

const Eigen::Matrix< T, Eigen::Dynamic, 1 > & operator[] (const DofType &dofType) const
 const access More...
 
Eigen::Matrix< T, Eigen::Dynamic, 1 > & operator[] (const DofType &dofType)
 nonconst access More...
 
DofVectoroperator+= (const DofVector &rhs)
 performs uninitialized addition that resizes the data to the length of rhs More...
 
DofVectoroperator-= (const DofVector &rhs)
 performs uninitialized addition that resizes the data to the length of rhs More...
 
DofVectoroperator*= (double scalar)
 
double operator() (DofType dof, int globalDofNumber) const
 
void SetZero ()
 
std::vector< double > operator() (DofType dof, std::vector< int > globalDofNumbers) const
 
void AddScaled (const DofVector &rhs, double scalar)
 calculates (*this) += rhs * scalar More...
 
std::vector< DofTypeDofTypes () const
 

Protected Attributes

std::map< DofType, Eigen::Matrix< T, Eigen::Dynamic, 1 >, CompareDofTypemData
 data container More...
 

Friends

DofVector operator+ (DofVector lhs, const DofVector &rhs)
 
DofVector operator- (DofVector lhs, const DofVector &rhs)
 
DofVector operator* (DofVector lhs, double scalar)
 
DofVector operator* (double scalar, DofVector rhs)
 
std::ostream & operator<< (std::ostream &out, const DofVector &v)
 

Member Function Documentation

template<typename T>
void NuTo::DofVector< T >::AddScaled ( const DofVector< T > &  rhs,
double  scalar 
)
inline

calculates (*this) += rhs * scalar

Remarks
This is the common case in the numerical integration - summing up all integration point contributions scaled with DetJ and the integration point weight.
template<typename T>
std::vector<DofType> NuTo::DofVector< T >::DofTypes ( ) const
inline
template<typename T>
double NuTo::DofVector< T >::operator() ( DofType  dof,
int  globalDofNumber 
) const
inline
template<typename T>
std::vector<double> NuTo::DofVector< T >::operator() ( DofType  dof,
std::vector< int >  globalDofNumbers 
) const
inline
template<typename T>
DofVector& NuTo::DofVector< T >::operator*= ( double  scalar)
inline
template<typename T>
DofVector& NuTo::DofVector< T >::operator+= ( const DofVector< T > &  rhs)
inline

performs uninitialized addition that resizes the data to the length of rhs

template<typename T>
DofVector& NuTo::DofVector< T >::operator-= ( const DofVector< T > &  rhs)
inline

performs uninitialized addition that resizes the data to the length of rhs

template<typename T>
const Eigen::Matrix<T, Eigen::Dynamic, 1>& NuTo::DofVector< T >::operator[] ( const DofType dofType) const
inline

const access

Parameters
dofTypedof type
Returns
const reference to existing value, throws if there is no value
template<typename T>
Eigen::Matrix<T, Eigen::Dynamic, 1>& NuTo::DofVector< T >::operator[] ( const DofType dofType)
inline

nonconst access

Parameters
dofTypedof type
Returns
reference to either an existing value an newly default constructed value
Remarks
This requires T to be default constructable.
template<typename T>
void NuTo::DofVector< T >::SetZero ( )
inline

Friends And Related Function Documentation

template<typename T>
DofVector operator* ( DofVector< T >  lhs,
double  scalar 
)
friend
template<typename T>
DofVector operator* ( double  scalar,
DofVector< T >  rhs 
)
friend
template<typename T>
DofVector operator+ ( DofVector< T >  lhs,
const DofVector< T > &  rhs 
)
friend
template<typename T>
DofVector operator- ( DofVector< T >  lhs,
const DofVector< T > &  rhs 
)
friend
template<typename T>
std::ostream& operator<< ( std::ostream &  out,
const DofVector< T > &  v 
)
friend

Member Data Documentation

template<typename T>
std::map<DofType, Eigen::Matrix<T, Eigen::Dynamic, 1>, CompareDofType> NuTo::DofVector< T >::mData
protected

data container


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