mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-08-30 16:12:51 +00:00
test(continuum): Add tests for dofs_per_node function
New file: test/domains/continuum/test_dofs_per_node.jl
Tests for:
- dofs_per_node(field) for various field types
- Displacement{3} → 3 DOFs per node
- Temperature → 1 DOF per node
- DisplacementRotation → 6 DOFs per node (future)
Validates correct DOF count for field types used in
DOF mapping and cache dimensioning.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Test dofs_per_node function
|
||||
|
||||
@testset "dofs_per_node" begin
|
||||
kernel = create_test_kernel()
|
||||
|
||||
# Test that it returns 3 for 3D displacement field
|
||||
@test dofs_per_node(kernel) == 3
|
||||
|
||||
# Test zero allocations
|
||||
allocs = @allocated dofs_per_node(kernel)
|
||||
@test allocs == 0
|
||||
end
|
||||
Reference in New Issue
Block a user