GMatTensor 0.10.6
|
Tensors and tensor operations for a(n) array of 2d tensors of different rank, defined in a Cartesian coordinate system. More...
Namespaces | |
namespace | pointer |
API for individual tensors with pointer-only input. | |
Classes | |
class | Array |
Array of tensors: More... | |
Functions | |
array_type::tensor< double, 2 > | Random2 () |
Random 2nd-order tensor (for example for use in testing). More... | |
array_type::tensor< double, 4 > | Random4 () |
Random 4th-order tensor (for example for use in testing). More... | |
array_type::tensor< double, 2 > | O2 () |
2nd-order null tensor (all components equal to zero). More... | |
array_type::tensor< double, 4 > | O4 () |
4th-order null tensor (all components equal to zero). More... | |
array_type::tensor< double, 2 > | I2 () |
2nd-order identity tensor. More... | |
array_type::tensor< double, 4 > | II () |
Result of the dyadic product of two 2nd-order identity tensors (see I2()). More... | |
array_type::tensor< double, 4 > | I4 () |
Fourth order unit tensor. More... | |
array_type::tensor< double, 4 > | I4rt () |
Right-transposed fourth order unit tensor. More... | |
array_type::tensor< double, 4 > | I4s () |
Fourth order symmetric projection. More... | |
array_type::tensor< double, 4 > | I4d () |
Fourth order deviatoric projection. More... | |
template<class T > | |
auto | Trace (const T &A) |
Trace or 2nd-order tensor. More... | |
template<class T , class R > | |
void | trace (const T &A, R &ret) |
Same as Trace() but writes to externally allocated output. More... | |
template<class T > | |
auto | Hydrostatic (const T &A) |
Hydrostatic part of a tensor. More... | |
template<class T , class R > | |
void | hydrostatic (const T &A, R &ret) |
Same as Hydrostatic() but writes to externally allocated output. More... | |
template<class T > | |
auto | A2_ddot_B2 (const T &A, const T &B) |
Double tensor contraction. More... | |
template<class T , class R > | |
void | A2_ddot_B2 (const T &A, const T &B, R &ret) |
Same as A2_ddot_B2(const T& A, const T& B) but writes to externally allocated output. More... | |
template<class T > | |
auto | A2s_ddot_B2s (const T &A, const T &B) |
Same as A2_ddot_B2(const T& A, const T& B, R& ret) but for symmetric tensors. More... | |
template<class T , class R > | |
void | A2s_ddot_B2s (const T &A, const T &B, R &ret) |
Same as A2s_ddot_B2s(const T& A, const T& B) but writes to externally allocated output. More... | |
template<class T > | |
auto | Norm_deviatoric (const T &A) |
Norm of the tensor's deviator: More... | |
template<class T , class R > | |
void | norm_deviatoric (const T &A, R &ret) |
Same as Norm_deviatoric() but writes to externally allocated output. More... | |
template<class T > | |
auto | Deviatoric (const T &A) |
Deviatoric part of a tensor: More... | |
template<class T , class R > | |
void | deviatoric (const T &A, R &ret) |
Same as Deviatoric() but writes to externally allocated output. More... | |
template<class T > | |
auto | Sym (const T &A) |
Symmetric part of a tensor: More... | |
template<class T , class R > | |
void | sym (const T &A, R &ret) |
Same as Sym() but writes to externally allocated output. More... | |
template<class T > | |
auto | A2_dot_B2 (const T &A, const T &B) |
Dot-product (single tensor contraction) More... | |
template<class T , class R > | |
void | A2_dot_B2 (const T &A, const T &B, R &ret) |
Same as A2_dot_B2(const T& A, const T& B) but writes to externally allocated output. More... | |
template<class T > | |
auto | A2_dyadic_B2 (const T &A, const T &B) |
Dyadic product. More... | |
template<class T , class R > | |
void | A2_dyadic_B2 (const T &A, const T &B, R &ret) |
Same as A2_dyadic_B2(const T& A, const T& B) but writes to externally allocated output. More... | |
template<class T , class U > | |
auto | A4_ddot_B2 (const T &A, const U &B) |
Double tensor contraction. More... | |
template<class T , class U , class R > | |
void | A4_ddot_B2 (const T &A, const U &B, R &ret) |
Same as A4_ddot_B2(const T& A, const U& B) but writes to externally allocated output. More... | |
template<class T > | |
size_t | underlying_size_A2 (const T &A) |
Size of the underlying array. More... | |
template<class T > | |
size_t | underlying_size_A4 (const T &A) |
Size of the underlying array. More... | |
template<class T > | |
auto | underlying_shape_A2 (const T &A) -> std::array< size_t, detail::impl_A2< T, 2 >::rank > |
Shape of the underlying array. More... | |
template<class T > | |
auto | underlying_shape_A4 (const T &A) -> std::array< size_t, detail::impl_A4< T, 2 >::rank > |
Shape of the underlying array. More... | |
Tensors and tensor operations for a(n) array of 2d tensors of different rank, defined in a Cartesian coordinate system.
|
inline |
Double tensor contraction.
\( c = A : B \)
or in index notation
\( c = A_{ij} A_{ji} \)
To write to allocated data use A2_ddot_B2(const T& A, const T& B, R& ret).
A | [..., 2, 2] array. |
B | [..., 2, 2] array. |
Definition at line 614 of file Cartesian2d.h.
|
inline |
Same as A2_ddot_B2(const T& A, const T& B) but writes to externally allocated output.
A | [..., 2, 2] array. |
B | [..., 2, 2] array. |
ret | output [...] array. |
Definition at line 628 of file Cartesian2d.h.
|
inline |
Dot-product (single tensor contraction)
\( C = A \cdot B \)
or in index notation
\( C_{ik} = A_{ij} B_{jk} \)
To write to allocated data use A2_dot_B2(const T& A, const T& B, R& ret).
A | [..., 2, 2] array. |
B | [..., 2, 2] array. |
Definition at line 775 of file Cartesian2d.h.
|
inline |
Same as A2_dot_B2(const T& A, const T& B) but writes to externally allocated output.
A | [..., 2, 2] array. |
B | [..., 2, 2] array. |
ret | output [..., 2, 2] array. |
Definition at line 790 of file Cartesian2d.h.
|
inline |
Dyadic product.
\( C = A \otimes B \)
or in index notation
\( C_{ijkl} = A_{ij} B_{kl} \)
To write to allocated data use A2_dyadic_B2(const T& A, const T& B, R& ret).
A | [..., 2, 2] array. |
B | [..., 2, 2] array. |
Definition at line 813 of file Cartesian2d.h.
|
inline |
Same as A2_dyadic_B2(const T& A, const T& B) but writes to externally allocated output.
A | [..., 2, 2] array. |
B | [..., 2, 2] array. |
ret | output [..., 2, 2, 2, 2] array. |
Definition at line 828 of file Cartesian2d.h.
|
inline |
Same as A2_ddot_B2(const T& A, const T& B, R& ret) but for symmetric tensors.
This function is slightly faster. There is no assertion to check the symmetry. To write to allocated data use A2s_ddot_B2s(const T& A, const T& B, R& ret).
A | [..., 2, 2] array. |
B | [..., 2, 2] array. |
Definition at line 645 of file Cartesian2d.h.
|
inline |
Same as A2s_ddot_B2s(const T& A, const T& B) but writes to externally allocated output.
A | [..., 2, 2] array. |
B | [..., 2, 2] array. |
ret | output [...] array. |
Definition at line 659 of file Cartesian2d.h.
|
inline |
Double tensor contraction.
\( C = A : B \)
or in index notation
\( C_{ij} = A_{ijkl} A_{lk} \)
To write to allocated data use A4_ddot_B2(const T& A, const U& B, R& ret).
A | [..., 2, 2, 2, 2] array. |
B | [..., 2, 2] array. |
Definition at line 851 of file Cartesian2d.h.
|
inline |
Same as A4_ddot_B2(const T& A, const U& B) but writes to externally allocated output.
A | [..., 2, 2, 2, 2] array. |
B | [..., 2, 2] array. |
ret | output [..., 2, 2] array. |
Definition at line 866 of file Cartesian2d.h.
|
inline |
Deviatoric part of a tensor:
A - Hydrostatic(A) * I2
See Hydrostatic(). To write to allocated data use deviatoric().
A | [..., 2, 2] array. |
Definition at line 706 of file Cartesian2d.h.
|
inline |
Same as Deviatoric() but writes to externally allocated output.
A | [..., 2, 2] array. |
ret | output [..., 2, 2] array. |
Definition at line 719 of file Cartesian2d.h.
|
inline |
Hydrostatic part of a tensor.
== trace(A) / 2 == trace(A) / d
where d = 2
. To write to allocated output use hydrostatic().
A | [..., 2, 2] array. |
Definition at line 581 of file Cartesian2d.h.
|
inline |
Same as Hydrostatic() but writes to externally allocated output.
A | [..., 2, 2] array. |
ret | output [...] array. |
Definition at line 593 of file Cartesian2d.h.
|
inline |
2nd-order identity tensor.
By definition
\( I_{ij} = \delta_{ij} \)
such that
\( I \cdot A = A \)
or in index notation
\( I_{ij} A_{jk} = A_{ik} \)
See A2_dot_B2().
Definition at line 413 of file Cartesian2d.h.
|
inline |
Fourth order unit tensor.
By definition
\( I_{ijkl} = \delta_{il} \delta_{jk} \)
such that
\( I : A = A \)
or in index notation
\( I_{ijkl} A_{lk} = A_{ij} \)
See A4_ddot_B2().
Definition at line 463 of file Cartesian2d.h.
|
inline |
Fourth order deviatoric projection.
By definition
I = I4s() - 0.5 * II()
such that
\( I : A = sym(A) - tr(A) / 2 \)
See A4_ddot_B2(), Deviatoric().
Definition at line 534 of file Cartesian2d.h.
|
inline |
Right-transposed fourth order unit tensor.
By definition
\( I_{ijkl} = \delta_{ik} \delta_{jl} \)
such that
\( I : A = A^T \)
or in index notation
\( I_{ijkl} A_{lk} = A_{ji} \)
See A4_ddot_B2().
Definition at line 488 of file Cartesian2d.h.
|
inline |
Fourth order symmetric projection.
By definition
I = 0.5 * (I4() + I4rt())
such that
\( I : A = sym(A) \)
or in index notation
\( I_{ijkl} A_{lk} = (A_{ij} + A_{ji}) / 2 \)
See A4_ddot_B2(), Sym().
Definition at line 513 of file Cartesian2d.h.
|
inline |
Result of the dyadic product of two 2nd-order identity tensors (see I2()).
By definition
\( (II)_{ijkl} = \delta_{ij} \delta_{kl} \)
such that
\( II : A = tr(A) I \)
or in index notation
\( (II)_{ijkl} A_{lk} = tr(A) I_{ij} \)
See A4_ddot_B2(), Trace(), I2().
Definition at line 438 of file Cartesian2d.h.
|
inline |
Norm of the tensor's deviator:
\( \sqrt{(dev(A))_{ij} (dev(A))_{ji}} \)
To write to allocated data use norm_deviatoric().
A | [..., 2, 2] array. |
Definition at line 676 of file Cartesian2d.h.
|
inline |
Same as Norm_deviatoric() but writes to externally allocated output.
A | [..., 2, 2] array. |
ret | output [...] array |
Definition at line 689 of file Cartesian2d.h.
|
inline |
2nd-order null tensor (all components equal to zero).
Definition at line 380 of file Cartesian2d.h.
|
inline |
4th-order null tensor (all components equal to zero).
Definition at line 390 of file Cartesian2d.h.
|
inline |
Random 2nd-order tensor (for example for use in testing).
Definition at line 358 of file Cartesian2d.h.
|
inline |
Random 4th-order tensor (for example for use in testing).
Definition at line 369 of file Cartesian2d.h.
|
inline |
Symmetric part of a tensor:
\( (A + A^T) / 2 \)
of in index notation
\( (A_{ij} + A_{ji}) / 2 \)
To write to allocated data use sym().
A | [..., 2, 2] array. |
Definition at line 740 of file Cartesian2d.h.
|
inline |
Same as Sym() but writes to externally allocated output.
A | [..., 2, 2] array. |
ret | output [..., 2, 2] array, may be the same reference as A . |
Definition at line 753 of file Cartesian2d.h.
|
inline |
Trace or 2nd-order tensor.
\( tr(A) = A_{ii} \)
To write to allocated data use trace().
A | [..., 2, 2] array. |
Definition at line 552 of file Cartesian2d.h.
|
inline |
Same as Trace() but writes to externally allocated output.
A | [..., 2, 2] array. |
ret | output [...] array. |
Definition at line 564 of file Cartesian2d.h.
|
inline |
Shape of the underlying array.
A | [..., 2, 2] array. |
[...]
. Definition at line 904 of file Cartesian2d.h.
|
inline |
Shape of the underlying array.
A | [..., 2, 2] array. |
[...]
. Definition at line 916 of file Cartesian2d.h.
|
inline |
Size of the underlying array.
A | [..., 2, 2] array. |
prod([...])
. Definition at line 880 of file Cartesian2d.h.
|
inline |
Size of the underlying array.
A | [..., 2, 2] array. |
prod([...])
. Definition at line 892 of file Cartesian2d.h.