Commit Graph

18 Commits

Author SHA1 Message Date
Jukka Aho 1f97dc4314 deps: Add JuliaFormatter as project dependency
- Added JuliaFormatter = 98e50ef6-434e-11e9-1051-2b60c6c9e899
- Added version constraint: JuliaFormatter = 2.2.0
2025-11-21 00:32:20 +02:00
Jukka Aho c7276a93d7 deps: Add BenchmarkTools to test dependencies
- Added BenchmarkTools to [extras] section
- Added BenchmarkTools to test target
- Required for performance benchmarking of assembly functions
2025-11-20 16:56:35 +02:00
Jukka Aho 6b3a7df211 deps: Add StaticArrays for zero-allocation block API
- Add StaticArrays v1.9.15 for SVector/NTuple support
- Required for stack-allocated PreparedElement geometry cache
- Enables compile-time sized arrays in block computations
2025-11-19 02:13:22 +02:00
Jukka Aho 0ca17cb478 deps: Add LinearOperators.jl for Krylov methods
Add LinearOperators dependency (v2.11.0) to support matrix-free
Krylov subspace methods (GMRES) in Newton-Krylov solver framework.

Also reorganize Project.toml sections: move [weakdeps] and [extensions]
after [compat] for better readability.
2025-11-14 20:32:56 +02:00
Jukka Aho ecfbba65f7 deps: Add CUDA extension support to Project.toml
- [weakdeps] CUDA package for optional GPU support
- [extensions] JuliaFEMCUDAExt loaded when 'using CUDA'
- Zero overhead when CUDA not loaded
- Enables GPU acceleration without mandatory dependency
2025-11-12 01:08:58 +02:00
Jukka Aho ddaba3ee29 deps: Add IterativeSolvers.jl dependency
- Add IterativeSolvers v0.9.4 for CG solver
- Required for GPU elasticity solver implementation
- Provides matrix-free iterative solver framework
2025-11-10 22:23:39 +02:00
Jukka Aho 6a8f8adc1f docs: Benchmark manual vs AD derivatives for Tet10
RESEARCH QUESTION: Should JuliaFEM use hand-calculated derivatives or AD?

Created comprehensive benchmark comparing:
- Manual: Hand-calculated derivatives (traditional FEM)
- AD: Tensors.jl gradient() (automatic differentiation)

RESULTS (AMD Ryzen 9, Julia 1.12.1):
- Manual: 8.7 ns, 0 allocations
- AD:     268.1 ns, 0 allocations
- AD is 30× SLOWER than manual

KEY FINDINGS:
 Both achieve zero allocations (Tensors.jl is well-optimized)
 AD has 30× compute overhead from dual number arithmetic
⚠️  In assembly loops: millions of calls = 10+ seconds extra per solve

RECOMMENDATION:
- Keep manual derivatives for common elements (Tet10, Hex8, Quad4, etc.)
- Use AD for prototyping and rare elements
- Unit test manual vs AD to catch errors
- Future: Generate derivatives symbolically (Symbolics.jl)

WHY NOT AD EVERYWHERE?
Assembly is hottest path in FEM. 30× overhead = unacceptable for
production code. Users will notice the performance difference.

WHY NOT ABANDON AD?
- Excellent for prototyping
- Required for exotic bases (NURBS)
- Perfect for unit testing manual derivatives
- Zero allocations impressive

Files:
- benchmarks/tet10_derivatives_benchmark.jl (runnable benchmark)
- docs/benchmarks/shape_function_derivatives_ad_vs_manual.md (analysis)

Dependencies added: BenchmarkTools

This answers the research question definitively with data.
2025-11-09 03:41:47 +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 008d615c62 ci: Add GitHub Actions workflows and fix test exports
Infrastructure improvements:

1. GitHub Actions CI workflow:
   - Test on Julia 1.10 (LTS) and latest stable
   - Ubuntu Linux runner
   - Code coverage via Codecov

2. Documentation build workflow:
   - Builds on push to master/main and PRs
   - Uses Documenter.jl with GitHub Pages deployment

3. Fix missing exports for tests:
   - Add Statistics to test dependencies

Tests still have API mismatches (49 failures) but infrastructure is now
2025-11-09 01:35:00 +02:00
Jukka Aho 5ee7b01ce7 refactor: Reduce dependencies to minimal set (stdlib + Tensors only)
Removed external dependencies:
- Arpack: Modal analysis (will re-enable via package extensions)
- Calculus: Replaced with built-in polynomial differentiation
- ForwardDiff: Plasticity (will re-enable via package extensions)
- HDF5 + LightXML: I/O functionality (will re-enable via package extensions)

Result: 4 total dependencies (3 stdlib + 1 external)
- LinearAlgebra, Logging, SparseArrays (stdlib)
- Tensors.jl (only external dependency)

Previously: 17+ dependencies
Reduction: 76% fewer dependencies
2025-11-08 14:31:33 +02:00
Jukka Aho ef9cddff13 feat: Consolidate AbaqusReader and AsterReader (mesh I/O)
- Added 1111 lines of mesh reading code to src/readers/
- ABAQUS .inp format support (6 files: parse_mesh, parse_model, keywords, etc.)
- Code Aster .med format support (3 files: read_aster_mesh, read_aster_results)
- Modernized Julia 0.x → 1.x syntax:
  * Nullable{T} → Union{T, Nothing}
  * get(nullable) → direct field access
- Added Logging stdlib to Project.toml dependencies
- Functions verified: abaqus_read_mesh, aster_read_mesh

Result: 7 vendor packages consolidated (~6400 lines total)
        FEMBasis, FEMBase, FEMQuad, FEMSparse, AbaqusReader, AsterReader
Tests: 5 passing (baseline maintained)
2025-11-08 11:25:13 +02:00
Jukka Aho d3fc55f13e feat: Integrate FEMBasis into JuliaFEM module (partial)
- Add Tensors and Calculus to Project.toml dependencies
- Add basis includes to src/JuliaFEM.jl (Phase 1 integration)
- Fix FEMBasis. namespace references → use JuliaFEM namespace
- Update create_basis.jl: AbstractBasis (not FEMBasis.AbstractBasis)

Status: Basis files load, but conflict with FEMBase expectations
Next: Need to consolidate FEMBase or work around AbstractElement type constraints

This is expected during consolidation - we're bridging two systems.
2025-11-08 09:09:54 +02:00
Jukka Aho e81620b328 chore: Update Project.toml dependencies
- Update FEMSparse UUID to match vendor package
- Add InterfaceMechanics dependency (from vendor)
- Reformat author/version lines (Pkg auto-format)

Auto-generated by Julia Pkg during development session.
2025-11-08 07:48:11 +02:00
Jukka Aho 280352f527 Fix Project.toml
There was two [extra] sections, now fixed.
2019-11-26 22:45:09 +07:00
Jukka Aho 08eb3bbfbb Change version number to 0.5.2 2019-11-26 16:12:03 +07:00
Jukka Aho d781b00da1 Merge branch 'master' into kc/local_buffer 2019-11-26 15:29:02 +07:00
Jukka Aho 0d30a8f516 Create Project.toml file and remove REQUIRE files 2019-10-11 17:55:27 +03:00
Kristoffer Carlsson 09c355b916 make backwards compatible 2018-11-29 17:40:55 -05:00