Commit Graph

3 Commits

Author SHA1 Message Date
Jukka Aho c5a1202c1d chore(assemblers): comment out missing nodal_cache.jl include
Comment out include for nodal_cache.jl as the file does not exist yet.

- Comment out include("nodal_cache.jl") with TODO note
2025-12-12 23:27:50 +02:00
Jukka Aho be8904cff5 refactor(assemblers): Update cache includes and remove old definitions
- Added includes for coo_cache.jl, csc_cache.jl, nodal_cache.jl
- Removed old COOCache, CSCCache, NodalCache definitions (now in separate files)
- Removed old ElementCache, NodeCache definitions (moved to element_cache.jl)
- Kept only high-level cache coordination logic
2025-11-20 16:56:36 +02:00
Jukka Aho b78aa10602 refactor(assemblers): Implement zero-allocation cache structures
- Implement COOCache for coordinate format assembly
- Implement CSCCache for compressed sparse column assembly
- Implement NodalCache for node-based assembly (future GPU)
- Add reset!() methods for cache reuse in nonlinear iterations
- Add extract_system() methods to get K, f from caches
- Implement build_sparsity_pattern() for CSC structure pre-building
- Extract mesh type parameters at runtime for capacity estimation
- 407 lines of cache implementation

Zero-allocation guarantee:
- All arrays pre-allocated during cache creation
- Assembly calls reuse existing arrays
- Critical for nonlinear solvers and time stepping

Memory efficiency:
- COO: Triplet arrays sized for element connectivity
- CSC: Pre-built sparsity pattern, reused structure
- Nodal: Includes node-to-elements inverse connectivity
2025-11-18 18:02:30 +02:00