This major release brings GPU acceleration, modern visualization output, improved configuration formats, and a complete CI/CD pipeline — transforming OpenPFC into a production-ready, GPU-enabled phase field simulation framework with comprehensive testing and developer tooling.
Added: Complete CUDA/GPU support with DataBuffer memory abstraction, VTK parallel output for visualization, TOML configuration format, runtime FFT backend selection, parameter validation system, modular CMake architecture, comprehensive CI/CD workflows, SparseVector with MPI exchange, and type-safe World API. 257 commits including 10 new API examples, integration tests, benchmarks, and research tools.
Changed: Modular code organization (CMake, Tungsten, UI, World split into focused components), single-invocation test model, optional benchmark builds, enhanced compiler warnings, and updated dependencies (nixpkgs 24.05, tomlplusplus integration).
Fixed: Build system improvements (CMake warnings, test discovery, CI reliability), memory safety (initialization, template instantiation), MPI synchronization, code quality (shadowing, const correctness, clang-format), and documentation (SPDX headers, Doxygen configuration).
Deprecated: Old world::create(Int3, Real3, Real3) in favor of type-safe strong types API.
Breaking changes: None — all deprecated APIs remain functional.
Added
- GPU/CUDA Support: Complete CUDA implementation enabling GPU-accelerated PFC simulations.
AddedDataBufferfor backend-agnostic memory management with CPU/GPU memory traits,
CUDA FFT integration via HeFFTe, GPU kernels for element-wise operations, andGPUVector
RAII container. Implemented full Tungsten model on GPU with optimized kernel launches and
CPU-GPU synchronization for FieldModifiers and VTK output. Runtime backend selection API
allows choosing between CPU and CUDA FFT backends via configuration. Comprehensive test
coverage includes GPU device detection, memory allocation, FFT operations, and CPU vs CUDA
result comparison. Build system supports optionalOpenPFC_ENABLE_CUDAflag. - VTK Output: New VTK ImageData writer in
include/openpfc/results/vtk_writer.hppand
src/results/vtk_writer.cppfor parallel visualization output. Generates.vtifiles
for each rank and.pvtiparallel metadata files for ParaView/VisIt. Includes comprehensive
test suite with MPI-aware tests and single-invocation test model to prevent cleanup races. - TOML Configuration: Added TOML config file support alongside JSON. New
feat(utils): Add TOML to JSON conversion utilityenables.tomlinput files with
automatic conversion. Integrated tomlplusplus library via CMake find module. All example
configurations converted to TOML format. Unit tests validate conversion accuracy. - Modular CMake Architecture: Refactored monolithic CMakeLists.txt into 12 focused modules
incmake/directory: ProjectSetup, CompilerSettings, CudaSupport, Dependencies,
LibraryConfiguration, BuildOptions, CodeCoverage, Installation, PackageConfig, BuildSummary.
Improves maintainability and reusability. Documented incmake/README.md. - CI/CD Pipelines: Comprehensive GitHub Actions workflows for build matrix (GCC/Clang,
multiple OS), documentation deployment, code coverage analysis with Codecov integration,
and REUSE license compliance. Status badges added to README. Documentation includes
workflow descriptions and troubleshooting guides. - Parameter Validation System: New UI subsystem for configuration validation with
ParameterMetadata,ParameterValidator, andValidationResultclasses. Supports nested
path validation, finite checks, type validation, and helpful error messages. Integrated
into Tungsten app with comprehensive test coverage (300+ assertions). - FFT Backend Selection: Runtime FFT backend selection API allowing users to choose
between available HeFFTe backends (FFTW, MKL, cuFFT) via configuration. New
examples/fft_backend_benchmark.cppdemonstrates performance comparison. Backend field
added to config schema with parsing and validation. - SparseVector & MPI Exchange: New
SparseVectorcontainer with halo exchange patterns
for domain decomposition. Includes gather/scatter operations, neighbor exchange with MPI,
and halo pattern creation utilities. Comprehensive test suite validates exchange correctness. - Testing Infrastructure: First integration test suite for diffusion model validating
complete simulation pipeline against analytical solutions (4 test cases, 331 assertions).
Added benchmark subdirectory with microbenchmarks for World coordinate operations.
Comprehensive unit tests for UI validation (300+ assertions), VTK writer (MPI-aware),
DataBuffer, GPUVector, and SparseVector. Switched to single-invocation test model to
prevent MPI initialization issues. Test coverage improvements across all modules. - World API: Type-safe World construction using strong types from
strong_types.hpp.
Added newcreate(GridSize, PhysicalOrigin, GridSpacing)overload preventing parameter
confusion at compile time. Oldcreate(Int3, Real3, Real3)API deprecated. Zero overhead -
strong types compile away completely. Updated all examples and helper functions. Test suite
with 71 assertions covering type safety, zero overhead, and backward compatibility. - Documentation: Added 10 comprehensive API examples (World, FFT, Simulator, Time,
Decomposition, ResultsWriter, FieldModifier, DiscreteField, Model, custom field initializer).
Added CITATION.cff for standardized citations. Improved Doxygen configuration. README
sections on configuration validation, FFT backend selection, and extending OpenPFC. - Research Tools: Added power consumption benchmarks for FFT operations (CPU and GPU),
multi-GPU HeFFTe examples, and scalability testing applications for Tungsten model.
Changed
- CMake Structure: Root
project()moved to top-level CMakeLists.txt. Build options
reorganized into logical modules. Test discovery switched to single-invocation model.
Benchmark compilation now optional viaOpenPFC_BUILD_BENCHMARKS. - Tungsten Structure: Split monolithic tungsten code into modular headers and separate
JSON inputs intoinputs_json/subdirectory. Restructured JSON schema to nested format.
Renamed 'origo' field to 'origin' for consistency. - UI Module: Split monolithic
ui.hppinto modular components. Madeplan_options
optional in app config. Added error formatting utilities for better user messages. - World Module: Split
world.hppinto modular headers. Added query helper examples.
Updated coordinate benchmark documentation. - Test Organization: Split monolithic parameter validation tests. Serialize VTK writer
tests to prevent cleanup races. MakeMPI_Workerstatic to persist MPI per process.
Normalize test commands under single-invocation model. - Build Warnings: Enabled additional compiler warnings for code quality in Debug builds.
Added-Werror=format-security. Made GCC-specific warnings conditional. Format check
warns instead of fails in Nix builds. - Dependencies: Updated nixpkgs from 23.11 to 24.05. Added git and tomlplusplus to
Nix build dependencies. Integrated Catch2 test discovery.
Fixed
- Build System: Fixed CMake warnings by moving
project()to root. Fixed Catch2 test
discovery and optional MPI suites. Made documentation comment posting optional in CI.
Cleaned up clang-format artifacts before REUSE checks. Improved error reporting in Nix tests. - Test Fixes: Fixed narrowing conversions in sparse vector tests. Fixed GridSpacing
initializers in FFT tests. Fixed syntax errors in world benchmark and CUDA tests. Added
missingpfcnamespace qualifiers. Suppressed unused variable/parameter warnings with
[[maybe_unused]]. Fixed incorrectly convertedworld::createcalls. - Application Fixes: Fixed missing
set_fft()call in diffusion example causing runtime
errors. Removed unused fields (verbose in Diffusion, m_first in Aluminum). Fixed array
initialization in SeedFCC. Added MPI-aware main to tungsten CPU vs CUDA test. - MPI Fixes: Fixed
MPI_Workerto be safe for test frameworks. Query current MPI
rank/size when generating PVTI instead of using stale values. Synchronize ranks before
cleanup in VTK writer test to prevent races. - Memory Safety: Initialize all params struct members in aluminum to prevent undefined
behavior. Add explicit template instantiation for World constructor. Fix CPU FFT
std::vectorinterface to call HeFFTe directly. - Code Quality: Removed redundant const qualifiers. Added missing override keywords.
Fixed variable shadowing in multiple files. Removed variable shadowing in timing collection.
Fixed clang-format violations across codebase. - CI/CD: Removed ubuntu-20.04 from test matrix. Removed Cachix binary cache step.
Initialized git submodules in all workflows. Made clang-format check warning instead of
error. Used forked clang-format-action with fail-on-error option. - Documentation: Removed internal tracking references from code. Added SPDX headers for
REUSE compliance to all test READMEs. Fixed Doxygen file headers for better doc generation.
Deprecated
- World API: Old
world::create(Int3, Real3, Real3)deprecated in favor of type-safe
create(GridSize, PhysicalOrigin, GridSpacing). Migration guide in documentation.
Breaking Changes
None - all deprecated APIs remain functional with warnings.