Commit Graph

901 Commits

Author SHA1 Message Date
Jukka Aho 9ee8157c54 test(dofs): add DOF extraction test
New test file for DOF extraction functionality:
- Tests extract_element_dofs() function
- Tests extract_element_dofs_structured() function
- Single-field and multi-field test cases
- Type stability verification

Provides test coverage for DOF extraction from global solution vectors.
2025-12-15 06:20:23 +02:00
Jukka Aho 3090679f85 docs(dofs): add generated vs manual DOF comparison example
New comparison example demonstrating:
- Generated DOF extraction vs manual implementation
- Performance comparison
- Code generation benefits
- Type stability advantages

Provides comparison example for DOF system code generation.
2025-12-15 06:20:06 +02:00
Jukka Aho 418f40a2df docs(dofs): add simple DOF usage example
New example file demonstrating basic DOF system usage:
- Simple single-field and multi-field element creation
- DOFManager usage
- Element creation workflow
- Basic DOF extraction examples

Provides simple usage examples for the DOF system.
2025-12-15 06:19:58 +02:00
Jukka Aho 0f8c013178 docs(dofs): add DOF system performance analysis
New performance analysis documentation for DOF system:
- Performance characteristics of DOF-based operations
- Type stability analysis
- Allocation profiling results
- Optimization strategies

Provides performance documentation for the DOF system.
2025-12-15 06:19:53 +02:00
Jukka Aho 3ee615045b docs(dofs): add comprehensive DOF system documentation
New 205-line DOF system documentation:
- Philosophy: multi-field is fundamental, single-field is special case
- Core concept: DOF{T,E} abstract type for type-level specifications
- Field specifications with @DOFSet macro
- Usage examples for single-field and multi-field elements
- DOFManager and element creation workflow
- DOF connectivity for inverse mapping
- Performance notes and design rationale

Provides complete documentation for the unified DOF system architecture.
2025-12-15 06:19:47 +02:00
Jukka Aho fd51534b6b feat(physics): add helper utilities for multi-field microkernel assembly
New 88-line formulation utilities:
- field_type_for_dispatch(): extract field type from Element's S parameter
- Helper functions for multi-field Element{K,P,S} system
- Works with NamedTuple-based field specifications
- Supports thermoelasticity and other multi-physics couplings
- Already integrated in JuliaFEM.jl (line 500)

Provides utilities for multi-field microkernel assembly with Element{K,P,S} system.
2025-12-15 06:18:44 +02:00
Jukka Aho 72b10c937b feat(physics): add microkernel interface for DOF-based assembly
New 83-line microkernel interface:
- evaluate(): compute single scalar contribution to K[i,j] at integration point
- Matrix-free assembly support for DOF-based assemblers
- Multi-physics coupling via type dispatch
- Zero-allocation assembly with precomputed caches
- Default implementation returns 0.0 (no coupling)
- Already integrated in JuliaFEM.jl (line 499)

Provides microkernel architecture for efficient matrix-free assembly.
2025-12-15 06:18:38 +02:00
Jukka Aho 4a47610d3f feat(physics): add strain extraction from displacement gradients
New 60-line strain extraction system:
- extract_strain(): extract strain tensor from displacement gradient
- extract_strain_rate(): extract strain rate from velocity gradient
- extract_strain_2d(): 2D version
- Uses symmetric() to compute symmetric part of gradient
- Already integrated in JuliaFEM.jl (line 186)

Provides strain computation for continuum mechanics formulations.
2025-12-15 06:18:18 +02:00
Jukka Aho fc2ced0d4a feat(basis): add plate element basis functions (DKT, DST)
New 416-line plate element basis system:
- AbstractPlateBasis: base type for plate bending elements
- DKT (Discrete Kirchhoff Triangle): 3-node triangular plate element
- DST (Discrete Shear Triangle): 3-node Mindlin-Reissner plate element
- Non-conforming elements with multiple DOF types per node (w, θx, θy)
- Mixed continuity: C0 deflection, discontinuous rotations
- Kirchhoff constraint enforcement via basis construction
- References: Batoz et al. (1980), Zienkiewicz & Taylor

Provides plate bending element basis functions for structural analysis.
2025-12-15 06:17:43 +02:00
Jukka Aho d1fb022fcc feat(materials): add material trait system foundation
New 88-line material trait system:
- supported_physics(): returns tuple of supported physics types
- required_field_types(): returns tuple of required field types
- required_state_variables(): returns tuple of state variable types
- Type-level dispatch support for @generated functions
- Extensible trait system for material implementations
- Already integrated in JuliaFEM.jl (line 430)

Provides foundation for compositional material trait system.
2025-12-15 06:17:34 +02:00
Jukka Aho e8c832ac6e feat(materials): add compositional state variable system
New 91-line state variable trait system:
- AbstractStateVariable: base type for state variables
- state_variable_type(), default_symbol(): state variable traits
- PlasticStrain, Backstress, EquivalentPlasticStrain: example implementations
- Compositional design: state variables are independent building blocks
- Already integrated in JuliaFEM.jl (line 425)

Provides extensible state variable system for material state management.
2025-12-15 06:17:30 +02:00
Jukka Aho 3259d037be feat(fields): add LocalField structure for material evaluation
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.
2025-12-15 06:17:25 +02:00
Jukka Aho dd50aa3f4c feat(elements): add field interpolation at quadrature points
New 527-line field interpolation system:
- interpolate_fields(): interpolate all fields and gradients at reference point
- interpolate_field(): interpolate single field
- interpolate_field_value(): interpolate field value only
- Supports scalar and vector fields with gradients
- Zero-allocation @generated function for type stability
- Returns NamedTuple with field values and gradients
- Already integrated in JuliaFEM.jl (line 354)

Provides comprehensive field interpolation for material evaluation at integration points.
2025-12-15 06:17:05 +02:00
Jukka Aho 390965b524 feat(elements): add DOF extraction from global solution vector
New 122-line DOF extraction system:
- extract_element_dofs(): extract element DOFs as flat tuples from global vector
- extract_element_dofs_structured(): extract as NamedTuple with field names
- Zero-allocation @generated function for type stability
- Supports single-field and multi-field DOF specifications
- Already integrated in JuliaFEM.jl (line 353)

Provides efficient DOF extraction for element-level operations.
2025-12-15 06:16:39 +02:00
Jukka Aho 56d4a5ae70 feat(materials): add global material cache for state variables
New 362-line material cache system:
- GlobalMaterialCache{StateType}: stores state variables at all IPs/elements
- material_state_type(): infer state NamedTuple type from material traits
- create_global_material_cache(): factory function with automatic type inference
- create_zero_state(): zero-initialize state NamedTuples
- Supports stateless (empty NamedTuple) and stateful materials
- Type-stable NamedTuple-based storage
- Zero-allocation state updates (functional style)
- Already integrated in JuliaFEM.jl (line 437)

Provides persistent state storage for time-stepping and material state management.
2025-12-15 06:16:16 +02:00
Jukka Aho e293e74eae feat(materials): add material field trait system
New 140-line material field trait system:
- required_material_fields(): define fields required by physics (Elasticity, Thermal)
- material_field_type(): infer field NamedTuple type from material's supported physics
- compose_field_types(): compose multiple NamedTuple types for multi-physics
- Supports Elasticity (σ, 𝔻) and Thermal (q, k) physics
- Type-stable field type inference
- Already integrated in JuliaFEM.jl (line 431)

Provides compositional field design for material-physics coupling.
2025-12-15 06:15:49 +02:00
Jukka Aho 291384dcb9 feat(io): add Code Aster .rmed results reading (requires HDF5)
New 60-line Code Aster results reader:
- RMEDFile: Code Aster result .rmed file structure
- aster_read_nodes(): read nodes from result file
- aster_read_data(): read nodal/Gauss point field data
- Supports NODE and ELGA (Gauss point) field types
- Requires HDF5.jl (optional dependency)
- Required by AsterReader module

Provides Code Aster .rmed file results reading functionality.
2025-12-15 06:15:00 +02:00
Jukka Aho ae9de8dd91 feat(io): add Code Aster .med mesh reading (requires HDF5)
New 222-line Code Aster mesh reader:
- MEDFile: Code Aster binary .med file structure
- aster_read_mesh_raw(): read mesh from .med file using HDF5
- aster_parse_nodes(): parse node coordinates from text sections
- get_mesh_names(), get_mesh(): mesh access utilities
- get_node_sets(), get_element_sets(): extract named sets
- to_ascii(): convert Int8 vectors to ASCII strings
- Requires HDF5.jl (optional dependency)
- Required by AsterReader module

Provides Code Aster .med file mesh reading functionality.
2025-12-15 06:14:40 +02:00
Jukka Aho d7607f09fd feat(io): add AsterReader module for Code Aster .med/.rmed files
New 25-line AsterReader module:
- Module wrapper for Code Aster reader (requires HDF5.jl)
- Includes: read_aster_mesh.jl, read_aster_results.jl
- Exports: aster_read_mesh
- parse_node_id(): utility for parsing node IDs from names
- Requires HDF5.jl (optional dependency, conditionally loaded)

Provides Code Aster .med/.rmed file reading infrastructure.
2025-12-15 06:14:19 +02:00
Jukka Aho 832bf2a34d feat(io): add Abaqus model download utility
New 43-line download utility:
- abaqus_download(): download Abaqus models from internet
- Uses environment variables: ABAQUS_DOWNLOAD_URL, ABAQUS_DOWNLOAD_DIR
- Checks if file already exists before downloading
- Supports dry-run mode for testing
- Required by AbaqusReader module for example model downloads

Provides utility for downloading Abaqus example models from documentation.
2025-12-15 06:13:51 +02:00
Jukka Aho 11ff412ed2 feat(io): add surface element creation from Abaqus surfaces
New 68-line surface element creation:
- create_surface_element(): create surface elements from solid element faces
- element_mapping: mapping table for element face → surface element topology
- Supports Tet4→Tri3, Tet10→Tri6, Hex8→Quad4, Hex20→Quad8, Wedge6→Quad4/Tri3
- Maps Abaqus surface definitions to JuliaFEM element types
- Required by abaqus_reader.jl for boundary condition application

Provides surface element extraction from Abaqus .inp file surface definitions.
2025-12-15 06:13:44 +02:00
Jukka Aho 2174c7b1e4 feat(io): add Abaqus model parsing with full keyword support
New 347-line Abaqus model parser:
- Model, Mesh, Material, Elastic, Step, BoundaryCondition, OutputRequest types
- AbaqusReaderState: parsing state machine
- parse_model(): parse full ABAQUS .inp files (mesh + BCs + loads + steps)
- Keyword registration system integration
- Section parsing: SOLID_SECTION, MATERIAL, ELASTIC, STEP, BOUNDARY, CLOAD, DLOAD
- abaqus_read_model(): read complete model vs abaqus_read_mesh() for mesh only
- Required by AbaqusReader module for full model parsing

Provides complete Abaqus .inp file model parsing with boundary conditions and load steps.
2025-12-15 06:13:14 +02:00
Jukka Aho ee536f7a53 feat(io): add Abaqus mesh parsing implementation
New 305-line Abaqus mesh parser:
- element_has_nodes(), element_has_type(): Abaqus element type mappings
- Supports C3D4, C3D8, C3D10, C3D20, S3, CPS4, T2D2, T3D2, B33, etc.
- parse_abaqus(): main parsing function for .inp files
- parse_numbers(), parse_definition(), matchset(): parsing utilities
- empty_or_comment_line(): comment/empty line detection
- Required by AbaqusReader module for mesh reading

Provides core Abaqus .inp file mesh parsing functionality.
2025-12-15 06:12:43 +02:00
Jukka Aho d9fcc6f80c feat(io): add Abaqus keyword registration system
New 24-line keyword registration system:
- register_abaqus_keyword(): register keywords for section parsing
- is_abaqus_keyword_registered(): check if keyword is registered
- Global registry for ABAQUS .inp file keywords
- Required by parse_model.jl for section parsing

Provides keyword registration infrastructure for AbaqusReader module.
2025-12-15 06:12:22 +02:00
Jukka Aho 21309009fc feat(io): add AbaqusReader module for full Abaqus .inp parsing
New 17-line AbaqusReader module:
- Module wrapper for full Abaqus reader functionality
- Includes: parse_mesh.jl, keyword_register.jl, parse_model.jl, create_surface_elements.jl, abaqus_download.jl
- Exports: abaqus_read_mesh, abaqus_read_model, create_surface_elements, abaqus_download
- Required by abaqus_reader.jl (simple wrapper calls AbaqusReader.abaqus_read_mesh)
- Full keyword parsing support vs simplified reader

Provides complete Abaqus .inp file parsing infrastructure.
2025-12-15 06:11:54 +02:00
Jukka Aho 79233380be feat(dofs): add DOF connectivity for inverse mapping
New 434-line DOF connectivity system:
- DOFElementConnection: GPU-compatible bits type (elem_id, local_dof_idx)
- DOFConnectivity: inverse mapping DOF → elements (CPU version)
- DOFConnectivityGPU: GPU version with fixed-size arrays
- build_dof_connectivity(): build inverse mapping from elements
- build_dof_connectivity_gpu(): build GPU-compatible version
- connection_count(), is_empty(): query functions
- Zero-allocation after initialization
- GPU-compatible data structures (bits types, fixed-size arrays)
- Already integrated in JuliaFEM.jl (line 580)

Provides inverse mapping infrastructure for DOF-based assembly.
2025-12-15 06:10:28 +02:00
Jukka Aho 92fe16f45a feat(dofs): add DOFManager for global DOF numbering
New 495-line DOF management system:
- DOFManager: manages global DOF numbering across mesh entities
- register_fields!(): register fields from DOFSet specifications
- allocate_dofs!(): allocate DOFs for entities (supports multi-field)
- get_node_dofs(): retrieve DOF indices for nodes
- count_field_dofs(): count total DOFs for specific field
- count_entities(): count mesh entities by type (Vertex, Edge, Face, Cell)
- create_elements!(): create elements with DOF assignment
- Supports heterogeneous multi-field specifications
- Builds DOF connectivity during element creation
- Already integrated in JuliaFEM.jl (line 577)

Provides global DOF numbering and element creation infrastructure.
2025-12-15 06:10:15 +02:00
Jukka Aho c4afa8347d feat(dofs): add mixed DOF system for coupled fields
New 95-line file for mixed/coupled DOF systems:
- MixedDOF{DOFs}: composition of multiple entity-based DOF types
- Helper functions: is_mixed(), get_dof_types(), num_fields(), get_field_dof_type()
- Support for Stokes (velocity+pressure), 3-field formulations, Taylor-Hood
- DOF ordering: concatenated in field order
- Display formatting for mixed DOF types

Enables mixed interpolation methods with different DOF types per field.
2025-12-15 06:09:56 +02:00
Jukka Aho ed30a5fa43 feat(dofs): add entity-based DOF convenience types
New 169-line file with convenience types and helpers:
- ScalarDOF{E}: type alias for scalar DOFs at entities
- VectorDOF{D,E}: type alias for D-dimensional vector DOFs
- TensorDOF{D,E}: type alias for tensor DOFs
- Convenience constructors for common DOF patterns
- Helper functions for entity-based DOF operations

Provides convenient type aliases for common DOF patterns using entity-based system.
2025-12-15 06:09:36 +02:00
Jukka Aho d105e3e6fa feat(dofs): add unified multi-field specification system
New 396-line field specification system:
- @DOFSet macro for clean multi-field syntax
- ndofs(): compute total DOFs for field specifications
- field_ndofs(): count DOFs per field
- field_names(), field_count(), is_single_field(): field queries
- quantity_type(), entity_type(): extract field components
- single_field(): convert single-field DOFSet to DOF type
- Support for single-field and multi-field specifications
- Comprehensive documentation with examples

Implements unified multi-field architecture where single-field is special case.
2025-12-15 06:09:17 +02:00
Jukka Aho 2df1072f65 feat(dofs): add DOF API with type-level field specifications
New 230-line API file defining DOF system foundation:
- AbstractDOF: base type for all field specifications
- DOF{T,E}: abstract type for type-level field specs (never instantiated)
- DOFSet: type alias for multi-field specifications (currently NamedTuple)
- dof_size(): utility for counting DOF components (Float64, Vec, Tensor, etc.)
- @DOFSet macro support for clean multi-field syntax
- Comprehensive documentation with examples
- Type-level, compile-time resolved (no runtime overhead)

Provides foundation for unified multi-field DOF system.
2025-12-15 06:08:58 +02:00
Jukka Aho 2c1701e6a5 feat(dofs): add DOF system main entry point
New 40-line main entry point for DOF system:
- Includes api.jl (DOF{T,E} abstract type)
- Includes fields.jl (field specification system)
- Documents multi-field philosophy (single-field is special case)
- Defines module structure and dependencies
- Already integrated in JuliaFEM.jl (line 313)

Provides unified type-level field specification system for finite elements.
2025-12-15 06:08:09 +02:00
Jukka Aho d85d96b899 feat(assemblers): add experimental DOF-based COO assembler
New 720-line experimental DOF-based assembly implementation:
- DOF-by-DOF paradigm: loops over DOFs (matrix rows) instead of elements
- DOFBasedCOOCache: pre-allocated cache with zero-allocation guarantees
- Matrix-free integration: computes K*v without intermediate storage
- Supports single-kernel problems (experimental limitation)
- Uses DOF connectivity infrastructure for inverse mapping
- Pre-computed element/geometry/material caches for performance
- extract_system(): builds sparse matrix from triplets
- create_cache(): factory function for cache creation

Use cases: matrix-free Krylov solvers, very large problems, contact mechanics, mixed methods.

Status: EXPERIMENTAL - single-kernel assumption only.
2025-12-15 06:06:49 +02:00
Jukka Aho fb3ea93d3d feat(assemblers): add DOF field info decoding for DOF-based assembly
New 197-line module for DOF field information:
- DOFFieldInfo struct: field, entity, component, node index
- decode_local_dof(): decodes local DOF indices to field/entity/component
- Supports single-field and multi-field DOF specifications
- Helper functions: flatten_dof_indices, fill_dof_buffer!
- Zero-allocation buffer operations
- Required dependency for dof_based_coo.jl

Enables DOF-based assembly to decode which field/entity/component each DOF represents.
2025-12-15 06:06:23 +02:00
Jukka Aho f252d6cad7 feat(assemblers): add manually unrolled symmetric scatter function
New 124-line scatter function with manual loop unrolling:
- Scatters symmetric blocked tensor stiffness matrix to COO triplets
- Manually unrolls inner 3×3 loops to eliminate dynamic dispatch
- Handles diagonal and off-diagonal blocks with symmetry
- Zero-allocation guarantee with pre-allocated arrays
- Performance optimization: eliminates 18 dynamic dispatch sites
- Required dependency for element_based_coo.jl

Provides optimized symmetric scattering for COO assembly.
2025-12-15 06:06:11 +02:00
Jukka Aho 5995115e72 feat(assemblers): add scatter_to_force! for force vector assembly
New 37-line scatter function for element-based force assembly:
- Scatters element force vector to global force vector in-place
- Zero-allocation guarantee (modifies global vector directly)
- Legacy format support
- Required dependency for element_based_coo.jl

Provides core force scattering functionality for COO assembly.
2025-12-15 06:05:51 +02:00
Jukka Aho 71b580f5ea feat(assemblers): add scatter_to_triplets! for COO assembly
New 63-line scatter function for element-based COO assembly:
- Scatters element stiffness matrix to triplet arrays (I, J, V)
- In-place operation with zero-allocation guarantee
- Capacity checking to prevent overflow
- Required dependency for element_based_coo.jl

Provides core scattering functionality for COO format assembly.
2025-12-15 06:05:32 +02:00
Jukka Aho 078e9f2bc5 docs(mesh): add comprehensive mesh module documentation
New 303-line documentation file describing:
- Type-stable parametric Mesh{N,T} data structure
- Core data (nodes, connectivity, element/node sets, inverse connectivity)
- Files and their purposes (api.jl, mesh.jl, structured.jl, circular.jl, refine.jl, graph_ordering.jl)
- Mesh creation strategies (structured, circular, Gmsh)
- Mesh manipulation (refinement with LongestEdgeBisection)
- Mesh optimization (RCM bandwidth minimization)
- Usage patterns and examples
- Design philosophy (separation of concerns, type stability, industrial workflows)
- Future extensions and dependencies

Documents the complete mesh architecture and API.
2025-12-15 05:48:11 +02:00
Jukka Aho bb51559d92 docs(io): add I/O module documentation for mesh import/export
New 120-line documentation file describing:
- Supported mesh formats (Abaqus .inp, Code Aster .med/.rmed, Gmsh .msh)
- File organization (core readers vs legacy vendor package infrastructure)
- Design philosophy (weak dependencies, two-tier strategy)
- Future work (export formats, import enhancements, consolidation)
- Usage examples and dependency requirements

Documents the mesh I/O architecture and reader strategy.
2025-12-15 05:47:02 +02:00
Jukka Aho 71145f2ce1 docs(elements): add comprehensive elements module documentation
New 219-line documentation file explaining:
- Ciarlet's finite element triple (K, P, Σ) and computational implementation
- Element structure with type-stable @generated constructor
- Field specifications for single and multi-field elements
- DOF extraction strategies (flat and structured)
- Local-global DOF mapping for coupled multi-field assembly
- Performance notes showing zero-allocation achievement (5.5 ns)

Documents the Element{K,P,S,N} type and its zero-allocation design philosophy.
2025-12-15 05:46:24 +02:00
Jukka Aho 91e1428300 docs(src): add comprehensive source code architecture guide
New 536-line documentation file describing:
- Purpose and responsibility of each src/ subdirectory
- Module dependency order and include structure
- Directory health status with action items
- Cleanup plan for dead code and duplicates
- Design principles and future architecture roadmap

Documents all active modules (topology, basis, quadrature, mesh, materials,
assemblers, domains, solvers, physics, etc.) and identifies legacy/duplicate
code that needs cleanup.
2025-12-15 05:46:07 +02:00
Jukka Aho d2031036d9 refactor(materials): streamline perfect plasticity documentation
Removed verbose documentation sections:
- Removed extensive theory documentation (yield function, flow rule, hardening law, consistency condition)
- Removed detailed algorithm step-by-step explanations (radial return mapping)
- Removed type hierarchy, construction examples, and derived properties
- Removed performance notes and timing information
- Removed detailed function documentation with algorithm steps

Simplified docstrings to essential information about material parameters and function signatures.
2025-12-15 03:18:27 +02:00
Jukka Aho a682e964b4 refactor(materials): streamline Neo-Hookean documentation
Removed verbose documentation sections:
- Removed detailed theory explanations and strain energy formulas from module docstring
- Removed type hierarchy, properties, and construction examples
- Removed detailed function documentation with usage examples
- Removed performance notes and automatic differentiation explanations
- Removed stress conversion formulas and notes

Simplified docstrings to essential formulas (strain energy, stress computation) and function signatures.
2025-12-15 03:18:17 +02:00
Jukka Aho 8b1bc18124 refactor(materials): streamline linear elastic documentation
Removed verbose documentation sections:
- Removed detailed theory explanations and formulas from module docstring
- Removed type hierarchy and properties sections
- Removed usage examples from function docstrings
- Removed performance notes and implementation details
- Simplified docstrings to essential formulas (Hooke's law, elasticity tensor)

Kept core mathematical formulas and function signatures.
2025-12-15 03:18:07 +02:00
Jukka Aho 1a8927c8f6 refactor(materials): streamline finite strain plasticity documentation
Removed verbose documentation sections:
- Removed detailed theory references (Simo & Hughes)
- Removed algorithm step-by-step explanations
- Removed performance notes and timing information
- Removed detailed field descriptions and invariants
- Simplified docstrings to essential information about fields and function signatures

Kept core information about multiplicative decomposition and material parameters.
2025-12-15 03:17:57 +02:00
Jukka Aho a6d77d4705 refactor(materials): streamline API documentation by removing verbose sections
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.
2025-12-15 03:17:44 +02:00
Jukka Aho d59b32fed5 refactor(physics): replace Physics struct with trait-based category types
Replace monolithic Physics struct and boundary condition types with
simpler physics category types used for trait-based dispatch.

- Remove Physics struct (Formulation, Field, Mesh, Material coupling)
- Remove DirichletBC and NeumannBC boundary condition storage types
- Remove Constraint type
- Add Elasticity{Dim} and Thermal{Dim} physics category types
- Add required_field_type trait function for physics-to-field mapping
- Simplify to type tags for material trait dispatch
- Support compile-time field type inference from physics
- Align with new architecture: physics types are dispatch tags, not problem containers
2025-12-12 23:45:16 +02:00
Jukka Aho ddb00eda0c fix(physics): update deformation_gradient to use coords field
Update compute_deformation_gradient to use coords field instead of ξ
field from QuadraturePoint, matching the API change.
2025-12-12 23:44:48 +02:00
Jukka Aho 04b7eff2a2 refactor(materials): migrate PerfectPlasticity to compositional state design
Replace monolithic PlasticityState struct with compositional NamedTuple
state system and add new material trait system support.

- Remove PlasticityState struct (now using NamedTuple composition)
- Add supported_physics trait (Elasticity{3})
- Add required_state_variables trait (PlasticStrain, Backstress, EquivalentPlasticStrain)
- Change compute_stress to use NamedTuple for state_old and state_new
- Use get() with defaults for state extraction (handles empty initial state)
- Update state creation to use NamedTuple syntax (ε_p, α, κ)
- Remove state_type trait (replaced by required_state_variables)
2025-12-12 23:44:26 +02:00
Jukka Aho 6f0dd71d2e refactor(materials): update LinearElastic for new trait system and compositional state
Update LinearElastic to support new material trait system and
compositional state design with NamedTuple instead of Nothing.

- Add supported_physics trait (Elasticity{3})
- Add required_state_variables trait (empty tuple for stateless)
- Change state_old parameter to Union{Nothing,NamedTuple}
- Return NamedTuple() instead of nothing for state update
- Support compositional state system in compute_stress
2025-12-12 23:43:51 +02:00