Architecture and Design
Overview
FastIterativeMethod.jl implements the Fast Iterative Method (FIM) for solving eikonal-type problems on 3D tetrahedral meshes. The implementation is lightweight and modular.
Core Algorithm
The FIM algorithm (based on Grandits et al. 2020) iteratively updates field values (typically arrival times, stored in Φ) by:
- Maintaining an active list — Vertices whose field values haven't converged yet.
- Local solves — For each active vertex, solving local 2D (face) and 3D (element) sub-problems.
- Convergence checking — Deactivating vertices once convergence is achieved and propagating updates to neighbors.
Design Principles
- Backend-agnostic conductivity — The
ConductivityEvaluatorCachetype allows plugging in different packages (Ferrite, Thunderbolt, ...). - Lightweight core — The solver doesn't depend on any mesh representation; you provide vertices and cell connectivity.
- Flexible active lists — Two implementations (
BitVectorandUniqueVector) with different performance characteristics. - In-place operations — Field values and solver state are modified in-place for efficiency.
Key Types
ConductivityEvaluatorCache
Stores conductivity information and evaluation points.
FIMCache
The main solver state holding:
- Mesh topology (vertices, cells, vertex-to-cell mapping)
- Field values (
Φ) - Active list for iteration
- Conductivity evaluator
Active Lists
BitVector— Simple, but suboptimal.UniqueVector— Maintains ordered list of active vertices only (preferred for large problems).
Extension Points
Users and backend developers can extend FastIterativeMethod by:
- Custom conductivity — Implement
evaluate(cache, qp_index)for your backend. - Cell reinitialization — Implement
reinit!(cache, cell_id)for backend-specific setup. - Active list strategies — Implement the active list interface for alternative iteration strategies.
See the Conductivity Backends guide for more details.