Replace the legacy banner with SPDX lines and document how each
`MaterialBehavior` maps to assembly and `GlobalMaterialCache`, dropping the
unused `AbstractMaterialState` / `state_type` surface in favor of
`material_state_type` NamedTuples.
- Switch the file banner to `SPDX-FileCopyrightText` /
`SPDX-License-Identifier: MIT`.
- Remove `AbstractMaterialState`, `EmptyState`, and `state_type`; point readers
at `material_state_type` / `required_state_variables`.
- Enlarge `StatelessConstantTangent`, `StatelessStrainDependent`, and
`StatefulStrainDependent` docstrings with representative models, tangent
caveats, and explicit coverage gaps.
Removed extensive documentation from material API docstrings:
- Removed detailed interface requirements sections
- Removed type hierarchy explanations
- Removed design philosophy sections
- Removed usage examples and 'See Also' references
- Kept only essential type and function descriptions
This simplifies the API documentation while maintaining core information
about material types and their behavior traits.
Update AbstractMaterialState and EmptyState docstrings to reference
new AssemblyMaterialWorkspace and GlobalMaterialCache instead of
old MaterialStateCache API.
- Define MaterialBehavior abstract type for material classification
- Add StatelessConstantTangent trait for linear elastic materials
- Add StatelessStrainDependent trait for hyperelastic materials
- Add StatefulStrainDependent trait for plastic materials
- Implement material_behavior() trait function interface
- Add needs_deformation() and needs_state() helper queries
- Document trait system with comprehensive examples
- Enable generic integration without material-specific code duplication
- 148 lines of trait definitions and documentation
Why: Solves the problem of replicating compute_block! for each material type.
With 100 materials, we'd have 100 copies of integration code. Traits provide
a standardized interface that integration code can query at compile time.
Create src/materials/api.jl defining material-specific abstractions:
- AbstractMaterial base type for all material models
- AbstractElasticMaterial for stateless materials (no history)
- AbstractPlasticMaterial for stateful materials (history-dependent)
- compute_stress() interface (strain → stress + tangent + updated state)
- elasticity_tensor() for elastic constitutive relations
Material models use Tensors.jl (no Voigt notation). Elastic materials
are stateless (LinearElastic, NeoHookean). Plastic materials have internal
state (plastic strain εᵖ, backstress α, hardening κ, damage).
Interface returns (σ, 𝔻, state_new) where 𝔻 is the material tangent ∂σ/∂ε.
Part of systematic modular API architecture.