hookeai.simulators.fetorch.math.tensorops

FETorch: Algebraic tensorial operations and standard tensorial operators.

This module is essentially a toolkit containing the definition of several standard tensorial operators (e.g., Kronecker delta, second- and fourth-order identity tensors, rotation tensor) and tensorial operations (e.g., tensorial product, tensorial contraction, spectral decomposition) arising in computational mechanics.

Apart from a conversion to a PyTorch framework and some additional procedures, most of the code is taken from the package cratepy [1].

Functions

dyad11

Dyadic product: \(i \otimes j \rightarrow ij\).

dyad22_1

Dyadic product: \(ij \otimes kl \rightarrow ijkl\).

dyad22_2

Dyadic product: \(ik \otimes jl \rightarrow ijkl\).

dyad22_3

Dyadic product: \(il \otimes jk \rightarrow ijkl\).

dot21_1

Single contraction: \(ij \cdot j \rightarrow i\).

dot12_1

Single contraction: \(i \cdot ij \rightarrow j\).

dot42_1

Single contraction: \(ijkm \cdot lm \rightarrow ijkl\).

dot42_2

Single contraction: \(ipkl \cdot jp \rightarrow ijkl\).

dot42_3

Single contraction: \(ijkm \cdot ml \rightarrow ijkl\).

dot24_1

Single contraction: \(im \cdot mjkl \rightarrow ijkl\).

dot24_2

Single contraction: \(jm \cdot imkl \rightarrow ijkl\).

dot24_3

Single contraction: \(km \cdot ijml \rightarrow ijkl\).

dot24_4

Single contraction: \(lm \cdot ijkm \rightarrow ijkl\).

ddot22_1

Double contraction: \(ij : ij \rightarrow \text{scalar}\).

ddot42_1

Double contraction: \(ijkl : kl \rightarrow ij\).

ddot44_1

Double contraction: \(ijmn : mnkl \rightarrow ijkl\).

dd

Kronecker delta function.

get_id_operators

Set common second- and fourth-order identity operators.

fo_dinv_sym(inv)

Derivative of inverse of symmetric second-order tensor w.r.t. to itself.

Functions

dd(i, j)

Kronecker delta function.

ddot22_1(a2, b2)

ddot24_1(a2, b4)

ddot42_1(a4, b2)

ddot44_1(a4, b4)

dot12_1(a1, b2)

dot21_1(a2, b1)

dot24_1(a2, b4)

dot24_2(a2, b4)

dot24_3(a2, b4)

dot24_4(a2, b4)

dot42_1(a4, b2)

dot42_2(a4, b2)

dot42_3(a4, b2)

dyad11(a1, b1)

dyad22_1(a2, b2)

dyad22_2(a2, b2)

dyad22_3(a2, b2)

fo_dinv_sym(inv)

Derivative of inverse of symmetric second-order tensor w.r.t.

get_id_operators(n_dim[, device])

Set common second- and fourth-order identity operators.