[Dune] Description of DGF in the grid-howto

Andreas Dedner andreas.dedner at mathematik.uni-freiburg.de
Fri Aug 3 01:49:02 CEST 2007


Dear all,

> * The howto states that it is necessary to use obscure
> preprocessor macros to use the DGF parser.
> I think the user should not be
> encouraged to use preprocessor macros. We want to teach
> then a clean programming stile.
> The preprocessor does obfuscate the code and it
> get's more difficult to debug. The examples should be
> adjusted such that the GridType macro is not used.
I do not find constructing 5 different grids simultaniously
in main() and then to use one of them for the numerical
scheme and telling people to switch form uc1 to uc4
if they want to test a different implementation a more
satifying programming style.
The same is even more true for having a lot of
#ifdefs in main() (IF_HAVE_UG,IF_HAVE_ALBERTA...).
I am not saying that the defines during make are
perfect but they do the job and thats (in my opinion)
even more important then perfect programming style.
Perhaps more ellaborate names like DGFGRIDDIM or
something would be a good idea. I think with gridtype.hh
the code is easier to read and therefore easier to maintain
and to debug.

> * The howto does only offer a very brief introduction to
> the DGF parser and refers to the doxygen documentation
> for all further information.
> I think a howto should explain a little more than
> this.
The dgf documentation is quite ellaborate and already in
the form of a howto with many examples.
We can add more to the howto in the future.

>
> * The tutorial was structured in a step by step fashion.
> The unitcube class was introduced to ease the creation
> of different grids. Now
> some applications use the DGF parse to create these
> unitcubes. I don't really see an advantage in this
> behaviour. I would prefer to
> have an additional application that teachs the usage of
> the DGF parser.
The grid howto should encourage people to test dune using
test cases they are used to with a minimum of effort -
that allows them to decide if dune is the right thing
for them. That requires easy chang of grid implementations
also for more complex domains. At some point we should
add a laplace example to the howto because that is a
standard test case. Then people might want to switch
from unitcubes to corner problems prehaps in 3d.
Even this type of simple domain is not simple to do
for all grids (e.g. ALU requires all kinds of
orientation issues which are avoided in DGF - one
of the main reasons for writting that parser...

Best wishes  
Andreas




More information about the Dune mailing list