OpenPFC is an open-source C++20 framework for partial differential equations
on structured, periodic grids. Spectral and finite-difference methods share
one MPI domain decomposition, distributed transforms use HeFFTe, and the same
models run on CPUs and on NVIDIA and AMD GPUs. Use it as a library or through
the configuration-driven applications in apps/. Phase-field crystal models
are where the project began.
Everything else is on the website: https://vtt-propertune.github.io/OpenPFC/
| What it does | Capabilities · Applications · Performance |
| Get started | Installing OpenPFC · 15-minute start · Quick start |
| Look things up | Handbook · C++ API reference · Release notes |
| Decide | When not to use OpenPFC |
| Cite | How to cite OpenPFC |
OpenPFC needs a consistent compiler, MPI and HeFFTe stack; the installation guide covers workstations and the supported clusters. For a first model using an installed SDK, follow the 15-minute start. To build and test a checkout on Tohtori:
./scripts/build.sh --machine=tohtori --cpu
module load openmpi/5.0.10
mpirun -n 1 ./builds/release/examples/05_simulatorOn an ordinary workstation with dependencies installed, use
--machine=portable --cpu. For LUMI's scheduled build and run workflow, follow
the installation guide.
An installed OpenPFC exports OpenPFC::openpfc. The package resolves the MPI
C and C++ components, so a consumer enables both languages:
cmake_minimum_required(VERSION 3.21)
project(my_sim LANGUAGES C CXX)
find_package(OpenPFC 0.5 CONFIG REQUIRED)
add_executable(my_sim main.cpp)
target_link_libraries(my_sim PRIVATE OpenPFC::openpfc)See CONTRIBUTING.md for tests, CI and commit conventions.
If OpenPFC contributes to published work, cite T. Pinomaa, J. Aho, J. Suviranta, P. Jreidini, N. Provatas and A. Laukkanen, "OpenPFC: an open-source framework for high performance 3D phase field crystal simulations", Modelling and Simulation in Materials Science and Engineering, 2024, doi:10.1088/1361-651X/ad269e. BibTeX and version DOIs are on the citation page.
AGPL-3.0-or-later; see LICENSE.md.
