![]() |
Reference documentation for deal.II version 9.5.1
|
A namespace with functions that assist in the conversion of vectors and tensors to and from a compressed format using Kelvin notation and weighting. More...
Functions | |
static ::ExceptionBase & | ExcNotationExcFullMatrixToTensorRowSize2 (int arg1, int arg2, int arg3) |
static ::ExceptionBase & | ExcNotationExcFullMatrixToTensorRowSize3 (int arg1, int arg2, int arg3, int arg4) |
static ::ExceptionBase & | ExcNotationExcFullMatrixToTensorColSize2 (int arg1, int arg2, int arg3) |
static ::ExceptionBase & | ExcNotationExcFullMatrixToTensorColSize3 (int arg1, int arg2, int arg3, int arg4) |
Forward operation: Tensor notation to Kelvin notation | |
template<typename Number > | |
Vector< Number > | to_vector (const Number &s) |
template<int dim, typename Number > | |
Vector< Number > | to_vector (const Tensor< 0, dim, Number > &s) |
template<int dim, typename Number > | |
Vector< Number > | to_vector (const Tensor< 1, dim, Number > &v) |
template<int dim, typename Number > | |
Vector< Number > | to_vector (const Tensor< 2, dim, Number > &t) |
template<int dim, typename Number > | |
Vector< Number > | to_vector (const SymmetricTensor< 2, dim, Number > &st) |
template<typename Number > | |
FullMatrix< Number > | to_matrix (const Number &s) |
template<int dim, typename Number > | |
FullMatrix< Number > | to_matrix (const Tensor< 0, dim, Number > &s) |
template<int dim, typename Number > | |
FullMatrix< Number > | to_matrix (const Tensor< 1, dim, Number > &v) |
template<int dim, typename Number > | |
FullMatrix< Number > | to_matrix (const Tensor< 2, dim, Number > &t) |
template<int dim, typename Number > | |
FullMatrix< Number > | to_matrix (const SymmetricTensor< 2, dim, Number > &st) |
template<int dim, typename SubTensor1 = Tensor<2, dim>, typename SubTensor2 = Tensor<1, dim>, typename Number > | |
FullMatrix< Number > | to_matrix (const Tensor< 3, dim, Number > &t) |
template<int dim, typename Number > | |
FullMatrix< Number > | to_matrix (const Tensor< 4, dim, Number > &t) |
template<int dim, typename Number > | |
FullMatrix< Number > | to_matrix (const SymmetricTensor< 4, dim, Number > &st) |
Reverse operation: Kelvin notation to tensor notation | |
template<typename Number > | |
void | to_tensor (const Vector< Number > &vec, Number &s) |
template<int dim, typename Number > | |
void | to_tensor (const Vector< Number > &vec, Tensor< 0, dim, Number > &s) |
template<int dim, typename Number > | |
void | to_tensor (const Vector< Number > &vec, Tensor< 1, dim, Number > &v) |
template<int dim, typename Number > | |
void | to_tensor (const Vector< Number > &vec, Tensor< 2, dim, Number > &t) |
template<int dim, typename Number > | |
void | to_tensor (const Vector< Number > &vec, SymmetricTensor< 2, dim, Number > &st) |
template<typename Number > | |
void | to_tensor (const FullMatrix< Number > &mtrx, Number &s) |
template<int dim, typename Number > | |
void | to_tensor (const FullMatrix< Number > &mtrx, Tensor< 0, dim, Number > &s) |
template<int dim, typename Number > | |
void | to_tensor (const FullMatrix< Number > &mtrx, Tensor< 1, dim, Number > &v) |
template<int dim, typename Number > | |
void | to_tensor (const FullMatrix< Number > &mtrx, Tensor< 2, dim, Number > &t) |
template<int dim, typename Number > | |
void | to_tensor (const FullMatrix< Number > &mtrx, SymmetricTensor< 2, dim, Number > &st) |
template<int dim, typename Number > | |
void | to_tensor (const FullMatrix< Number > &mtrx, Tensor< 3, dim, Number > &t) |
template<int dim, typename Number > | |
void | to_tensor (const FullMatrix< Number > &mtrx, Tensor< 4, dim, Number > &t) |
template<int dim, typename Number > | |
void | to_tensor (const FullMatrix< Number > &mtrx, SymmetricTensor< 4, dim, Number > &st) |
template<typename TensorType , typename Number > | |
TensorType | to_tensor (const Vector< Number > &vec) |
template<typename TensorType , typename Number > | |
TensorType | to_tensor (const FullMatrix< Number > &vec) |
A namespace with functions that assist in the conversion of vectors and tensors to and from a compressed format using Kelvin notation and weighting.
Both Kelvin and Voigt notation adopt the same indexing convention. With specific reference to the spatial dimension 3 case, for a rank-2 symmetric tensor
where
and for a rank-1 tensor
To summarize, the relationship between tensor and Kelvin indices for both the three-dimensional case and the analogously discerned two-dimensional case outlined in the following table:
Dimension 2 | Dimension 3 | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
To illustrate the purpose of this notation, consider the rank-2 symmetric tensors
To achieve these two properties, namely that
and
it holds that the Kelvin-condensed equivalents of the previously defined symmetric tensors, indicated by the
The corresponding and consistent condensed fourth-order symmetric tensor is
The mapping from the two Kelvin indices of the FullMatrix
An important observation is that both the left-hand side tensor
Some useful references that show how this notation works include, amongst others,
and
as well as the online reference found on this wikipedia page and the unit tests.
Vector< Number > Physics::Notation::Kelvin::to_vector | ( | const Number & | s | ) |
Convert a scalar value to its compressed vector equivalent.
The output vector has one entry.
Vector< Number > Physics::Notation::Kelvin::to_vector | ( | const Tensor< 0, dim, Number > & | s | ) |
Convert a rank-0 tensor to its compressed vector equivalent.
The output vector has one entry.
Vector< Number > Physics::Notation::Kelvin::to_vector | ( | const Tensor< 1, dim, Number > & | v | ) |
Convert a rank-1 tensor to its compressed vector equivalent.
The output vector has
Vector< Number > Physics::Notation::Kelvin::to_vector | ( | const Tensor< 2, dim, Number > & | t | ) |
Convert a rank-2 tensor to its compressed vector equivalent.
The output vector has Tensor<2,dim>::n_independent_components entries.
Vector< Number > Physics::Notation::Kelvin::to_vector | ( | const SymmetricTensor< 2, dim, Number > & | st | ) |
Convert a rank-2 symmetric tensor to its compressed vector equivalent.
The output vector has SymmetricTensor<2,dim>::n_independent_components entries.
FullMatrix< Number > Physics::Notation::Kelvin::to_matrix | ( | const Number & | s | ) |
Convert a scalar value to its compressed matrix equivalent.
The output matrix will have one row and one column.
FullMatrix< Number > Physics::Notation::Kelvin::to_matrix | ( | const Tensor< 0, dim, Number > & | s | ) |
Convert a rank-0 tensor to its compressed matrix equivalent.
The output matrix will have one row and one column.
FullMatrix< Number > Physics::Notation::Kelvin::to_matrix | ( | const Tensor< 1, dim, Number > & | v | ) |
Convert a rank-1 tensor to its compressed matrix equivalent.
The output matrix will have
FullMatrix< Number > Physics::Notation::Kelvin::to_matrix | ( | const Tensor< 2, dim, Number > & | t | ) |
Convert a rank-2 tensor to its compressed matrix equivalent.
The output matrix will have
FullMatrix< Number > Physics::Notation::Kelvin::to_matrix | ( | const SymmetricTensor< 2, dim, Number > & | st | ) |
Convert a rank-2 symmetric tensor to its compressed matrix equivalent.
The output matrix will have
FullMatrix< Number > Physics::Notation::Kelvin::to_matrix | ( | const Tensor< 3, dim, Number > & | t | ) |
Convert a rank-3 tensor to its compressed matrix equivalent.
The template arguments SubTensor1
and SubTensor2
determine how the unrolling occurs, in particular how the elements of the rank-3 tensor are to be interpreted.
So, for example, with the following two conversions
the matrix mtrx_1
will have mtrx_2
will have r3_symm_tnsr[i][j][k] == r3_symm_tnsr[i][k][j]
.
FullMatrix< Number > Physics::Notation::Kelvin::to_matrix | ( | const Tensor< 4, dim, Number > & | t | ) |
Convert a rank-4 tensor to its compressed matrix equivalent.
The output matrix will have Tensor<2,dim>::n_independent_components rows and Tensor<2,dim>::n_independent_components columns.
FullMatrix< Number > Physics::Notation::Kelvin::to_matrix | ( | const SymmetricTensor< 4, dim, Number > & | st | ) |
Convert a rank-4 symmetric tensor to its compressed matrix equivalent.
The output matrix will have SymmetricTensor<2,dim>::n_independent_components rows and SymmetricTensor<2,dim>::n_independent_components columns.
void Physics::Notation::Kelvin::to_tensor | ( | const Vector< Number > & | vec, |
Number & | s ) |
Convert a compressed vector to its equivalent scalar value.
void Physics::Notation::Kelvin::to_tensor | ( | const Vector< Number > & | vec, |
Tensor< 0, dim, Number > & | s ) |
Convert a compressed vector to its equivalent rank-0 tensor.
void Physics::Notation::Kelvin::to_tensor | ( | const Vector< Number > & | vec, |
Tensor< 1, dim, Number > & | v ) |
Convert a compressed vector to its equivalent rank-1 tensor.
void Physics::Notation::Kelvin::to_tensor | ( | const Vector< Number > & | vec, |
Tensor< 2, dim, Number > & | t ) |
Convert a compressed vector to its equivalent rank-2 tensor.
void Physics::Notation::Kelvin::to_tensor | ( | const Vector< Number > & | vec, |
SymmetricTensor< 2, dim, Number > & | st ) |
Convert a compressed vector to its equivalent rank-2 symmetric tensor.
void Physics::Notation::Kelvin::to_tensor | ( | const FullMatrix< Number > & | mtrx, |
Number & | s ) |
Convert a compressed matrix to its equivalent scalar value.
void Physics::Notation::Kelvin::to_tensor | ( | const FullMatrix< Number > & | mtrx, |
Tensor< 0, dim, Number > & | s ) |
Convert a compressed matrix to its equivalent rank-0 tensor.
void Physics::Notation::Kelvin::to_tensor | ( | const FullMatrix< Number > & | mtrx, |
Tensor< 1, dim, Number > & | v ) |
Convert a compressed matrix to its equivalent rank-1 tensor.
void Physics::Notation::Kelvin::to_tensor | ( | const FullMatrix< Number > & | mtrx, |
Tensor< 2, dim, Number > & | t ) |
Convert a compressed matrix to its equivalent rank-2 tensor.
void Physics::Notation::Kelvin::to_tensor | ( | const FullMatrix< Number > & | mtrx, |
SymmetricTensor< 2, dim, Number > & | st ) |
Convert a compressed matrix to its equivalent rank-2 symmetric tensor.
void Physics::Notation::Kelvin::to_tensor | ( | const FullMatrix< Number > & | mtrx, |
Tensor< 3, dim, Number > & | t ) |
Convert a compressed matrix to its equivalent rank-3 tensor.
mtrx
, some of the components of t
may be interpreted as having symmetric counterparts. This is the reverse of the operation explained in the documentation of the counterpart to_matrix() function. void Physics::Notation::Kelvin::to_tensor | ( | const FullMatrix< Number > & | mtrx, |
Tensor< 4, dim, Number > & | t ) |
Convert a compressed matrix to its equivalent rank-4 tensor.
void Physics::Notation::Kelvin::to_tensor | ( | const FullMatrix< Number > & | mtrx, |
SymmetricTensor< 4, dim, Number > & | st ) |
Convert a compressed matrix to its equivalent rank-4 symmetric tensor.
TensorType Physics::Notation::Kelvin::to_tensor | ( | const Vector< Number > & | vec | ) |
A generic helper function that will convert a compressed vector to its equivalent TensorType
.
TensorType Physics::Notation::Kelvin::to_tensor | ( | const FullMatrix< Number > & | vec | ) |
A generic helper function that will convert a compressed matrix to its equivalent TensorType
.