Commit Graph

5 Commits

Author SHA1 Message Date
Jukka Aho ea12d4310e docs(topology): drop bold emphasis in AbstractTopology docstring
Align the topology API prose with the repository documentation style guide.
2026-05-09 18:21:59 +03:00
Jukka Aho b9fafd4e09 refactor(topology): consolidate files and simplify documentation
Consolidate topology module by merging topology.jl into api.jl and
significantly simplify documentation across all topology files. Remove
verbose docstrings, examples, and design notes in favor of minimal,
code-focused documentation.

Major changes:
- Merge topology.jl into api.jl (delete topology.jl)
- Simplify docstrings in api.jl, triangles.jl, and tetrahedra.jl
- Remove verbose documentation from type aliases and functions
- Remove topology type parameter from entity types (Vertex, Edge, Face, Cell)
- Update all entity constructors to remove topology parameter
- Add entities dispatcher and helper functions to api.jl

File changes:
- api.jl: Simplified AbstractTopology docstring, added topological entities
  and helpers from topology.jl, added entities dispatcher
- triangles.jl: Removed verbose documentation
- tetrahedra.jl: Removed verbose documentation
- hexahedra.jl, pyramids.jl, quadrilaterals.jl, segments.jl, wedges.jl:
  Updated entity constructors to remove topology type parameter
- topology.jl: Deleted (content moved to api.jl)

Documentation philosophy:
- Keep docstrings minimal and code-focused
- Remove examples unless function use is unclear
- Move comprehensive documentation to website/docs, not in code
- Maintain essential type information and interface requirements
2025-12-12 22:27:09 +02:00
Jukka Aho e8c8c04075 feat(topology): Add type-level nnodes() method
- Add nnodes(::Type{<:AbstractTopology{N}}) method for type queries
- Enables compile-time node count without instantiation
- Example: nnodes(Triangle{3}) returns 3
- Complements existing instance method for dispatch consistency
2025-11-23 18:18:24 +02:00
Jukka Aho 4bf7d2ef22 docs(topology): Update API documentation for new coordinate types
- Changed reference_coordinates return type docs: tuple of tuples → SVector of Vec
- Added Base.ndims alias function for Base API interoperability
- Updated docstring examples to use SVector(Vec{D}(...)) syntax
- Updated design philosophy examples: removed old Lagrange{Topology,Order} syntax, now Lagrange{Order}
- Clarified topology defines shape+nodes, basis defines interpolation
- Updated backward compatibility notes: Tri3 → Triangle{3}, etc.
2025-11-21 00:30:12 +02:00
Jukka Aho 2e41f9502d feat(topology): Add element topology API with 17 reference element types
Create src/topology/api.jl defining element topology abstractions:
- AbstractTopology{N} base type (N = node count from mesh connectivity)
- Interface: nnodes(), dim(), reference_coordinates(), edges(), faces()
- 7 shape families: Segment, Triangle, Quadrilateral, Tetrahedron, Hexahedron, Pyramid, Wedge
- 17 concrete types: Seg2/3, Tri3/6/7, Quad4/8/9, Tet4/10, Hex8/20/27, Pyr5, Wedge6/15

Key design: Topology defines SHAPE (triangle), not node count. Node count
comes from basis order: Triangle + Lagrange{Triangle,1} → 3 nodes (Tri3),
Triangle + Lagrange{Triangle,2} → 6 nodes (Tri6). This enables clean
separation: Topology (shape) ≠ Basis (interpolation) ≠ Integration (quadrature).

Reference element coordinates defined for all topologies. Zero-allocation
API using tuples. Backward compatibility: Tri3/Quad4/Tet10 aliased to
shape names with implied basis.

Comprehensive documentation with theory and examples.
Part of systematic modular API architecture.
2025-11-15 18:41:34 +02:00