specfem::program::Context¶
-
class Context¶
RAII-based context managing Kokkos and MPI lifecycle.
This class provides RAII-based management of Kokkos and MPI initialization and proper resource cleanup.
Usage:
int main(int argc, char* argv[]) { specfem::program::Context context(argc, argv); // Kokkos & MPI automatically initialized // ... use context ... // Automatic cleanup on scope exit }
Deleted copy/move constructors and assignment operators
Context manages global resources (Kokkos and MPI) with RAII semantics. Copying or moving would violate single-ownership and could lead to double-finalization or resource corruption.