[Dune] [#957] Remove grid dimension from BasicGeometry

Dune flyspray at dune-project.org
Sun Oct 2 20:06:42 CEST 2011


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#957 - Remove grid dimension from BasicGeometry
User who did this - Martin Nolte (nolte)

----------
I had another look at the code. It seems some things need to be clarified. The BasicGeometry is the common base class of Geometry and LocalGeometry. These have a fixed list of template arguments (hardcoded in dune/common/geometry.hh -- don't ask why) and we need a way to extract the necessary information. This is done through a Trais class (GlobalGeometryTraits / LocalGeometryTraits). This traits class is passed to the BasicGeometry so that it has all the necessary information.
The traits class now has to provide a mapping (subtemlate Mapping< Topology >) for _each_ codimension (or dimension if you like that better) and in the black magic required to extract this Topology type, the grid dimension comes into play.

This is also the reason why GeometryGrid will not compile after your patch (I wonder actually, why UG should; I thought it also uses the GenericGeometries). It is only allowed to provide one traits class, not one for each codimension (or mydimension).

I think what you want to do is something different. You want a new base class of BasicGeometry that filters out the black magic required to hardcode the template arguments and let BasicGeometry simply define its list of template arguments (or a traits class). That could, of course, work. However, I fail to see the gain.

But let me emphasize once more that the root of this problem resides within the hardcoded template arguments of the class Dune::Geometry which in my opinion is the mother of all Geometry implementations -- and BasicGeometry, as the name says, is a Geometry implementation.

PS: Just a historic side node -- the term mapping was only introduced to overcome the strong binding of the word geometry with the grid. Actually, the mapping is what the geometry should be.
----------

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=957#comment2708

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