Files
JuliaFEM.jl/src
Jukka Aho 24968918c8 feat(continuum): Add update_material_cache! for stress and tangent
New file: src/domains/continuum/update_material_cache.jl (247 lines)

Features:
- update_material_cache!(material_cache, kernel, geometry_cache, ...)
- Computes stress tensors at integration points
- Computes tangent modulus tensors
- Updates material state for history-dependent materials
- Part of three-phase cache update pattern

Phase 3 of assembly (Material evaluation):
- Loop over integration points
- Compute strain tensor from ∇N and displacements
- Call material.compute_stress(ε, state_old, Δt)
- Store σ (stress) and 𝔻 (tangent modulus)
- Update state_new for next increment

Implementation:
- Handles linear case (u_global = nothing)
- Handles nonlinear case (with displacement field)
- Calls compute_stress (not inlined, complex material law)
- Stores results in material_cache.σ and material_cache.𝔻

State management:
- state_old: material state at start of increment
- state_new: material state at end of increment
- After convergence: state_old ← state_new

This is the THIRD of three cache updates called per element:
1. update_element_cache! (DOF mapping)
2. update_geometry_cache! (Jacobian, gradients)
3. update_material_cache! (stress, tangent) ← THIS FILE

After these three updates, compute_block! uses the caches to
compute element stiffness blocks K_kl.
2025-11-20 16:56:40 +02:00
..
2025-11-08 07:57:15 +02:00
2018-09-06 13:34:26 +03:00