RankThreeTensor is designed to handle any N-dimensional third order tensor, r. More...
#include <RankThreeTensor.h>
Public Types | |
| enum | InitMethod { initNone } |
| Initialization method. More... | |
| enum | FillMethod { automatic, general, plane_normal } |
| To fill up the 27 entries in the 3rd-order tensor, fillFromInputVector is called with one of the following fill_methods. More... | |
Public Member Functions | |
| RankThreeTensorTempl () | |
| Default constructor; fills to zero. More... | |
| RankThreeTensorTempl (const RankThreeTensorTempl< T > &a)=default | |
| Copy assignment operator must be defined if used. More... | |
| template<typename T2 > | |
| RankThreeTensorTempl (const RankThreeTensorTempl< T2 > ©) | |
| Construct from other class template instantiation. More... | |
| RankThreeTensorTempl (const InitMethod) | |
| Select specific initialization pattern. More... | |
| RankThreeTensorTempl (const std::vector< T > &, FillMethod method=automatic) | |
| Fill from vector. More... | |
| T & | operator() (unsigned int i, unsigned int j, unsigned int k) |
| Gets the value for the index specified. Takes index = 0,1,2. More... | |
| T | operator() (unsigned int i, unsigned int j, unsigned int k) const |
| Gets the value for the index specified. Takes index = 0,1,2. Used for const. More... | |
| RankThreeTensorTempl< T > & | operator= (const T &value) |
| Assignment-from-scalar operator. More... | |
| void | zero () |
| Zeros out the tensor. More... | |
| void | print (std::ostream &stm=Moose::out) const |
| Print the rank three tensor. More... | |
| RankThreeTensorTempl< T > & | operator= (const RankThreeTensorTempl< T > &a) |
| copies values from "a" into this tensor More... | |
| template<typename T2 > | |
| RankThreeTensorTempl< T > & | operator= (const RankThreeTensorTempl< T2 > &a) |
| libMesh::VectorValue< T > | operator* (const RankTwoTensorTempl< T > &a) const |
| b_i = r_ijk * a_jk More... | |
| RankTwoTensorTempl< T > | operator* (const libMesh::VectorValue< T > &a) const |
| b_ij = r_ijk * a_k More... | |
| RankThreeTensorTempl< T > | operator* (const T a) const |
| r_ijk*a More... | |
| RankThreeTensorTempl< T > & | operator*= (const T a) |
| r_ijk *= a More... | |
| RankThreeTensorTempl< T > | operator/ (const T a) const |
| r_ijk/a More... | |
| RankThreeTensorTempl< T > & | operator/= (const T a) |
| r_ijk /= a for all i, j, k More... | |
| RankThreeTensorTempl< T > & | operator+= (const RankThreeTensorTempl< T > &a) |
| r_ijk += a_ijk for all i, j, k More... | |
| RankThreeTensorTempl< T > | operator+ (const RankThreeTensorTempl< T > &a) const |
| r_ijkl + a_ijk More... | |
| RankThreeTensorTempl< T > & | operator-= (const RankThreeTensorTempl< T > &a) |
| r_ijk -= a_ijk More... | |
| RankThreeTensorTempl< T > | operator- (const RankThreeTensorTempl< T > &a) const |
| r_ijk - a_ijk More... | |
| RankThreeTensorTempl< T > | operator- () const |
| -r_ijk More... | |
| T | L2norm () const |
| (r_ijk*r_ijk) More... | |
| template<class T2 > | |
| void | rotate (const T2 &R) |
| Rotate the tensor using r_ijk = R_im R_in R_ko r_mno. More... | |
| void | rotate (const libMesh::TensorValue< T > &R) |
| Rotate the tensor using r_ijk = R_im R_in R_ko r_mno. More... | |
| void | fillFromInputVector (const std::vector< T > &input, FillMethod fill_method=automatic) |
| fillFromInputVector takes some number of inputs to fill the Rank-3 tensor. More... | |
| void | fillFromPlaneNormal (const libMesh::VectorValue< T > &input) |
| Fills RankThreeTensor from plane normal vectors ref. More... | |
| RankFourTensorTempl< T > | mixedProductRankFour (const RankTwoTensorTempl< T > &a) const |
| Creates fourth order tensor D_{ijkl}=A_{mij}*b_{mn}*A_{nkl} where A is rank 3 and b is rank 2. More... | |
| libMesh::VectorValue< T > | doubleContraction (const RankTwoTensorTempl< T > &b) const |
| Creates a vector from the double contraction of a rank three and rank two tensor. More... | |
Static Public Member Functions | |
| static MooseEnum | fillMethodEnum () |
| Static method for use in validParams for getting the "fill_method". More... | |
Static Public Attributes | |
| static constexpr unsigned int | N = Moose::dim |
| tensor dimension and powers of the dimension More... | |
| static constexpr unsigned int | N2 = N * N |
| static constexpr unsigned int | N3 = N * N * N |
Protected Member Functions | |
| void | fillGeneralFromInputVector (const std::vector< T > &input) |
Protected Attributes | |
| T | _vals [N3] |
| The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) More... | |
Friends | |
| template<class T2 > | |
| class | RankTwoTensorTempl |
| template<class T2 > | |
| class | RankThreeTensorTempl |
| template<class T2 > | |
| class | RankFourTensorTempl |
| std::ostream & | operator<< (std::ostream &os, const RankThreeTensorTempl< T > &t) |
| template<class T2 > | |
| void | dataStore (std::ostream &, RankThreeTensorTempl< T2 > &, void *) |
| template<class T2 > | |
| void | dataLoad (std::istream &, RankThreeTensorTempl< T2 > &, void *) |
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
Definition at line 55 of file RankThreeTensor.h.
| enum RankThreeTensorTempl::FillMethod |
To fill up the 27 entries in the 3rd-order tensor, fillFromInputVector is called with one of the following fill_methods.
See the fill*FromInputVector functions for more details
| Enumerator | |
|---|---|
| automatic | |
| general | |
| plane_normal | |
Definition at line 75 of file RankThreeTensor.h.
| enum RankThreeTensorTempl::InitMethod |
| RankThreeTensorTempl< T >::RankThreeTensorTempl | ( | ) |
Default constructor; fills to zero.
Definition at line 47 of file RankThreeTensorImplementation.h.
|
default |
Copy assignment operator must be defined if used.
| RankThreeTensorTempl< T >::RankThreeTensorTempl | ( | const RankThreeTensorTempl< T2 > & | copy | ) |
Construct from other class template instantiation.
Definition at line 259 of file RankThreeTensor.h.
| RankThreeTensorTempl< T >::RankThreeTensorTempl | ( | const InitMethod | init | ) |
Select specific initialization pattern.
Definition at line 56 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T >::RankThreeTensorTempl | ( | const std::vector< T > & | input, |
| FillMethod | method = automatic |
||
| ) |
Fill from vector.
Definition at line 69 of file RankThreeTensorImplementation.h.
| libMesh::VectorValue< T > RankThreeTensorTempl< T >::doubleContraction | ( | const RankTwoTensorTempl< T > & | b | ) | const |
Creates a vector from the double contraction of a rank three and rank two tensor.
c_i = A_{ijk} * b_{jk}
Definition at line 379 of file RankThreeTensorImplementation.h.
| void RankThreeTensorTempl< T >::fillFromInputVector | ( | const std::vector< T > & | input, |
| FillMethod | fill_method = automatic |
||
| ) |
fillFromInputVector takes some number of inputs to fill the Rank-3 tensor.
| input | the numbers that will be placed in the tensor |
| fill_method | this can be: general (use fillGeneralFromInputVector) more fill_methods to be implemented soon! |
Definition at line 255 of file RankThreeTensorImplementation.h.
| void RankThreeTensorTempl< T >::fillFromPlaneNormal | ( | const libMesh::VectorValue< T > & | input | ) |
Fills RankThreeTensor from plane normal vectors ref.
Kuhl et. al. Int. J. Solids Struct. 38(2001) 2933-2952
| input | plane normal vector |
Definition at line 291 of file RankThreeTensorImplementation.h.
|
protected |
Definition at line 365 of file RankThreeTensorImplementation.h.
|
static |
Static method for use in validParams for getting the "fill_method".
Definition at line 41 of file RankThreeTensorImplementation.h.
| T RankThreeTensorTempl< T >::L2norm | ( | ) | const |
(r_ijk*r_ijk)
Definition at line 242 of file RankThreeTensorImplementation.h.
| RankFourTensorTempl< T > RankThreeTensorTempl< T >::mixedProductRankFour | ( | const RankTwoTensorTempl< T > & | a | ) | const |
Creates fourth order tensor D_{ijkl}=A_{mij}*b_{mn}*A_{nkl} where A is rank 3 and b is rank 2.
| a | RankThreeTensor A in the equation above |
Definition at line 317 of file RankThreeTensorImplementation.h.
|
inline |
Gets the value for the index specified. Takes index = 0,1,2.
Definition at line 101 of file RankThreeTensor.h.
|
inline |
Gets the value for the index specified. Takes index = 0,1,2. Used for const.
Definition at line 107 of file RankThreeTensor.h.
| libMesh::VectorValue< T > RankThreeTensorTempl< T >::operator* | ( | const RankTwoTensorTempl< T > & | a | ) | const |
b_i = r_ijk * a_jk
Definition at line 103 of file RankThreeTensorImplementation.h.
| RankTwoTensorTempl< T > RankThreeTensorTempl< T >::operator* | ( | const libMesh::VectorValue< T > & | a | ) | const |
b_ij = r_ijk * a_k
Definition at line 122 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > RankThreeTensorTempl< T >::operator* | ( | const T | a | ) | const |
r_ijk*a
Definition at line 142 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > & RankThreeTensorTempl< T >::operator*= | ( | const T | a | ) |
r_ijk *= a
Definition at line 154 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > RankThreeTensorTempl< T >::operator+ | ( | const RankThreeTensorTempl< T > & | a | ) | const |
r_ijkl + a_ijk
Definition at line 196 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > & RankThreeTensorTempl< T >::operator+= | ( | const RankThreeTensorTempl< T > & | a | ) |
r_ijk += a_ijk for all i, j, k
Definition at line 186 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > RankThreeTensorTempl< T >::operator- | ( | const RankThreeTensorTempl< T > & | a | ) | const |
r_ijk - a_ijk
Definition at line 218 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > RankThreeTensorTempl< T >::operator- | ( | ) | const |
-r_ijk
Definition at line 230 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > & RankThreeTensorTempl< T >::operator-= | ( | const RankThreeTensorTempl< T > & | a | ) |
r_ijk -= a_ijk
Definition at line 208 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > RankThreeTensorTempl< T >::operator/ | ( | const T | a | ) | const |
r_ijk/a
Definition at line 164 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > & RankThreeTensorTempl< T >::operator/= | ( | const T | a | ) |
r_ijk /= a for all i, j, k
Definition at line 176 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > & RankThreeTensorTempl< T >::operator= | ( | const T & | value | ) |
Assignment-from-scalar operator.
Definition at line 84 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > & RankThreeTensorTempl< T >::operator= | ( | const RankThreeTensorTempl< T > & | a | ) |
copies values from "a" into this tensor
Definition at line 93 of file RankThreeTensorImplementation.h.
| RankThreeTensorTempl< T > & RankThreeTensorTempl< T >::operator= | ( | const RankThreeTensorTempl< T2 > & | a | ) |
Definition at line 318 of file RankThreeTensor.h.
| void RankThreeTensorTempl< T >::print | ( | std::ostream & | stm = Moose::out | ) | const |
Print the rank three tensor.
Definition at line 392 of file RankThreeTensorImplementation.h.
Rotate the tensor using r_ijk = R_im R_in R_ko r_mno.
Definition at line 268 of file RankThreeTensor.h.
| void RankThreeTensorTempl< T >::rotate | ( | const libMesh::TensorValue< T > & | R | ) |
Rotate the tensor using r_ijk = R_im R_in R_ko r_mno.
Definition at line 338 of file RankThreeTensorImplementation.h.
| void RankThreeTensorTempl< T >::zero | ( | ) |
Zeros out the tensor.
Definition at line 76 of file RankThreeTensorImplementation.h.
|
friend |
|
friend |
|
friend |
Definition at line 121 of file RankThreeTensor.h.
Definition at line 234 of file RankThreeTensor.h.
Definition at line 231 of file RankThreeTensor.h.
Definition at line 228 of file RankThreeTensor.h.
|
protected |
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k)
Definition at line 217 of file RankThreeTensor.h.
Referenced by dataLoad(), dataStore(), RankThreeTensorTempl< T >::operator()(), RankThreeTensorTempl< T >::operator*(), RankThreeTensorTempl< T >::operator+(), RankThreeTensorTempl< T >::operator+=(), RankThreeTensorTempl< T >::operator-(), RankThreeTensorTempl< T >::operator-=(), RankThreeTensorTempl< T >::operator/(), RankThreeTensorTempl< T >::operator=(), RankThreeTensorTempl< T >::RankThreeTensorTempl(), and RankThreeTensorTempl< T >::rotate().
|
static |
tensor dimension and powers of the dimension
Definition at line 59 of file RankThreeTensor.h.
Referenced by RankThreeTensorTempl< T >::operator()().
|
static |
Definition at line 60 of file RankThreeTensor.h.
|
static |
Definition at line 61 of file RankThreeTensor.h.
1.8.14