OpenWalnut
1.4.0
|
#include <WTensorBase.h>
Public Member Functions | |
WTensorBase () | |
Standard constructor. | |
WTensorBase (WTensorBase const &t) | |
Copy constructor. | |
WTensorBase (WTensorBaseSym< 0, dim, Data_T > const &t) | |
Copy construct a WTensorBase from a WTensorBaseSym. | |
WTensorBase const & | operator= (WTensorBase const &t) |
Copy operator. | |
WTensorBase const & | operator= (WTensorBaseSym< 0, dim, Data_T > const &t) |
Copy operator. | |
std::size_t | getDimension () const |
Get the dimension of this tensor. | |
std::size_t | getOrder () const |
Get the order of this tensor. | |
template<typename Index_T > | |
Data_T & | operator[] (std::vector< Index_T > const &) |
Get the value of this scalar. | |
template<typename Index_T > | |
Data_T const & | operator[] (std::vector< Index_T > const &) const |
Get the value of this scalar. | |
template<typename Index_T > | |
Data_T & | operator[] (Index_T[]) |
Get the value of this scalar. | |
template<typename Index_T > | |
Data_T const & | operator[] (Index_T[]) const |
Get the value of this scalar. | |
bool | operator== (WTensorBase const &other) const |
Compare this WTensorBase to another one. | |
bool | operator!= (WTensorBase const &other) const |
Compare this WTensorBase to another one. | |
Private Types | |
enum | { dataSize = 1 } |
Declare a compile-time constant as enum and not as static constant. More... | |
Static Private Member Functions | |
template<typename Index_T > | |
static std::size_t | getPos (Index_T[]) |
Calculate the position of the element in the data vector. | |
Private Attributes | |
Data_T | m_data |
Stores the value. | |
Friends | |
class | WTensorBase< 1, dim, Data_T > |
class | ::WTensorBaseTest |
class | ::WTensorFuncTest |
dim | The dimension of the tensor, i.e. the number of components in each direction. |
Data_T | The datatype of the components, double by default. |
Specialization for order = 0. This essentially encapsulates a scalar. The purpose of this specialization is compatibility for generic tensor functions.
Definition at line 436 of file WTensorBase.h.
anonymous enum [private] |
Declare a compile-time constant as enum and not as static constant.
Definition at line 615 of file WTensorBase.h.
WTensorBase< 0, dim, Data_T >::WTensorBase | ( | ) | [inline] |
Standard constructor.
All elements are set to Data_T().
Definition at line 454 of file WTensorBase.h.
WTensorBase< 0, dim, Data_T >::WTensorBase | ( | WTensorBase< 0, dim, Data_T > const & | t | ) | [inline] |
Copy constructor.
t | The tensor to copy from. |
Definition at line 464 of file WTensorBase.h.
WTensorBase< 0, dim, Data_T >::WTensorBase | ( | WTensorBaseSym< 0, dim, Data_T > const & | t | ) | [inline, explicit] |
Copy construct a WTensorBase from a WTensorBaseSym.
t | The symmetric tensor to copy from. |
Definition at line 474 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
std::size_t WTensorBase< 0, dim, Data_T >::getDimension | ( | ) | const [inline] |
Get the dimension of this tensor.
Definition at line 511 of file WTensorBase.h.
std::size_t WTensorBase< 0, dim, Data_T >::getOrder | ( | ) | const [inline] |
Get the order of this tensor.
Definition at line 521 of file WTensorBase.h.
static std::size_t WTensorBase< 0, dim, Data_T >::getPos | ( | Index_T | [] | ) | [inline, static, private] |
Calculate the position of the element in the data vector.
This is essentially the standard case of the recursion.
Definition at line 602 of file WTensorBase.h.
bool WTensorBase< 0, dim, Data_T >::operator!= | ( | WTensorBase< 0, dim, Data_T > const & | other | ) | const [inline] |
Compare this WTensorBase to another one.
other | The WBensorBase to compare to. |
Definition at line 589 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
WTensorBase const& WTensorBase< 0, dim, Data_T >::operator= | ( | WTensorBase< 0, dim, Data_T > const & | t | ) | [inline] |
Copy operator.
t | The tensor to copy from. |
Definition at line 487 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
WTensorBase const& WTensorBase< 0, dim, Data_T >::operator= | ( | WTensorBaseSym< 0, dim, Data_T > const & | t | ) | [inline] |
Copy operator.
t | The symmetric tensor to copy from. |
Definition at line 500 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
bool WTensorBase< 0, dim, Data_T >::operator== | ( | WTensorBase< 0, dim, Data_T > const & | other | ) | const [inline] |
Compare this WTensorBase to another one.
other | The WBensorBase to compare to. |
Definition at line 577 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
Data_T& WTensorBase< 0, dim, Data_T >::operator[] | ( | std::vector< Index_T > const & | ) | [inline] |
Get the value of this scalar.
Definition at line 532 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
Data_T const& WTensorBase< 0, dim, Data_T >::operator[] | ( | std::vector< Index_T > const & | ) | const [inline] |
Get the value of this scalar.
Definition at line 543 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
Data_T& WTensorBase< 0, dim, Data_T >::operator[] | ( | Index_T | [] | ) | [inline] |
Get the value of this scalar.
Definition at line 554 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
Data_T const& WTensorBase< 0, dim, Data_T >::operator[] | ( | Index_T | [] | ) | const [inline] |
Get the value of this scalar.
Definition at line 565 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
Data_T WTensorBase< 0, dim, Data_T >::m_data [private] |
Stores the value.
Definition at line 610 of file WTensorBase.h.