A Rank 5 Tensor class. More...
#include <matrices.h>
Public Member Functions | |
| RankFiveTensor () | |
| Empty constructor. | |
| RankFiveTensor (const RankFiveTensor &source_tensor) | |
| Copy constructor: Deep copy. | |
| RankFiveTensor & | operator= (const RankFiveTensor &source_tensor) |
| Copy assignement. | |
| RankFiveTensor (const unsigned long &n) | |
| One parameter constructor produces a nxnxnxnxn tensor. | |
| RankFiveTensor (const unsigned long &n_index1, const unsigned long &n_index2, const unsigned long &n_index3, const unsigned long &n_index4, const unsigned long &n_index5) | |
| Four parameter constructor, general non-square tensor. | |
| RankFiveTensor (const unsigned long &n_index1, const unsigned long &n_index2, const unsigned long &n_index3, const unsigned long &n_index4, const unsigned long &n_index5, const T &initial_val) | |
| Four parameter constructor, general non-square tensor. | |
| virtual | ~RankFiveTensor () |
| Destructor: delete the pointers. | |
| void | resize (const unsigned long &n) |
| Resize to a square nxnxnxn tensor. | |
| void | resize (const unsigned long &n_index1, const unsigned long &n_index2, const unsigned long &n_index3, const unsigned long &n_index4, const unsigned long &n_index5) |
| Resize to a general tensor. | |
| void | resize (const unsigned long &n_index1, const unsigned long &n_index2, const unsigned long &n_index3, const unsigned long &n_index4, const unsigned long &n_index5, const T &initial_value) |
| Resize to a general tensor. | |
| void | initialise (const T &val) |
| Initialise all values in the tensor to val. | |
| unsigned long | nindex1 () const |
| Return the range of index 1 of the tensor. | |
| unsigned long | nindex2 () const |
| Return the range of index 2 of the tensor. | |
| unsigned long | nindex3 () const |
| Return the range of index 3 of the tensor. | |
| unsigned long | nindex4 () const |
| Return the range of index 4 of the tensor. | |
| unsigned long | nindex5 () const |
| Return the range of index 5 of the tensor. | |
| T & | operator() (const unsigned long &i, const unsigned long &j, const unsigned long &k, const unsigned long &l, const unsigned long &m) |
| Overload the round brackets to give access as a(i,j,k,l,m) | |
| T | operator() (const unsigned long &i, const unsigned long &j, const unsigned long &k, const unsigned long &l, const unsigned long &m) const |
| Overload a const version for read-only access as a(i,j,k,l,m) | |
| T & | raw_direct_access (const unsigned long &i) |
| Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems. | |
| const T & | raw_direct_access (const unsigned long &i) const |
| Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems. | |
| unsigned | offset (const unsigned long &i, const unsigned long &j, const unsigned long &k) const |
| Caculate the offset in flat-packed Cy-style, column-major format, required for a given i,j,k. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems. | |
Private Member Functions | |
| void | range_check (const unsigned long &i, const unsigned long &j, const unsigned long &k, const unsigned long &l, const unsigned long &m) const |
Range check to catch when an index is out of bounds, if so, it issues a warning message and dies by throwing an OomphLibError. | |
Private Attributes | |
| T * | Tensordata |
| Private internal representation as pointer to data. | |
| unsigned | N |
| 1st Tensor dimension | |
| unsigned | M |
| 2nd Tensor dimension | |
| unsigned | P |
| 3rd Tensor dimension | |
| unsigned | Q |
| 4th Tensor dimension | |
| unsigned | R |
| 5th Tensor dimension | |
A Rank 5 Tensor class.
Definition at line 2158 of file matrices.h.
|
inline |
Empty constructor.
Definition at line 2241 of file matrices.h.
|
inline |
Copy constructor: Deep copy.
Definition at line 2244 of file matrices.h.
References i, oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::N, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, and oomph::RankFiveTensor< T >::Tensordata.
|
inline |
One parameter constructor produces a nxnxnxnxn tensor.
Definition at line 2318 of file matrices.h.
References oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::N, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, and oomph::RankFiveTensor< T >::Tensordata.
|
inline |
Four parameter constructor, general non-square tensor.
Definition at line 2335 of file matrices.h.
References oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::N, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, and oomph::RankFiveTensor< T >::Tensordata.
|
inline |
Four parameter constructor, general non-square tensor.
Definition at line 2357 of file matrices.h.
References oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::N, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, and oomph::RankFiveTensor< T >::Tensordata.
|
inlinevirtual |
Destructor: delete the pointers.
Definition at line 2377 of file matrices.h.
References oomph::RankFiveTensor< T >::Tensordata.
|
inline |
Initialise all values in the tensor to val.
Definition at line 2523 of file matrices.h.
References i, oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::N, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, and oomph::RankFiveTensor< T >::Tensordata.
Referenced by oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::resize(), and oomph::RankFiveTensor< T >::resize().
|
inline |
Return the range of index 1 of the tensor.
Definition at line 2532 of file matrices.h.
References oomph::RankFiveTensor< T >::N.
|
inline |
Return the range of index 2 of the tensor.
Definition at line 2538 of file matrices.h.
References oomph::RankFiveTensor< T >::M.
|
inline |
Return the range of index 3 of the tensor.
Definition at line 2544 of file matrices.h.
References oomph::RankFiveTensor< T >::P.
|
inline |
Return the range of index 4 of the tensor.
Definition at line 2550 of file matrices.h.
References oomph::RankFiveTensor< T >::Q.
|
inline |
Return the range of index 5 of the tensor.
Definition at line 2556 of file matrices.h.
References oomph::RankFiveTensor< T >::R.
|
inline |
Caculate the offset in flat-packed Cy-style, column-major format, required for a given i,j,k. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems.
Definition at line 2610 of file matrices.h.
References i, oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, and oomph::RankFiveTensor< T >::R.
|
inline |
Overload the round brackets to give access as a(i,j,k,l,m)
Definition at line 2562 of file matrices.h.
References i, oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, oomph::RankFiveTensor< T >::range_check(), and oomph::RankFiveTensor< T >::Tensordata.
|
inline |
Overload a const version for read-only access as a(i,j,k,l,m)
Definition at line 2575 of file matrices.h.
References i, oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, oomph::RankFiveTensor< T >::range_check(), and oomph::RankFiveTensor< T >::Tensordata.
|
inline |
Copy assignement.
Definition at line 2277 of file matrices.h.
References i, oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::N, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, and oomph::RankFiveTensor< T >::resize().
|
inlineprivate |
Range check to catch when an index is out of bounds, if so, it issues a warning message and dies by throwing an OomphLibError.
Definition at line 2181 of file matrices.h.
References i, oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::N, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, and oomph::RankFiveTensor< T >::R.
Referenced by oomph::RankFiveTensor< T >::operator()(), and oomph::RankFiveTensor< T >::operator()().
|
inline |
Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems.
Definition at line 2591 of file matrices.h.
References i, and oomph::RankFiveTensor< T >::Tensordata.
|
inline |
Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems.
Definition at line 2601 of file matrices.h.
References i, and oomph::RankFiveTensor< T >::Tensordata.
Resize to a square nxnxnxn tensor.
Definition at line 2384 of file matrices.h.
References oomph::RankFiveTensor< T >::resize().
Referenced by oomph::RankFiveTensor< T >::operator=(), and oomph::RankFiveTensor< T >::resize().
|
inline |
Resize to a general tensor.
Definition at line 2390 of file matrices.h.
References i, oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::N, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, and oomph::RankFiveTensor< T >::Tensordata.
|
inline |
Resize to a general tensor.
Definition at line 2456 of file matrices.h.
References i, oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::M, oomph::RankFiveTensor< T >::N, oomph::RankFiveTensor< T >::P, oomph::RankFiveTensor< T >::Q, oomph::RankFiveTensor< T >::R, and oomph::RankFiveTensor< T >::Tensordata.
|
private |
2nd Tensor dimension
Definition at line 2168 of file matrices.h.
Referenced by oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::nindex2(), oomph::RankFiveTensor< T >::offset(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::operator=(), oomph::RankFiveTensor< T >::range_check(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::resize(), and oomph::RankFiveTensor< T >::resize().
|
private |
1st Tensor dimension
Definition at line 2165 of file matrices.h.
Referenced by oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::nindex1(), oomph::RankFiveTensor< T >::operator=(), oomph::RankFiveTensor< T >::range_check(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::resize(), and oomph::RankFiveTensor< T >::resize().
|
private |
3rd Tensor dimension
Definition at line 2171 of file matrices.h.
Referenced by oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::nindex3(), oomph::RankFiveTensor< T >::offset(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::operator=(), oomph::RankFiveTensor< T >::range_check(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::resize(), and oomph::RankFiveTensor< T >::resize().
|
private |
4th Tensor dimension
Definition at line 2174 of file matrices.h.
Referenced by oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::nindex4(), oomph::RankFiveTensor< T >::offset(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::operator=(), oomph::RankFiveTensor< T >::range_check(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::resize(), and oomph::RankFiveTensor< T >::resize().
|
private |
5th Tensor dimension
Definition at line 2177 of file matrices.h.
Referenced by oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::nindex5(), oomph::RankFiveTensor< T >::offset(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::operator=(), oomph::RankFiveTensor< T >::range_check(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::resize(), and oomph::RankFiveTensor< T >::resize().
|
private |
Private internal representation as pointer to data.
Definition at line 2162 of file matrices.h.
Referenced by oomph::RankFiveTensor< T >::initialise(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::operator()(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::RankFiveTensor(), oomph::RankFiveTensor< T >::raw_direct_access(), oomph::RankFiveTensor< T >::raw_direct_access(), oomph::RankFiveTensor< T >::resize(), oomph::RankFiveTensor< T >::resize(), and oomph::RankFiveTensor< T >::~RankFiveTensor().