Configuration
Selecting build features and using Rodin's generated configuration.
Rodin's build selects execution backends, optional dependencies, tests and documentation through CMake options. CMake generates Rodin/Configure.h from Configure.h.in; exported CMake targets also carry the include paths, compile definitions and dependencies needed by consumers.
Configure a build
cmake -S . -B build \ -DCMAKE_BUILD_TYPE=Release \ -DRODIN_USE_MPI=ON \ -DRODIN_MULTITHREADED=ON \ -DRODIN_USE_PETSC=OFF cmake --build build
These switches select different capabilities:
| CMake option | Purpose |
|---|---|
RODIN_USE_MPI | Distributed-memory support; see MPI. |
RODIN_MULTITHREADED | Shared-memory execution policies used by Assembly. |
RODIN_USE_OPENMP | OpenMP dependency support. |
RODIN_USE_PETSC | PETSc-backed linear algebra and variational operations; see PETSc. |
RODIN_USE_SCOTCH | Graph-based mesh partitioning through Scotch. |
RODIN_BUILD_UNIT_TESTS | Unit-test executables. |
RODIN_BUILD_MANUFACTURED_TESTS | Manufactured-solution tests. |
RODIN_BUILD_CONVERGENCE_TESTS | Convergence studies. |
RODIN_BUILD_BENCHMARKS | Benchmark executables. |
RODIN_BUILD_DOC | API and guide documentation. |
RODIN_USE_MCSS | The styled documentation renderer. |
Dependency availability and the requested options determine the configured build. Inspect build/CMakeCache.txt for its selected CMake values. Optional backends have their own dependency requirements; enabling an option does not install the corresponding system library.
Inspect configuration in C++
#include <Rodin/Configure.h> #if defined(RODIN_USE_MPI) // Implementation requiring Rodin's MPI configuration. #endif
Feature macros in the generated header are generally defined when enabled and absent otherwise. The Configure.h reference documents individual version, feature and capacity macros. Some backend definitions are supplied by exported CMake targets; link the relevant Rodin targets to retain their compile definitions and dependencies.
Configure.h.in is the source template, and Configure.h is the generated include. Regenerate the build after changing CMake selections rather than editing the generated header or manually enabling a backend in consumer code.
Module-specific controls
A small number of capacity and precondition macros are declared by their owning headers. Their references remain attached to those files:
- RODIN_
GEOMETRY_ REQUIRE_ INCIDENCE checks a required mesh incidence relation. - RODIN_
QF_ GRUNDMANNMOLLER_ MAX_ ORDER bounds the configured Grundmann–Möller order. - RODIN_
VARIATIONAL_ H1ELEMENT_ MAX_ VECTOR_ DIMENSION bounds H1 vector capacity.