OpenWalnut  1.5.0dev
Public Member Functions | List of all members
WTensor< order, dim, Data_T > Class Template Reference

Implements a tensor that has the same number of components in every direction. More...

#include <WTensor.h>

+ Inheritance diagram for WTensor< order, dim, Data_T >:
+ Collaboration diagram for WTensor< order, dim, Data_T >:

Public Member Functions

 WTensor ()
 Standard constructor. More...
 
 WTensor (WTensorSym< order, dim, Data_T > const &t)
 Construct a Tensor from a symmetric tensor. More...
 
WTensor const & operator= (WTensorSym< order, dim, Data_T > const &t)
 Copy from a symmetric tensor. More...
 

Detailed Description

template<std::size_t order, std::size_t dim, typename Data_T = double>
class WTensor< order, dim, Data_T >

Implements a tensor that has the same number of components in every direction.

Template Parameters
orderThe order of the tensor.
dimThe dimension of the tensor, i.e. the number of components in each direction.
Data_TThe datatype of the components, double by default.
Note
The dimension may never be 0.
The type Data_T may not throw exceptions on construction, destruction or during any assignment operator.

Access to specific elements of the tensor can be achieved in 2 ways:

Note
The datatype of the array or std::vector can be any type castable to std::size_t.
There is no bounds checking for the array version of operator [].
Operator () is not supported for orders larger than 6.

Examples:

Definition at line 78 of file WTensor.h.

Constructor & Destructor Documentation

◆ WTensor() [1/2]

template<std::size_t order, std::size_t dim, typename Data_T >
WTensor< order, dim, Data_T >::WTensor

Standard constructor.

Definition at line 104 of file WTensor.h.

◆ WTensor() [2/2]

template<std::size_t order, std::size_t dim, typename Data_T >
WTensor< order, dim, Data_T >::WTensor ( WTensorSym< order, dim, Data_T > const &  t)

Construct a Tensor from a symmetric tensor.

Parameters
tA symmetric tensor.

Definition at line 110 of file WTensor.h.

Member Function Documentation

◆ operator=()

template<std::size_t order, std::size_t dim, typename Data_T >
WTensor< order, dim, Data_T > const & WTensor< order, dim, Data_T >::operator= ( WTensorSym< order, dim, Data_T > const &  t)

Copy from a symmetric tensor.

Parameters
tA symmetric tensor.
Returns
new tensor

Definition at line 117 of file WTensor.h.


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