[Dune] EntityPointer finished

Christian Engwer christi at uni-hd.de
Thu Mar 24 18:54:16 CET 2005


Oh sorry... I told you complete nonsense :-)

> > I guess this will work after you implement a copy constructor for
> > SIntersectionIterator and SBoundaryEntity.
> 
> OK... I tried this and it show you need
>  SIntersectionIterator::SIntersectionIterator(const SIntersectionIterator &)
>  SIntersectionIterator::operator=(const SIntersectionIterator &)
>  and 
>  SBoundaryEntity::SBoundaryEntity(const SBoundaryEntity &)
> 
> because SBoundaryEntity keeps a Geometry and tries to copy this.

The reason is true, but you wouldn't need 
 SBoundaryEntity::SBoundaryEntity(const SBoundaryEntity &)
and you can make it even easier...
all you need a an assignment operator for SBoundaryEntity. The problem
arises when you try to copy an IntersectionIterator. The
IntersectionIterator has a BoundaryEntity as member variable and tries
to copy it. This fails, because the default assignment operator tries
to copy the Geometry and this is prohibited. Copying the Geometry is
completely useless, as the BoundaryEntity always has the same
Geometry. If you need to update this Geometry one day you have to use
a MakeableGeometry.

OK... hope everything is clear... Christian




More information about the Dune mailing list