Commit Graph

24 Commits

Author SHA1 Message Date
Jukka Aho 3788067fa6 feat(mesh): add pyramid facet connectivity maps
Support lowest-order facet metadata on `Pyr5` meshes.

- Introduce `Pyr5FacetMaps` parallel to hex/tet facet helpers.
2026-05-09 18:36:14 +03:00
Jukka Aho 48ebc9bf4d feat(mesh): add wedge facet connectivity maps
Extend facet-map machinery to `Wedge6`/`Wedge15` skeletons.

- Add `Wedge6FacetMaps` builders aligned with topology reference numbering.
2026-05-09 18:36:14 +03:00
Jukka Aho 261b145b92 feat(mesh): add Hex8 facet connectivity maps
Track global facet topology metadata for hex meshes used by face-based DOFs.

- Introduce `Hex8FacetMaps` construction helpers and orientation bookkeeping.
2026-05-09 18:36:14 +03:00
Jukka Aho cbf19a0800 feat(mesh): add Tet4/Tet10 facet connectivity maps
Provide edge/face global IDs and orientation hints for lowest-order facet DOFs on tets.

- Introduce `Tet4FacetMaps` plus builders consumed by DOF handlers.
2026-05-09 18:36:14 +03:00
Jukka Aho a95d917b08 fix(mesh): keyword Mesh constructor in structured Hex8 builder
Document that only structured bricks are supported here and route box mesh
construction through the keyword outer constructor.

- Clarify the `Hex8`-only structured entry point in the docstring.
- Replace positional `Mesh{Hex8}(..., sets...)` with keyword `element_sets` /
  `node_sets` arguments.
2026-05-09 18:12:20 +03:00
Jukka Aho d431b54cb6 fix(mesh): align Hex8 refinement with Mesh{N,T} constructors
Use explicit `Mesh{8, Hex8}` signatures, SPDX banner lines, and the keyword
`Mesh{T}(nodes, conn; ...)` outer constructor after the mesh core refactor.

- Update docstrings and method signatures from `Mesh{Hex8}` to `Mesh{8, Hex8}`.
- Build refined meshes via `element_sets`/`node_sets` keywords.
2026-05-09 17:39:54 +03:00
Jukka Aho 025bed90af refactor(mesh): slim Mesh core and harden surface extraction
Strip experimental permutation/coloring/ghost/named-ID baggage from the
concrete mesh type, adopt SPDX headers, and route boundary extraction through
an explicit `surface_topology` trait with clearer limitations.

- Replace the legacy banner with SPDX lines and tighten the struct/docstring to
  the fields that actually ship today.
- Drop bandwidth/permutation maps, industrial ID dictionaries, and parallel
  coloring/ghost sets from `Mesh` plus their helpers.
- Introduce `surface_topology(::Type{<:AbstractTopology})` for Tet/Hex volumes
  and guard `extract_surface` with `hasmethod` errors for unsupported solids.
- Remove `create_node_set_from_element_set!` (surface workflows should build sets
  explicitly or use topology-aware helpers later).
- Document that `extract_surface` still assumes the first `nnodes(FaceT)` nodes
  per volume element describe the boundary patch.
2026-05-09 17:38:39 +03:00
Jukka Aho a5f71c296a chore(mesh): remove standalone graph ordering helpers
Delete the LightGraphs-based RCM/coloring experiments that were not included
from `JuliaFEM.jl`.

- Drop `src/mesh/graph_ordering.jl`.
2026-05-09 17:38:15 +03:00
Jukka Aho d9779490f8 chore(mesh): delete unused gmsh_jll wrapper stub
Remove the optional Gmsh API wrapper that never shipped from the package entry
manifest.

- Drop `src/mesh/gmsh_wrapper.jl`.
2026-05-09 17:38:04 +03:00
Jukka Aho 8bdaa62fc2 chore(mesh): remove circular plate mesh generator
Delete the polar fan mesher that was not wired into `JuliaFEM.jl` includes.

- Drop `src/mesh/circular.jl` (`create_circular_plate_mesh`).
2026-05-09 17:37:50 +03:00
Jukka Aho 8f34707cf5 docs(mesh): clarify mixed topology and kernel ownership
Document that multi-topology meshes are still unsupported and replace the old
`Physics` wording with kernel-centric language about shared meshes.

- Swap the future `MixedMesh` bullet for an explicit limitation note.
- Describe mesh ownership vs kernel references for multiphysics reuse.
2026-05-09 17:37:08 +03:00
Jukka Aho 42872ffd06 docs(mesh): tighten README for current Mesh surface
Replace marketing-heavy prose with a short map of the active files, the
parametric `Mesh{N,T}` role, refinement usage, and where import/tests live now.

- Drop duplicated API inventories and speculative future-work bullets.
- Point readers at `src/io/` for ingest and `llm/design/legacy-tests/mesh/` for
  retired parallel/coloring coverage.
2026-05-09 17:36:32 +03: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 46be40bb4a refactor(mesh): Remove duplicate AbstractRefineStrategy definition
Replace abstract type definition with comment pointing to canonical definition in mesh/api.jl.

Eliminates documentation replacement warning while preserving single source of truth for refinement strategy hierarchy.
2025-11-20 18:24:38 +02:00
Jukka Aho 3d3a2bd338 refactor(mesh): Remove duplicate Mesh constructor
Remove positional argument constructor that duplicated keyword constructor functionality. This eliminates method overwrite warning.

Kept only the keyword constructor which provides clearer API:
- mesh = Mesh{Hex8}(nodes, conn; element_sets=..., node_sets=...)

The keyword version is more explicit and prevents accidental parameter ordering mistakes.
2025-11-20 18:24:13 +02:00
Jukka Aho ea5ae07a83 refactor(mesh): Add @inline to mesh size validation
- Added @inline to validate_mesh_size function
- Called during mesh generation/import
- Minor performance optimization
2025-11-20 16:56:37 +02:00
Jukka Aho 43539f2441 Implement Hex8 longest-edge refinement
- Introduce AbstractRefineStrategy and LongestEdgeBisection
- Split Hex8 elements per axis with midpoint deduplication
- Preserve mesh metadata while iterating refinement levels
2025-11-18 15:21:41 +02:00
Jukka Aho 17635fa816 Add structured Hex8 mesh builders
- Create general box mesher with boundary node/element sets
- Provide convenience wrappers for unit cubes, cantilevers and thin plates
- Document usage examples for convergence and application setups
2025-11-18 15:21:39 +02:00
Jukka Aho 18f23c8fc2 Add polar circular plate mesh generator
- Generate Tri3 rings parameterized by radius, radial and angular counts
- Populate connectivity for central fan and radial bands
- Define default node/element sets for center and outer boundary conditions
2025-11-18 15:21:26 +02:00
Jukka Aho 1d5bd996b9 Introduce parametric Mesh core type
- Define Mesh{N,T} structure with validated connectivity and sets
- Provide APIs for node/element lookup, colors, ghost ownership and IDs
- Implement permutation, adjacency and utility helpers for assembly workflows
2025-11-18 15:19:30 +02:00
Jukka Aho e005775ceb Move src/graph/graph_ordering.jl to src/mesh/graph_ordering.jl 2025-11-18 14:16:00 +02:00
Jukka Aho a9dc773342 feat(mesh): Add mesh API with topology ownership and node-to-elements mapping
Create src/mesh/api.jl defining mesh-specific abstractions:
- AbstractMesh base type for all mesh structures
- nnodes_total(), nelements() for mesh sizing
- get_node(node_id) returns Vec{Dim} coordinates
- connectivity_matrix() returns element-to-nodes mapping
- get_elements_for_node(node_id) returns node-to-elements mapping (critical for nodal assembly)
- get_element_set(name), get_node_set(name) for named sets (BCs, materials, postprocessing)
- AbstractRefineStrategy, refine() for adaptive mesh refinement

Meshes own topology (coordinates, connectivity). Multiple Physics can
share one Mesh for multiphysics coupling. Node-to-elements mapping
enables nodal assembly pattern (see docs/book/multigpu_nodal_assembly.md).

Part of systematic modular API architecture.
2025-11-15 18:40:23 +02:00
Jukka Aho 5a07b3ab21 docs: Document Tutorial 3 API limitations, update test runner
Current state discovery:
- Element basis function evaluation broken (eval_basis! signature mismatch)
- Field interpolation at integration points broken (same root cause)
- Jacobian evaluation at integration points broken
- These are fundamental API issues affecting multiple test paths

Impact:
- Tutorial 3 (basis functions) deferred until API fixed
- Affects any code trying to evaluate fields at integration points
- Related to Quad4 assembly issues discovered in Tutorial 4

Working tutorials (107/107 tests passing):
- Tutorial 1: Element creation (5 tests)
- Tutorial 2: Gmsh mesh reading (72 tests)
- Tutorial 4: 1-element validation (35 tests)

Next: Focus on tutorials using working APIs only
2025-11-09 02:58:09 +02:00
Jukka Aho 2cee2222e1 feat: Consolidate HeatTransfer.jl (partial - API needs update)
- Added 118 lines of heat transfer code to src/problems_heat.jl
- Problem types: Heat (3D), PlaneHeat (2D)
- Fields: thermal conductivity, heat source, heat flux, convection
- Fixed Element type signatures (Element{M,B})
- NOTE: Tests currently failing due to element_info! API mismatch
- Will fix after more consolidations (old FEMBase 0.x API)

Result: 9 vendor packages consolidated (~6620 lines total)
Tests: 5 passing baseline maintained (heat tests need API fix)
2025-11-08 12:11:37 +02:00