Skip to content

[params] Improve handling of parameter files

Timo Koch requested to merge feature/params.input into master

Fix #623 (closed).

If no parameter file is given look for

  • executbale.input
  • params.intput

If none are found, try it without parameter file. If a parameter file is given, let Dune do the error handling, and check if the file exists.

Messages are now:

  • no parameter file found:
No parameter file found. Continuing without parameter file.

ParameterException [init:../dumux/io/grid/gridmanager.hh:407]: Please supply one of the parameters Grid.UpperRight, or a grid file in Grid.File ---> Abort!
  • parameter file doesn't exist:
Reading parameters from file bla.inpuit.
Dune reported error: Dune::IOError [readINITree:../dune/common/parametertreeparser.cc:49]: Could not open configuration file bla.inpuit ---> Abort!

which I find better than before. In particular if a program doesn't need a parameter file, there is no error now.

Edited by Timo Koch

Merge request reports