OpenWalnut
1.4.0
|
#include <WTensorBase.h>
Public Member Functions | |
WTensorBase () | |
Standard constructor. More... | |
WTensorBase (WTensorBase const &t) | |
Copy constructor. More... | |
WTensorBase (WTensorBaseSym< 0, dim, Data_T > const &t) | |
Copy construct a WTensorBase from a WTensorBaseSym. More... | |
WTensorBase const & | operator= (WTensorBase const &t) |
Copy operator. More... | |
WTensorBase const & | operator= (WTensorBaseSym< 0, dim, Data_T > const &t) |
Copy operator. More... | |
std::size_t | getDimension () const |
Get the dimension of this tensor. More... | |
std::size_t | getOrder () const |
Get the order of this tensor. More... | |
template<typename Index_T > | |
Data_T & | operator[] (std::vector< Index_T > const &) |
Get the value of this scalar. More... | |
template<typename Index_T > | |
Data_T const & | operator[] (std::vector< Index_T > const &) const |
Get the value of this scalar. More... | |
template<typename Index_T > | |
Data_T & | operator[] (Index_T[]) |
Get the value of this scalar. More... | |
template<typename Index_T > | |
Data_T const & | operator[] (Index_T[]) const |
Get the value of this scalar. More... | |
bool | operator== (WTensorBase const &other) const |
Compare this WTensorBase to another one. More... | |
bool | operator!= (WTensorBase const &other) const |
Compare this WTensorBase to another one. More... | |
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. More... | |
Private Attributes | |
Data_T | m_data |
Stores the value. More... | |
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 440 of file WTensorBase.h.
|
private |
Declare a compile-time constant as enum and not as static constant.
Enumerator | |
---|---|
dataSize |
The number of elements to store. |
Definition at line 619 of file WTensorBase.h.
|
inline |
Standard constructor.
All elements are set to Data_T().
Definition at line 458 of file WTensorBase.h.
|
inline |
Copy constructor.
t | The tensor to copy from. |
Definition at line 468 of file WTensorBase.h.
|
inlineexplicit |
Copy construct a WTensorBase from a WTensorBaseSym.
t | The symmetric tensor to copy from. |
Definition at line 478 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
|
inline |
Get the dimension of this tensor.
Definition at line 515 of file WTensorBase.h.
|
inline |
Get the order of this tensor.
Definition at line 525 of file WTensorBase.h.
|
inlinestaticprivate |
Calculate the position of the element in the data vector.
This is essentially the standard case of the recursion.
Definition at line 606 of file WTensorBase.h.
|
inline |
Compare this WTensorBase to another one.
other | The WBensorBase to compare to. |
Definition at line 593 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
|
inline |
Copy operator.
t | The tensor to copy from. |
Definition at line 491 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
|
inline |
Copy operator.
t | The symmetric tensor to copy from. |
Definition at line 504 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
|
inline |
Compare this WTensorBase to another one.
other | The WBensorBase to compare to. |
Definition at line 581 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
|
inline |
Get the value of this scalar.
Definition at line 536 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
|
inline |
Get the value of this scalar.
Definition at line 547 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
|
inline |
Get the value of this scalar.
Definition at line 558 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
|
inline |
Get the value of this scalar.
Definition at line 569 of file WTensorBase.h.
References WTensorBase< order, dim, Data_T >::m_data.
|
private |
Stores the value.
Definition at line 614 of file WTensorBase.h.