Provide multi-field small-strain thermoelasticity with cross blocks between
displacement and temperature using shared geometry SoA caches.
- Dispatch `evaluate_entry` on `field_idx` pairs for `K_uu`, `K_TT`, `K_uT`, `K_Tu`.
- Coupling strength `β` toggles thermal-mechanical interaction; documents additive strain split.
Implement second concrete `AbstractKernel` sharing the DOF-based microkernel
contract with conductivity-focused buffers.
- Support `HeatConductivity`, `MoistureDiffusivity`, `HydraulicConductivity`, and
`ElementWiseScalarDiffusion` pairings with temperature/moisture/pressure fields.
- Cache symmetric second-order tensors per IP; `evaluate_entry` contracts gradients
without displacement-style `(α,β)` branching.
- Add optional `heat_capacity` for consistent thermal mass (`evaluate_mass_entry`)
with zero-cost skip when unset.
- Provide typed constructors that forbid transient flags on steady hydraulic/moisture paths.
Expose steady primal Darcy head formulation as thermal diffusion with
`HydraulicConductivity` and `PressurePotential` fields on shared assembler paths.
Implement vertex displacement + cell pressure coupling with optional bulk
compressibility and indefinite-operator guidance for Krylov usage.
- Weak form matches standard dilatation coupling with `inv_bulk = 1/κ`.
- `evaluate_entry` switches on `field_idx` pairs; shares material tangent path with
continuum kernels for the displacement block.
Provide reusable single-brick mesh factory, symmetry BC constructors, and a
minimal linear-elastic uniaxial solve helper for material calibration tests.
- Builds structured `Hex8` lab meshes via `create_structured_box_mesh`.
- Merges Dirichlet dictionaries safely and documents default Gauss usage.
Add mixed kernel with vertex displacement plus cell-wise strain and stress
unknowns (`eps`, `sig`) for linear `LinearElastic` materials.
- Document discrete block structure (`K_uσ`, `K_εε`, `K_εσ`, …) with Voigt units
matching HR conventions.
- Implement microkernel dispatch across field indices with constant `M`/`G`
matrices precomputed from `C`.
Provide facet-diagonal kernel allocating area/patch contributions per Face unknown
to exercise DOFHandler face numbering and extended evaluate_entry(elem_id).
- Cover Hex8/Hex20/Tet4/Tet10/Wedge6/Pyr5 with physical face area helpers.
- Wire microkernel buffer traits and mass/stiffness evaluators for assembler tests.
Collapse duplicated trait implementations and route everything through the
`GlobalMaterialCache` overload plus explicit material-behavior methods.
- Drop standalone `ElementCache`/`AbstractGeometryCache` copies of constant /
strain-dependent / stateful updaters; rely on `material_behavior` forwarding.
- Import `continuum_kinematics`, `SmallStrainKinematics`, and `GreenLagrangeKinematics`
so stateful updates choose ε versus E via traits instead of ad hoc branches.
- Trim verbose CRITICAL/FIXME commentary while keeping `getfield` guidance for
type-stable workspace access.
- Remove legacy dispatcher taking `Matrix{<:AbstractMaterialState}` state buffers.
- Minor formatting (trailing commas) and docstring refresh on the cache entry.
Align `update_geometry_cache!` with element caches that carry continuum-specific
data and surface scalar basis values needed for mass kernels.
- Remove unused `kernel::AbstractKernel` parameter and narrow `element_cache` to
`ContinuumElementCache`.
- Evaluate `get_basis_functions` each IP, storing `N_data` beside `∇N_data`.
- Rewrite docstring around concrete fields (`X`, `N_data`, `∇N_data`, `detJ_w`)
and zero-allocation guarantees.
Replace outdated Physics/assembly prose with kernel-centric descriptions tied to
`ContinuumKernel`, `HeatKernel`, and the assembler microkernel stack.
- Compress FullThreeD / Axisymmetric narratives and drop stale multi-domain
`Physics(...)` examples.
- Document `ContinuumFormulation{Theory}` as the tag carried by kernels and
point readers at `abstract.jl` / `microkernel.jl` instead of removed assembly paths.
Major refactoring: migrate material cache updates to new workspace API
and add support for GlobalMaterialCache alongside legacy API.
- Change all material_cache to material_workspace parameter names
- Remove M<:AbstractMaterialState type constraints from functions
- Change state handling from EmptyState() to NamedTuple()
- Change material_cache.σ/𝔻/states to material_workspace.fields/states
- Add new overloads for GlobalMaterialCache API (NEW API)
- Add zero-allocation optimizations using getfield and pre-allocated NamedTuples
- Add backward compatibility handling for legacy state types
- Update all function signatures and docstrings
- Add imports for GlobalMaterialCache and helper functions
- Add StatelessConstantTangent overload with pre-allocated NamedTuples
- Add StatelessStrainDependent and StatefulStrainDependent overloads for GlobalMaterialCache
- Keep legacy API overloads for Matrix{<:AbstractMaterialState}
Optimize update_geometry_cache! to eliminate iterator allocations and
update to use coords field.
- Add @inline to update_geometry_cache! for better inlining
- Change enumerate loop to indexed loop to avoid iterator allocation
- Add @inbounds annotation for bounds-check elimination
- Change ip.ξ to ip.coords to use new QuadraturePoint API
Optimize update_element_cache! to eliminate iterator and view allocations.
- Add @inline to update_element_cache! for better inlining
- Change enumerate loop to indexed loop to avoid iterator allocation
- Add @inbounds annotations for bounds-check elimination
- Remove @view allocation by passing array directly to get_dof_mapping!
Refactor continuum kernel to add atomic scalar computation and microkernel
interface while maintaining backward compatibility.
- Add compute_stiffness_value for atomic scalar K[k,l][α,β] computation
- Add compute_stiffness_block for D×D block building using atomic kernel
- Refactor compute_block_at_point to use compute_stiffness_block internally
- Add evaluate function for microkernel interface with field coupling dispatch
- Add basevec import for unit vector construction
- Add conditional imports for evaluate and get_tangent
- Update documentation to reflect new atomic operation structure
- Changed struct field from 'basis::Lagrange{T,1}' to 'basis::Lagrange{1}' (line 91)
- Changed constructor from 'Lagrange{T,1}()' to 'Lagrange{1}()' (line 211)
- Added comments explaining new API: basis order only, topology passed separately
Replace function stub declaration with comment pointing to canonical definition in physics/api.jl. Added note that plate formulations should implement specific methods.
Eliminates documentation replacement warning while preserving API documentation context.
Changed from ∇N_q[k] to ∇N_data[q,k] to match Matrix layout.
- Removed intermediate ∇N_q vector extraction
- Direct 2D indexing: ∇N_data[q, k] for node k at integration point q
- Affects both LinearElastic and J2Plasticity material updates
- Consistent with compute_block interface refactoring
Deleted: src/domains/continuum/theory.jl
Reason:
- Content moved to better-organized files:
* Abstract types → src/domains/continuum/abstract.jl
* Concrete types → src/domains/continuum/types.jl
- Name 'theory.jl' was too vague
- New organization clearer for type hierarchy
This file is obsolete, content preserved in new locations.
Deleted: src/domains/continuum/integration.jl
Reason:
- Monolithic integration preprocessing replaced by three-phase pattern
- Functionality split into:
* update_element_cache.jl (DOF mapping)
* update_geometry_cache.jl (Jacobian, gradients)
* update_material_cache.jl (stress, tangent)
Benefits of split:
- Better separation of concerns
- Individual testing of each phase
- Easier to optimize each phase independently
- Clearer data flow through assembly
This file is obsolete with the new cache architecture.
Deleted: src/domains/continuum/assemble.jl
Reason:
- Old assembly implementation with type instability issues
- Replaced by new architecture in src/assemblers/element_based_coo.jl
- New version achieves zero allocations and 500K elem/s
- Three-phase cache update pattern replaces monolithic approach
Migration:
- Old: Single file with mixed concerns
- New: Separate cache files + update functions + generic assemblers
This file is obsolete with the new cache architecture.
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.
New file: src/domains/continuum/update_geometry_cache.jl (239 lines)
Features:
- update_geometry_cache!(geometry_cache, mesh, nodes, basis)
- Computes shape function gradients at integration points
- Computes Jacobian determinants with quadrature weights
- Part of three-phase cache update pattern
Phase 2 of assembly (Geometry preprocessing):
- Extract element node coordinates
- Evaluate basis function gradients ∇N at each integration point
- Compute Jacobian matrix J and determinant det(J)
- Multiply det(J) × weight → detJ_w for integration
- Transform ∇N from parent to physical space
This is the SECOND of three cache updates called per element:
1. update_element_cache! (DOF mapping)
2. update_geometry_cache! (Jacobian, gradients) ← THIS FILE
3. update_material_cache! (stress, tangent)
New file: src/domains/continuum/update_element_cache.jl (179 lines)
Features:
- update_element_cache!(element_cache, elem_id, mesh, N, field)
- Updates DOF mapping for element nodes
- Resets K_blocks and f_blocks to zero
- Part of three-phase cache update pattern
Phase 1 of assembly (DOF mapping):
- Extract element connectivity
- Map node IDs to global DOFs
- Store in element_cache.dofs
- Clear previous element's data
Implementation:
- Uses get_dof_mapping! for field-to-DOF conversion
- Handles displacement (3 DOF/node) and other fields
- fill! for zero initialization
- @inline for performance
This is the FIRST of three cache updates called per element:
1. update_element_cache! (DOF mapping) ← THIS FILE
2. update_geometry_cache! (Jacobian, gradients)
3. update_material_cache! (stress, tangent)
New file: src/domains/continuum/types.jl
Concrete types defined:
- EmptyState <: AbstractMaterialState (for stateless materials)
- Future: Can add J2PlasticityState, DamageState, etc.
Purpose:
- Centralize material state types
- Separate from abstract interface definitions
- Enable type-stable state management in MaterialStateCache
EmptyState used by LinearElastic material (no history variables).
Plastic materials will have custom state types with fields for
equivalent plastic strain, back stress, etc.
New file: src/domains/continuum/abstract.jl
Abstract types defined:
- AbstractContinuumTheory - Supertype for FullThreeD, PlaneStress, etc.
- AbstractKernel - Supertype for ContinuumKernel and future variants
- AbstractMaterialState - Supertype for material state (EmptyState, plasticity, etc.)
Purpose:
- Establish type hierarchy for dispatch
- Document interface expectations
- Enable future extensions (shells, beams, etc.)
These were previously defined in other files, now centralized
for clarity and maintainability.
- Added @inline annotation for hot path function
- Called once per integration point per element pair
- Critical for achieving 484K elem/s throughput
- Part of selective inlining strategy (97% of max performance)
- Implement Discrete Kirchhoff Triangle (DKT) plate bending element
- Define DKTPlate formulation type with material and thickness parameters
- Implement assemble_stiffness! for plate bending problems
- Compute element stiffness matrix using DKT basis functions
- Support transverse displacement (w) and rotation (θx, θy) DOFs
- Include numerical integration over triangular domain
- Implement element force vector assembly
- Support distributed and point loads on plate surface
- Document DKT theory and implementation details
- 645 lines of complete DKT plate element implementation