[Dune] [#699] Wishlist: a general dynamic parameter interface for grids

Dune flyspray at dune-project.org
Tue Dec 29 12:23:28 CET 2009


A new Flyspray task has been opened.  Details are below. 

User who did this - Oliver Sander (sander) 

Attached to Project - Dune
Summary - Wishlist: a general dynamic parameter interface for grids
Task Type - Feature Request
Category - Grid
Status - New
Assigned To - 
Operating System - Unspecified / All
Severity - Low
Priority - Normal
Reported Version - 1.2
Due in Version - Undecided
Due Date - Undecided
Details - I would like to propose the following addition to the grid interface.  It is not urgent, but I think it would clean out various rough edges we have currently.

There should be a generic way to dynamically set parameters of grids.  Examples of such parameters are, e.g., different refinement strategies in AlbertaGrid, UGGrid, OnedGrid. Currently, these parameters are set using special-purpose methods (e.g. UGGrid::setRefinementType()) which are not part of the interface and are different for each grid.  As one negative consequence, the dgf parser has to have dedicated code for each grid implementation in order to handle these parameters.

I propose to introduce a generic interface for these parameters.  In the simplest form, the parameters would be a list of name-value pairs, stored as strings. 
There would then be new methods like
void setParameter(string name, string value);
string getParameter(string name);
or similar.  More fancy versions (if we decide that is necessary) could offer more than just string types for the values, or some sort of parameter hierarchy.

With such an interface it is much easier to load parameters in files into the grid types that expect them.  This concerns the dgfparser, but also other file formats that allow arbitrary parameters (e.g. AmiraMesh).
It may also help to unify the cases where the grid constructors need some grid specific parameters (memory size for UGGrid).

A second possible use may be that it allows grids to provide additional information about themself (similar to capabilities, but dynamically).  For example, we may decide that the recently deprecated name() method could reappear as a parameter set by the grid itself.  Or possibly a grid may be able to give its memory consumption, or ...

I'd be interested to hear your opinions on this.

More information can be found at the following URL:

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.

More information about the Dune mailing list