Files
JuliaFEM.jl/docs/book
Jukka Aho f2b306f68e docs(book): Add nodal assembly and multi-GPU strategy document
New 588-line comprehensive strategic document explaining winning architecture:

Executive Summary (lines 1-19):
- Key results demonstrated on real hardware
- 9-92× CPU speedup, GPU kernel compilation, MPI working, Krylov convergence
- Multi-GPU workflow validated end-to-end

Problem: Traditional FEM doesn't scale (lines 21-59):
- v0.5.1 limitations: global matrix O(N²) memory, direct solver O(N³) time
- Scalability ceiling ~100K DOF
- Cannot scale: memory N², time N³

Solution: Nodal + Matrix-Free + Multi-GPU (lines 61-193):
- Architecture diagram with MPI ranks and local GPUs
- Three pillars: nodal assembly (row-by-row), matrix-free (matvec only), multi-GPU with MPI
- Each pillar explained with code examples and advantages

Why type stability required (lines 195-241):
- GPU kernel compilation: concrete types required, abstract fails
- MPI fast path: typed buffers vs slow serialization
- Krylov solvers: matrix-free operators need concrete types
- Demonstrated with code examples

Performance characteristics (lines 243-289):
- Complexity analysis: O(N²)→O(N) memory, O(N³)→O(N·k) time
- Scalability comparison table: 10K→10M DOF
- Demonstrated results: 10×10 system, 9 iterations, 7.73×10⁻¹⁴ error

Contact mechanics killer app (lines 291-340):
- Why nodal assembly natural for contact (contact is nodal not element-based)
- Contact workflow: detect→assemble→solve→update
- Element-based assembly is mismatch for contact

Implementation strategy v1.0 (lines 342-407):
- Phase 1: Foundation (complete) - type-stable design, GPU/MPI demos, Krylov validation
- Phase 2: Core implementation - nodal assembly API, matrix-free operator, GPU accel, MPI distribution
- Phase 3: Contact integration - detection, contribution to rows, iterative solve

Comparison with other strategies (lines 409-455):
- Global matrix assembly: dead end for scalability
- Element-based matrix-free: works but suboptimal for contact
- Nodal + matrix-free + multi-GPU (ours): best for large-scale contact

Validation and evidence (lines 457-533):
- Three demonstrations: gpu_mpi_demo, krylov_mpi_gpu_demo, field_storage_comparison
- Real-world applicability: LAMMPS, GROMACS use similar patterns
- Why traditional FEM codes don't do this: legacy constraints

Conclusion (lines 535-588):
- Five validated achievements proving path forward
- Not speculation: working code on real hardware
- Path is clear: type stability foundation, nodal assembly pattern, Krylov+MPI solver
- Related documentation links

Purpose: Strategic justification for v1.0 architecture with real evidence
2025-11-09 10:52:38 +02:00
..

title, subtitle, description, date, author, categories, keywords, audience, level, type, status
title subtitle description date author categories keywords audience level type status
The JuliaFEM Book A comprehensive manual mixing theory, software design, and personal experience Deep dive into FEM theory, design philosophy, and research directions 2025-11-09 Jukka Aho
theory
research
philosophy
fem theory
contact mechanics
design philosophy
research
researchers and theory enthusiasts expert book work in progress

The JuliaFEM Book

Audience: Advanced researchers, theory nerds, those who want to understand the "why" and "how" at a deep level. And Jukka.

This is the JuliaFEM Bible - a comprehensive manual mixing theory, philosophy, software design, and personal experience. It's educational, opinionated, and unapologetically deep.

What's Here

  • Mathematical Foundations: Lagrange basis functions, weak forms, contact mechanics
  • Design Philosophy: Why JuliaFEM exists, what problems it solves (and doesn't)
  • Technical Vision: Strategic mistakes from 2015-2019, lessons learned
  • Research Directions: Experimental ideas (nodal assembly, matrix-free, etc.)
  • Personal Notes: The journey, the failures, the "aha!" moments
  • Theory + Code: How mathematics becomes software

What's NOT Here

  • "How do I install?" (see docs/user/)
  • "How do I add a feature?" (see docs/contributor/)
  • Short answers (everything here is DEEP)

Philosophy

"Let me show you how I think about FEM."

This is:

  • Educational: Teach FEM through implementation
  • Personal: Written in Jukka's voice, reflecting 8+ years of experience
  • Opinionated: Strong views on what works and what doesn't
  • Comprehensive: From first principles to cutting-edge research
  • Honest: Documents failures as much as successes

We assume you:

  • Love mathematics AND programming
  • Want to understand WHY, not just HOW
  • Have time to read deeply
  • Are curious about unconventional approaches
  • Might be me, 5 years from now, trying to remember why I did this

Structure

Part I: Foundations

  • Finite Element Method (brief review)
  • Lagrange Basis Functions (deep dive)
  • Assembly and Solving
  • Contact Mechanics

Part II: Software Design

  • Type Stability and Performance
  • Zero-Allocation Design
  • Immutability and Composition
  • Field System Architecture

Part III: History and Vision

  • Strategic Mistakes (2015-2019)
  • Why JuliaFEM is Different
  • Contact Mechanics Focus
  • Laboratory Philosophy

Part IV: Research

  • Nodal Assembly (experimental)
  • Matrix-Free Methods
  • Automatic Differentiation
  • GPU Acceleration

Part V: The Journey

  • Personal Reflections
  • Lessons Learned
  • Future Directions
  • Open Questions

Reading Guide

  • For Theory: Start with Part I
  • For Design Rationale: Start with Part II
  • For History: Start with Part III
  • For Research Ideas: Start with Part IV
  • For Philosophy: Read Part V first, then everything else

Start here: Mathematical Foundations | Strategic Mistakes | Why JuliaFEM?