feat(materials): add symmetric fourth-order identity helper

Provide the Lamé-style symmetric identity tensor builder shared by elastoplastic
material implementations.

- Add `symmetric_identity_tensor()` returning `SymmetricTensor{4,3}` with SPDX header.
This commit is contained in:
Jukka Aho
2026-05-09 18:32:29 +03:00
parent 2f6715a025
commit ec8efd52dd
@@ -0,0 +1,10 @@
# SPDX-FileCopyrightText: 2015-2026 Jukka Aho
# SPDX-License-Identifier: MIT
using Tensors
"""Fourth-order symmetric identity 𝕀ˢʸᵐ for Lamé-style stiffness `λ I⊗I + 2μ 𝕀ˢʸᵐ`."""
@inline function symmetric_identity_tensor()
return SymmetricTensor{4,3}((i, j, k, l) ->
(i == k && j == l ? 0.5 : 0.0) + (i == l && j == k ? 0.5 : 0.0))
end