]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Print an error message if no input is given.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 13 May 2020 22:03:22 +0000 (16:03 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 15 May 2020 00:18:09 +0000 (19:18 -0500)
examples/step-50/step-50.cc

index cbd95647313dab783c50debab8db68356ac5557c..4ff41e7bffb09b42dcdb36c67ef373e9f83d40e2 100644 (file)
@@ -327,7 +327,12 @@ bool Settings::try_parse(const std::string &prm_filename)
 
   if (prm_filename.size() == 0)
     {
-      /* No .prm file provided? Print the default values and exit. */
+      std::cout << "****  Error: No input file provided!\n"
+                << "****  Error: Call this program as './step-50 input.prm\n"
+                << "\n"
+                << "****  You may want to use one of the input files in this\n"
+                << "****  directory, or use the following default values\n"
+                << "****  to create an input file:\n";
       if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
         prm.print_parameters(std::cout, ParameterHandler::Text);
       return false;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.