From ec8efd52ddf3d75d81df1595148d54d0a693b030 Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Sat, 9 May 2026 18:32:29 +0300 Subject: [PATCH] feat(materials): add symmetric fourth-order identity helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provide the Lamé-style symmetric identity tensor builder shared by elastoplastic material implementations. - Add `symmetric_identity_tensor()` returning `SymmetricTensor{4,3}` with SPDX header. --- src/materials/symmetric_fourth_identity.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/materials/symmetric_fourth_identity.jl diff --git a/src/materials/symmetric_fourth_identity.jl b/src/materials/symmetric_fourth_identity.jl new file mode 100644 index 0000000..7f2af76 --- /dev/null +++ b/src/materials/symmetric_fourth_identity.jl @@ -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