From 11b1c6e94d9f8ba278b53b07c47fc3a5481d94c3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 9 Jul 2024 15:14:26 -0600 Subject: [PATCH] Read input file name from the command line. --- examples/step-86/step-86.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/step-86/step-86.cc b/examples/step-86/step-86.cc index 4dd5daac1a..cc54612330 100644 --- a/examples/step-86/step-86.cc +++ b/examples/step-86/step-86.cc @@ -1115,8 +1115,10 @@ int main(int argc, char **argv) Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); HeatEquation<2> heat_equation_solver(MPI_COMM_WORLD); - ParameterAcceptor::initialize("heat_equation.prm", - "heat_equation_used.prm"); + + const std::string input_filename = + (argc > 1 ? argv[1] : "heat_equation.prm"); + ParameterAcceptor::initialize(input_filename, "heat_equation_used.prm"); heat_equation_solver.run(); } catch (std::exception &exc) -- 2.39.5