From: Wolfgang Bangerth Date: Tue, 9 Jul 2024 21:14:26 +0000 (-0600) Subject: Read input file name from the command line. X-Git-Tag: v9.6.0-rc1~78^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11b1c6e94d9f8ba278b53b07c47fc3a5481d94c3;p=dealii.git Read input file name from the command line. --- 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)