New 62-line LocalField structure:
- LocalField{T,G,R,GR}: field quantities at a point (value, gradient, rate, gradient_rate)
- Unified dynamic and quasi-static treatment (quasi-static: rate=0)
- Supports field values, spatial gradients, time derivatives, gradient rates
- Used for material evaluation at integration points
- Already integrated in JuliaFEM.jl (line 141)
Provides comprehensive field data structure for material constitutive evaluation.
Add quantity type extraction trait for field types and optimize DOF
mapping function for zero-allocation performance.
- Add quantity_type trait function for field types
- Implement quantity_type for Displacement, Temperature, DisplacementRotation
- Add @inline to get_dof_mapping! for better inlining
- Optimize get_dof_mapping! loop to use indexed access instead of iterator
- Avoid iterator allocation in DOF mapping computation
Replace abstract type definition with comment pointing to canonical definition in fields/api.jl.
Eliminates documentation replacement warning while keeping single source of truth for AbstractField supertype.
New functions:
- get_dof_mapping!(dofs, node_ids, field) - maps nodes to global DOFs
- get_field(field) - returns field object from various inputs
Features:
- Handles 1D, 2D, 3D displacement fields
- Supports temperature fields
- Validates node IDs are positive integers
- Added @inline for performance (called per element)
These functions support the new cache update architecture.
Create src/fields/api.jl defining field-specific abstractions:
- AbstractField base type for all field variables
- Displacement{Dim} for solid mechanics (Dim DOFs per node: ux, uy, uz)
- Temperature for heat transfer (1 DOF per node: T)
- DisplacementRotation{Dim} for beams/shells (2*Dim DOFs: displacement + rotation)
- dofs_per_node() interface for DOF counting
Field type determines solution vector structure, boundary condition
interpretation, and assembly dispatch. Examples:
- Displacement{3} with ContinuumFormulation{FullThreeD} → 3D elasticity
- Temperature with ContinuumFormulation{FullThreeD} → heat transfer
- DisplacementRotation{3} with BeamFormulation → 6 DOFs (3 trans + 3 rot)
Part of systematic modular API architecture.