[Dune] [Dune-Commit] dune-localfunctions r943 - trunk/dune/localfunctions/test
Jö Fahlke
jorrit at jorrit.de
Sun Jan 2 16:11:09 CET 2011
Am Sun, 2. Jan 2011, 11:58:15 +0100 schrieb Martin Nolte:
> If we decide in favor of such a change (which will have to be voted on), we will
> be forced to make the template argument GeometryImp a non-template. Otherwise,
> the implementer cannot pass additional, grid-specific information to the
> geometry implementation. The new declaration would look as follows:
>
> template< int mydim, int cdim, class ctype, class GeometryImp >
> class Geometry;
I don't see why mydim, cdim, and ctype are needed as seperate template
arguments; they must be known by GeometryImp anyway. Why not just use
template<class GeometryImp> class Geometry;
> Since we decided to move such geometry-specific stuff into a new module,
> dune-geometry, a positive side effect is that the interface class Geometry could
> then reside in dune-geometry instead of dune-grid. Of course, the latter change
> will happen after the 2.0 release.
>
> What are the opinions of the other developers?
I don't really like the idea of wrapping some implementation just to enforce a
particular interface. The presence of certain functionality can be ensured by
unit tests, and those can actually check that approximately the right thing
happens. The absence of additional functionality is not insured, since poeple
will just use getRealImp(); is just makes the life of poeple who actually
need[1] additional functionality harder. The interface documentation is
probably better done in a class GeometryInterface that exists just for
documentation purposes.
So, in summary, I don't really see why we need Dune::Geometry in it's current
form at all.
[1] And yes, "need" is not well-defined and tends to be subjective.
Happy new year,
Jö.
--
<ex-bart> beleidige cernlib
-:- SignOff Volk1: #macht (EOF From client)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110102/e3e27126/attachment.sig>
More information about the Dune
mailing list