Commit Graph

1848 Commits

Author SHA1 Message Date
Jukka Aho ab5aed8dea chore(io): remove Code_Aster reader module stub
Remove the HDF5-backed `AsterReader` wrapper from the default package tree so
the slim IO surface only exposes the maintained mesh ingest path.

- Drop `src/io/AsterReader.jl` (mesh/results includes are no longer shipped here).
2026-05-09 17:10:35 +03:00
Jukka Aho cab05be2b2 chore(io): remove legacy AbaqusReader module stub
Drop the thin `AbaqusReader` wrapper that only forwarded includes into the old
parser stack; opt-in Abaqus ingestion now ships from `Legacy` instead.

- Delete the standalone `src/io/AbaqusReader.jl` entry module (Nullables-era).
2026-05-09 17:09:12 +03:00
Jukka Aho d5fe01b745 docs(geometry): link strain helpers and fix LICENSE URL
Update the SPDX banner to `LICENSE.md` and cross-reference `extract_strain`
from the small-strain docstring so readers know where gradients are consumed.
2026-05-09 17:08:54 +03:00
Jukka Aho fc7ce7ec5b docs(geometry): refresh Jacobian doc examples for current APIs
Bring the inline examples in `compute_jacobian` / `physical_derivatives`
docstrings in line with parametrized reference topologies and `Lagrange{1}`,
and drop a broken cross-reference to external tensor types.

- Point the SPDX banner at `LICENSE.md` on the default branch.
- Use `Triangle{3}` / `Tetrahedron{4}` instances with `Lagrange{1}` in the
  derivative snippets.
- Replace the `[Tensor](@ref)` bullet with an explicit note that tensors come
  from the **Tensors.jl** dependency.
- Illustrate quadrature iteration from a concrete `Tri3()` topology handle.
2026-05-09 17:08:41 +03:00
Jukka Aho 67d367920f docs(fields): plain headings in LocalField docstring
Replace bold markdown labels on the dynamic vs quasi-static bullet sections
with plain prose headings so field docs match the repository style guide.
2026-05-09 17:08:23 +03:00
Jukka Aho 5aa529473d chore(fields): drop FEMBase-style container fields module
Remove the old Dict-/tuple-backed field structs and helpers that lived next
to the modern quantity tags; they duplicated legacy FEMBase concepts and are
not part of the type-stable 0.x surface.

- Delete `DCTI`, `DVTI`, `DCTV`, `DVTV`, `CVTV`, `DVTId`, `DVTVd`, and the
  `field` / `interpolate`/`new_field` factories carried in this file.
- Drop `AbstractField` value/container overloads (`length`, `getindex`,
  `update_field!`, …) that assumed a `.data` payload on every subtype.
- Keep `AbstractField` definitions and docs in `fields/api.jl`; legacy
  variants remain behind `Legacy` where needed (`dcti_dvti_fields.jl`).
2026-05-09 17:08:03 +03:00
Jukka Aho 8064e86737 feat(fields): expand AbstractField tags and documentation
Extend the field vocabulary with diffusion/Darcy/mixed facet tags while
making `dofs_per_node` / `quantity_type` expectations explicit and dropping
legacy `Physics(...)` snippets.

- Clarify `dofs_per_node` as components per primary entity (historical name)
  and document `quantity_type` as part of the `AbstractField` contract.
- Add `MoistureContent`, `PressurePotential`, `RT0FaceFlux`, and `Nedelec1Edge`
  with matching `dofs_per_node` / `quantity_type` hooks.
- Point concrete usage at active kernels and grouped tests; note beam/shell
  tags as not wired in the default 0.x build.
- Prefer plain prose over bold emphasis in nearby docstrings.
2026-05-09 17:07:14 +03:00
Jukka Aho 37abd55c34 refactor(elements): centralize interpolation code generation
Consolidate the four `@generated` interpolators onto one Expr toolkit so
scalar/vector branching and flat-DOF indexing stay consistent, and fix the
broken vector arm in `interpolate_field_value`.

- Add compile-time Expr helpers (`_classify_field_quantity`,
  `_per_node_dof_exprs`, `_value_expr`, `_grad_expr`, `_field_dof_count`,
  `_classify_dofset_field`) shared by `interpolate_fields`,
  `interpolate_field`, `interpolate_field_value`, and
  `interpolate_local_fields`.
- Fix `interpolate_field_value` vector dispatch: the generated branch
  compared `quantity_type` as if it were a type value instead of using the
  field quantity from `quantity_type(field_spec)`.
- Refresh module docs (four entry points + helper layering); drop a long
  redundant doc example under `interpolate_local_fields`.
2026-05-09 17:06:57 +03:00
Jukka Aho 676825a730 docs(elements): clarify extract_element_dofs DOFSet decoding
Remove unused `field_type` locals and document how `field_tuple_type`
maps to entity topology counts and `quantity_type` for sizing.
2026-05-09 17:03:31 +03:00
Jukka Aho 402b87d867 feat(elements): add local_dof_layout and tighten compile-time ndofs
Surface the element-as-template table for the DOF-based assembler and make
generated-function helper ordering safe on Julia 1.12+.

- Move `_dof_per_entity`, `_count_entities_compiletime`, and `_compile_time_ndofs`
  above all `@generated` users so expansion sees defined bindings.
- Drop `Tuple{Quantity,Entity}` field-spec support; require `DOF{Q,E}` and use
  `quantity_type` + `dof_size` without try/catch fallbacks.
- Simplify `ndofs(::Type{K}, ::Type{S})` to sum `_compile_time_ndofs` per field;
  remove `nnodes(K())` in favor of `nnodes(K)` on the type.
- Add `DOFLayoutEntry` accessors (`field_idx`, `entity_local`, `component`) and
  `@generated local_dof_layout` for Vertex/Cell/Edge/Face fields with length check vs `N`.
- Remove duplicate helper block and stale section dividers; fix LICENSE URL.
2026-05-09 17:02:53 +03:00
Jukka Aho dda48b88fa docs(elements): rewrite README for Element{K,P,S,N} and DOFHandler
Replace outdated NamedTuple dof_indices narrative with flat tuples,
`local_dof_layout`, and `create_elements!` workflows.

- Align examples with `@DOFSet` and multi-field thermo-mechanical setup.
- Document extraction/interpolation entry points and compile-time `field_dof_range`.
- Point readers at dofs/topology/basis/assemblers tests without referencing removed files.
2026-05-09 17:02:26 +03:00
Jukka Aho 00ef826dd3 refactor(elements): remove legacy elements_lagrange.jl definitions
Delete obsolete Lagrange element helpers superseded by topology/basis templates.
2026-05-09 17:00:47 +03:00
Jukka Aho 03ecc8c296 feat(interface): add InterfaceDOFHandler and element factory
Mirror DOFHandler discipline on interface meshes with Vertex/Cell-only layouts
and inverse connectivity placeholders compatible with volume tooling.

- Build field starts per interface entity id without facet maps yet.
- Hook `create_interface_elements!` for template-specific dof tuples.
2026-05-09 17:00:31 +03:00
Jukka Aho b76cbe782e feat(interface): add InterfaceMesh embedding for coupled traces
Define abstract interface mesh protocol plus concrete mesh/coupling structs tying
interface segments to volume element ids for future mortar/FSI hooks.

- Track boundary topology (`Seg2` driver) with slave/master volume pointers.
- Provide constructors validated for consistent orientation assumptions documented inline.
2026-05-09 17:00:23 +03:00
Jukka Aho e6d72b57ca docs(interface): document InterfaceMesh and InterfaceDOFHandler scope
Outline coupled surface grids and placeholder roadmap beyond Seg2 layouts.
2026-05-09 17:00:16 +03:00
Jukka Aho 7ed78e9f5e feat(geometry): add Piola push-forward helpers for curl/div fields
Implement covariant and contravariant Piola maps using Tensors.jl Jacobians.
2026-05-09 16:59:58 +03:00
Jukka Aho b25e121ab2 feat(juliafem): add centralized exports.jl for public API names
Introduce a single grouped export table consumed by `JuliaFEM.jl`, covering
topology through solvers without embedding exports beside implementations.

- Topology through quadrature, geometry Piola helpers, and basis/Nédélec–RT0 refs.
- Formulation tags, abstract fields, DOF macros/layout/interpolation, handlers,
  connectivity, and mesh constructors.
- Materials, sparse helpers, assemblers (including matrix-free operators), physics
  traits, domain kernels (continuum/heat/darcy/thermoelastic/mixed), and MPI hooks.
- Notes verification hook via `names(JuliaFEM)` in module comments.
2026-05-09 16:57:22 +03:00
Jukka Aho 7d6ef2e560 feat(domains): add ThermoElasticKernel for coupled u–T assembly
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.
2026-05-09 16:56:53 +03:00
Jukka Aho 12ee626a00 feat(domains): add Hex8 RT0–P0 mixed Darcy kernel
Mirror Tet4 mixed Darcy on structured hexes using Piola push-forward of
`rt0_hex8_reference_basis` and tensor-product Gauss quadrature.
2026-05-09 16:56:44 +03:00
Jukka Aho 350818aa80 feat(domains): add Tet4 RT0–P0 mixed Darcy kernel
Implement lowest-order H(div) flux on faces with cell pressure, Piola-mapped RT0
basis, inverse conductivity mass block, and ±1 divergence coupling.

- Document BC posture (pressure gauge, facet flux DOFs, boundary load helpers).
- Provide `evaluate_entry` / mass hooks plus auxiliary types for mixed Darcy assembly tests.
2026-05-09 16:55:43 +03:00
Jukka Aho f8aecb1675 feat(domains): add HeatKernel for scalar diffusion and optional thermal mass
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.
2026-05-09 16:55:28 +03:00
Jukka Aho bb2fba4c5f feat(domains): add DarcyPotentialKernel wrapping HeatKernel
Expose steady primal Darcy head formulation as thermal diffusion with
`HydraulicConductivity` and `PressurePotential` fields on shared assembler paths.
2026-05-09 16:55:08 +03:00
Jukka Aho 264c4d5a23 feat(domains): add StokesMixedKernel for creeping Newtonian flow
Provide velocity–pressure mixed kernel with constant viscous tangent `2μ 𝕀^sym`
and MixedUP-compatible divergence / compressibility blocks.

- Mirrors `MixedUPKernel` layout (`Displacement{3}` + cell pressure).
- Documents gauge pinning and reuse of `default_pressure_gauge_dof`.
2026-05-09 16:52:59 +03:00
Jukka Aho 8c7cd9b308 feat(domains): add MixedUPKernel for u–p elasticity saddle
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.
2026-05-09 16:52:53 +03:00
Jukka Aho 8b5aa491eb feat(domains): add Hex8 material coupon lab helpers
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.
2026-05-09 16:52:48 +03:00
Jukka Aho 6dc8256843 feat(domains): add Hu–Washizu three-field elasticity kernel
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`.
2026-05-09 16:52:43 +03:00
Jukka Aho c46bfbcc9c feat(domains): add Hellinger–Reissner mixed elasticity kernel
Implement HR saddle (`u` vertex + piecewise-constant symmetric stress on Cell)
for small-strain `LinearElastic` materials.

- Encode Voigt unit tensors aligned with `local_dof_layout` components and build
  the 6×6 discrete compliance `G M⁻¹ G` once from `C⁻¹`.
- Provide assembler microkernel hooks (`evaluate_entry`, buffer traits,
  `reference_fields`) with symmetric indefinite operator semantics documented in-module.
2026-05-09 16:52:30 +03:00
Jukka Aho 01e497d5f8 feat(domains): add FacetMassKernel for Face DOF smoke assembly
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.
2026-05-09 16:52:07 +03:00
Jukka Aho 617a8441d1 feat(domains): add EdgeMassKernel for facet-map edge DOFs
Introduce diagnostic kernel assembling diagonal edge mass proportional to
physical edge length divided patch multiplicity.

- Dispatch `AbstractKernel` microkernel hooks for Edge-owned fields on Hex8/Hex20/
  Tet4/Tet10/Wedge6/Pyr5 meshes using existing facet map builders.
- Implement `evaluate_entry` / `evaluate_mass_entry` paths plus trivial reference
  buffers for assembler compatibility.
2026-05-09 16:51:55 +03:00
Jukka Aho 503619cb44 docs(domains): add README overview for physics kernels
Summarize continuum/heat/darcy/thermo_elastic kernels with pointers to AGENTS,
extension contract, tests, and thermo-elastic walkthrough.
2026-05-09 16:51:26 +03:00
Jukka Aho f8bcd8605c refactor(domains): streamline continuum update_material_cache dispatch
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.
2026-05-09 16:51:08 +03:00
Jukka Aho d428686658 refactor(domains): refresh continuum geometry cache fill for shape functions
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.
2026-05-09 16:50:49 +03:00
Jukka Aho 281e5e5116 docs(domains): shorten continuum theory and formulation docstrings
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.
2026-05-09 16:50:30 +03:00
Jukka Aho 8c285171ea feat(domains): extend ContinuumKernel for mass matrix and assembler microkernels
Wire continuum solids into the shared DOF-based microkernel contract while
keeping element-based assembly helpers explicit and GPU-friendly.

- Add `density::Float64` on `ContinuumKernel` (default `0`) so static-only
  callers skip mass work; constructors accept keyword `density` or infer
  `Displacement{3}` when omitted.
- Generalize `compute_stiffness_value` to `AbstractFloat`/`Tensor{4,D,F}` and
  typed `basevec`; add `SymmetricTensor{4,D,F}` overload using symmetric `B`
  operators to avoid `Tensor{4}(::SymmetricTensor)` string branches for Metal.
- Replace legacy `evaluate(...)` wrapper with `compute_block!` integrating one
  element-local block over IPs for the element-based COO path.
- Implement microkernel hooks: `qpoint_buffer_eltype`, `reference_fields`,
  `update_qpoint_buffer!`, `evaluate_entry` (DOF-layout aware, uses symmetric `𝔻`),
  and `evaluate_mass_entry` (consistent mass, component-orthogonal, ρ-gated).
- Import assembler-facing symbols explicitly from `JuliaFEM`; drop brittle
  `Main` introspection for `evaluate`/`get_tangent`.
- Refresh module banner and docstrings (density docs, reduced bold noise).
2026-05-09 16:50:14 +03:00
Jukka Aho 91ac4fd458 docs(domains): tone continuum abstract docstrings for removed files
Strip decorative markdown emphasis, drop Kirchhoff plate pointer, and remove
See-Also links to deleted formulations.jl / missing design doc paths.
2026-05-09 16:49:49 +03:00
Jukka Aho 5652282a8d refactor(domains): remove continuum/kinematics.jl helpers
Delete legacy kinematics routines relocated under geometry/materials pipelines.
2026-05-09 16:49:25 +03:00
Jukka Aho 333b190175 refactor(domains): remove continuum/formulations.jl definitions
Drop standalone formulation trait file folded intophysics/types or kernel dispatch.
2026-05-09 16:49:21 +03:00
Jukka Aho 20256eec01 refactor(domains): remove trusses/api.jl stub
Drop unused truss API placeholder pending structured truss kernels.
2026-05-09 16:49:10 +03:00
Jukka Aho 0041844e39 refactor(domains): remove shells/api.jl stub
Remove placeholder shell domain exports until a shell kernel lands.
2026-05-09 16:49:06 +03:00
Jukka Aho 6aabc33bbc refactor(domains): remove plates/dkt_basis.jl module
Delete legacy DKT basis helpers consolidated under basis/domains layout.
2026-05-09 16:49:04 +03:00
Jukka Aho b9c79fd0fd refactor(domains): remove legacy plates/dkt.jl implementation
Drop outdated DKT assembly file superseded by reorganized plate basis work.
2026-05-09 16:49:00 +03:00
Jukka Aho acd09f0099 refactor(domains): remove plates/api.jl stub ahead of plate kernel rework
Remove empty plate API entrypoint; DKT/basis material lives elsewhere now.
2026-05-09 16:48:51 +03:00
Jukka Aho 987761677d refactor(domains): remove unused common/boundary_conditions.jl stub
Delete placeholder boundary-condition helpers superseded by physics/assembler paths.
2026-05-09 16:48:47 +03:00
Jukka Aho 508985d4c5 refactor(domains): remove stub beams/api.jl placeholder
Drop unused beam domain API shell pending a real beam kernel module.
2026-05-09 16:48:42 +03:00
Jukka Aho ec600459a9 refactor(dofs): align fields.jl docs and counting with DOF{Q,E} templates
Bring module prose in line with flat `dof_indices`, `@DOFSet`, and DOFHandler-era
helpers while tightening compile-time DOF arithmetic.

- Refresh docstrings: drop markdown bold noise; document `element_dofs` /
  `field_dof_range` instead of NamedTuple-shaped `dof_indices` accessors.
- Rewrite examples to prefer `@DOFSet`; spell out NamedTuple equivalence and drop
  Tuple-based migration snippets incompatible with DOFHandler.
- Implement `field_ndofs(::Type{<:DOF}, Topo)` / `ndofs(::DOFSet, Topo)` using
  `quantity_type` / `entity_type` and generator-style sums over `fieldtypes(S)`.
- Extend `quantity_type(::Type{<:DOF})` for raw `Float64`, `Vec`, `Tensor`, and
  `SymmetricTensor` fields alongside `AbstractField` wrappers.
- Allow `field_ndofs` on raw-quantity DOFs by sizing `T` directly (pressure on
  cells/faces, etc.).
- Remove `single_field` compatibility helper and duplicate element accessors now
  canonical in `src/elements/elements.jl`.
- Point LICENSE header at LICENSE.md.
2026-05-09 16:48:26 +03:00
Jukka Aho bea37f797e test(dofs): remove misplaced extraction test under src/dofs/test
Delete stray test file from src tree; extraction belongs under test/dofs/.
2026-05-09 16:48:00 +03:00
Jukka Aho fe4fff86f0 refactor(dofs): remove unused mixed.jl placeholder module
Drop stale mixed-field scaffold superseded by @DOFSet multifield specs.
2026-05-09 16:47:53 +03:00
Jukka Aho 77fd030124 test(dofs): remove legacy simple_usage script from src/dofs/examples
Delete obsolete usage demo kept next to removed DOFManager workflows.
2026-05-09 16:47:43 +03:00
Jukka Aho 15c8af87bb test(dofs): remove generated_vs_manual_comparison example under src
Drop unmaintained benchmark-style script from src/dofs/examples; coverage lives
in test/dofs instead.
2026-05-09 16:47:30 +03:00
Jukka Aho efde9de197 refactor(dofs): remove entity_dofs convenience aliases
Drop ScalarDOF/VectorDOF/TensorDOF aliases and canned Lagrange-* constants that
duplicated patterns now expressed via `DOF{Q,E}` and `@DOFSet`.

- Eliminates Vec{1}-based scalar alias layering in favor of explicit quantities.
- Removes unused LagrangeHeat/LagrangeElasticity shorthand blocks tied to old tutorials.
2026-05-09 16:46:29 +03:00