OpenWalnut
1.4.0
|
Implements a tensor that has the same number of components in every direction. More...
#include <WTensor.h>
Public Member Functions | |
WTensor () | |
Standard constructor. | |
WTensor (WTensorSym< order, dim, Data_T > const &t) | |
Construct a Tensor from a symmetric tensor. | |
WTensor const & | operator= (WTensorSym< order, dim, Data_T > const &t) |
Copy from a symmetric tensor. |
Implements a tensor that has the same number of components in every direction.
order | The order of the tensor. |
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. |
Access to specific elements of the tensor can be achieved in 2 ways:
Examples:
WTensor< 2, 3 > w;
w( 2, 0 ) = 4.0;
WTensor< 1, 4 > v;
v( 2 ) = ...;
std::vector< int > i( 1, 2 ); v[ i ] = ...;
WTensor< order, dim, Data_T >::WTensor | ( | WTensorSym< order, dim, Data_T > const & | t | ) |
Construct a Tensor from a symmetric tensor.
t | A symmetric tensor. |
Definition at line 110 of file WTensor.h.
References WTensor< order, dim, Data_T >::operator=().
WTensor< order, dim, Data_T > const & WTensor< order, dim, Data_T >::operator= | ( | WTensorSym< order, dim, Data_T > const & | t | ) |
Copy from a symmetric tensor.
t | A symmetric tensor. |
Definition at line 117 of file WTensor.h.
References WTensorBase< order, dim, Data_T >::operator=().
Referenced by WTensor< order, dim, Data_T >::WTensor().