Commit Graph

12 Commits

Author SHA1 Message Date
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