mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-10-02 14:23:58 +00:00
refactor(topology): Update AbstractTopology documentation for separation of concerns
Modified src/topology/topology.jl to reflect new architecture: - Clarify topology defines geometric shape only, not node count - Document that node count comes from basis functions - Add examples showing same topology with different bases (Quad4/8/9) - Update docstring to reference new topology types (Segment, Triangle, etc.) - Emphasize corner nodes only in topology API - Remove references to old node-count-baked types (Tri3, Quad4, etc.)
This commit is contained in:
+31
-10
@@ -6,25 +6,46 @@
|
||||
|
||||
Abstract base type for all reference element topologies.
|
||||
|
||||
A topology defines the combinatorial structure of how nodes connect to form an element
|
||||
in parametric (reference) coordinates. Topologies are mathematical objects independent
|
||||
of interpolation schemes or integration rules.
|
||||
**IMPORTANT SEPARATION OF CONCERNS:**
|
||||
- **Topology** = Geometric shape (e.g., Triangle, Quadrilateral, Tetrahedron)
|
||||
- **Basis** = Interpolation scheme (e.g., Lagrange{Triangle, 1}, Serendipity{Quadrilateral, 2})
|
||||
- **Node count** comes from BASIS, not topology!
|
||||
|
||||
A topology defines the **combinatorial structure** of how corner nodes connect to form
|
||||
an element in parametric (reference) coordinates. Topologies are **mathematical shapes**
|
||||
independent of interpolation schemes or integration rules.
|
||||
|
||||
# Key Properties
|
||||
- Number of nodes
|
||||
- Spatial dimension (1D, 2D, 3D)
|
||||
- Reference element geometry
|
||||
- Number of **corner** nodes
|
||||
- Reference element geometry (corner positions only)
|
||||
- Edge and face connectivity (corner nodes only)
|
||||
- Node ordering convention
|
||||
|
||||
# Topology vs Node Count
|
||||
|
||||
The same topology supports different node counts via different basis functions:
|
||||
|
||||
```julia
|
||||
# Same topology (Quadrilateral), different node counts:
|
||||
Lagrange{Quadrilateral, 1} → 4 nodes (bilinear)
|
||||
Serendipity{Quadrilateral, 2} → 8 nodes (no center)
|
||||
Lagrange{Quadrilateral, 2} → 9 nodes (with center)
|
||||
```
|
||||
|
||||
# Examples
|
||||
```julia
|
||||
Tri3() # 3-node triangle
|
||||
Quad4() # 4-node quadrilateral
|
||||
Tet10() # 10-node tetrahedron
|
||||
Hex8() # 8-node hexahedron
|
||||
# New API (explicit separation)
|
||||
topology = Triangle()
|
||||
basis = Lagrange{Triangle, 1}()
|
||||
element = Element(basis, (1,2,3))
|
||||
|
||||
# Old API (deprecated, but still works via aliases)
|
||||
element = Element(Tri3, (1,2,3)) # Tri3 is alias for Triangle
|
||||
```
|
||||
|
||||
See also: [`Tri3`](@ref), [`Quad4`](@ref), [`Tet10`](@ref), [`Hex8`](@ref)
|
||||
See also: [`Segment`](@ref), [`Triangle`](@ref), [`Quadrilateral`](@ref),
|
||||
[`Tetrahedron`](@ref), [`Hexahedron`](@ref), [`Pyramid`](@ref), [`Wedge`](@ref)
|
||||
"""
|
||||
abstract type AbstractTopology end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user