[Dune] geometry.hh

Christian Engwer christi at uni-hd.de
Wed Apr 6 14:42:01 CEST 2005


>   it is not clear to us, how to write e.g. the Albertagrid interface 
> with a protected copy constructor. That's why I made it public.
> On the other hand, why should it not be possible to copy a geometry?

That was the decision we made in the very beginning ... being able to
use pure virtual entities (for on the fly grids). This implies that we
must stick strictly to the container/view concept and can only store
Iterators. If the Entity is generated on the fly and can not be stored
the same applies for the Geometry.

You can achieve everything you want by subclassing the wrapper
(have a look at UGMakeableGeometry or YaspSpecialGeometry). The
,,SpecialGeometry'' can expose as much of the internats of the
realGeometry as you like and can be copied if you desire. But after
you return the ,,SpecialGeometry'' to the usercode it is sliced down to
a normal Geometry and can't be copied anymore.

Hope this made everything clear :-) 

CU Christian




More information about the Dune mailing list