mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-26 20:01:32 +00:00
24968918c8
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.