[Dune] ANN and parameters

Andreas Dedner dedner at mathematik.uni-freiburg.de
Thu Nov 19 18:04:13 CET 2009


Dear Dragan,
thank you for your input; your approach is definitly the best way
to go. After having a look at your patch Martin and I decided that
improving the default behavior (when ANN is not available) is not
so difficult - in fact I was sure we were using a std::map anyway and
was surprised to see that this was not the case...
Perhaps you could tell us how much more performance you can gain with
ANN compared to using a simple std::map?
At the moment I would suggest not to commit your patch since the
question of how data can be passed through the grid creation process is
something we will be discussing on Monday at our meeting. Perhaps
we will decide that the GridFactory should supply some functionality
and then DGF does not have to do the work.
Thanks again for your patch
Andreas
PS:
  > Several issues still exist. First, if the grid is modified, elParam is
> not valid any more for the purpose of the elParameters method, and
> should be interpolated by a piecewise constant interpolation in a
> similar manner user arrays are treated. My code does not refine the
> grid so I leave this unfinished. The old parameters method can still
> be used after the refinement but it is very slow (and it should
> probably be declared const).
My idea always was that the parameters should be retrieved by the user
from the GridPtr and stored in a seperated data structure. If I have
implemented DOF vectors which can be prolonged/restricted I can use
those for storing the element/vertex parameters. Have a look at the
dgfparser/test/main.cc file. If the GridPtr is used in the manner
shown there then the memory overhead is acceptable I think (o.k. at some
point the parameters are in memory two times...)


> Fourth, I use LeafMultipleCodimMultipleGeomTypeMapper in the GridPtr
> construction process, while I guess the grid has only one level, so
> maybe some other mapper would be more efficient? It seems to work fine
> as it is.
I think it Level<0> index set is the best choice here - but (see above)
if the user copies the parameters out of the GridPtr then he can decide
on how to store the data.





More information about the Dune mailing list