Files
JuliaFEM.jl/test/runtests_new.jl
T
Jukka Aho 52ebe682e9 fix: Standardize on Tensors.jl Vec type throughout
Major architectural decision: Use Tensors.jl consistently everywhere
for geometric vectors, integration points, and coordinates.

Changes to src/elements/elements.jl:
- get_basis(): Convert ip to Vec, use Vector (not Matrix) for eval_basis!
- get_dbasis(): Convert ip to Vec
- jacobian evaluation: Convert geometry and ip.coords to Vec properly
- Handle both raw coordinates (Tuple) and IP struct transparently

New Tutorial 3: Numerical Integration and Jacobian (49 tests)
- Integration point structure and weights
- Jacobian determinant and matrix evaluation
- Numerical integration (constant, linear, quadratic functions)
- Multiple element types (Quad4, Seg2, Tri3)

Tests: 107 → 156 passing (49 new)
Runtime: ~7 seconds

Closes architectural standardization on Tensors.jl.
Related to Issue #250 (merge conflict resolution).

Why Tensors.jl:
- Type stability (100× performance vs Dict-based)
- Material science compatibility (stress tensors)
- Zero-cost abstractions
- Consistent API across all geometric calculations
2025-11-09 03:10:11 +02:00

48 lines
1.3 KiB
Julia

# JuliaFEM Test Suite - New Structure
# Educational testing with Literate.jl
using Test, JuliaFEM
# Configuration
const RUN_TUTORIALS = get(ENV, "JULIAFEM_TEST_TUTORIALS", "true") == "true"
const RUN_UNIT = get(ENV, "JULIAFEM_TEST_UNIT", "false") == "true"
const RUN_OLD = get(ENV, "JULIAFEM_TEST_OLD", "false") == "true"
println("="^70)
println("JuliaFEM Test Suite (New Structure)")
println("="^70)
println("Tutorials: ", RUN_TUTORIALS ? "✓" : "✗")
println("Unit tests: ", RUN_UNIT ? "✓" : "✗")
println("Old tests: ", RUN_OLD ? "✓" : "✗")
println("="^70)
# Tutorial Tests
if RUN_TUTORIALS
@testset "Tutorials" begin
@testset "01_Fundamentals" begin
include("tutorials/01_fundamentals/creating_elements.jl")
include("tutorials/01_fundamentals/reading_gmsh_meshes.jl")
include("tutorials/01_fundamentals/basis_functions.jl")
include("tutorials/01_fundamentals/validation_1element_quad4.jl")
end
end
end
# Unit Tests
if RUN_UNIT
@testset "Unit Tests" begin
@info "No unit tests yet"
end
end
# Old Tests
if RUN_OLD
@warn "Old tests have 49+ failures - see docs/TEST_FIXES_NEEDED.md"
include("runtests.jl") # Original test suite
end
println()
println("="^70)
println("Complete - See docs/TESTING_PHILOSOPHY.md")
println("="^70)