FS#284 Make GridCreator detect grid format from ini file
Metadata
Description
We recently decided to include more GridCreators in dumux (e.g. *.msh, *.art). I recently found it quite inconvenient that when you want to specify a gmsh file instead of a DGF you have to change something in the source too and recompile.
I suggest two alternatives:
1. A GridCreator/Factory like the one in dune-testtools:
http://conan2.iwr.uni-heidelberg.de/git/quality/dune-testtools/blob/master/dune/testtools/gridconstruction.hh
Explanation: The Gridfactory class has specializations for all supported grid managers. The Gridtype gets deduced by our Dumux Property "Grid". For each grid type we offer an interface in the input file. For e.g. UG it is optional if we want to specify a file (dgf, msh, art) via e.g. "Grid.File = mygrid.dgf" or a cube/simplex convenience constructor via e.g. "cellsX = 20...".
Pros: there is only one GridCreator, no need for a property. Flexible.
Cons: more change, nice interface in the ini file has to be found + good error handling for the user.
2. We keep two kinds of GridCreators:
- the "simple" ones, cube (cubes / simplices), maybe sphere in the future
- a single FromFileGridCreator that detects the type of Grid from the extension of the file given in the input file.
Cons: still multiple grid creators
Pros: easier implementation, Filetype doesn't matter
I would opt for the second one for now, as it is closer to what we already have and just makes life easier if you want to change the grid file to another format. A more comprehensive change like the one in 1. could be realized in 2.9 if positive feedback.