[Dune] Questions on Grid syntax

Markus Blatt Markus.Blatt at iwr.uni-heidelberg.de
Mon Sep 6 15:12:45 CEST 2010

Hi Aleksejs,

On Mon, Sep 06, 2010 at 02:56:32PM +0200, Aleksejs Fomins wrote:

> So first I typedef EntityPointerElement:
> typedef typename Grid::template
> Codim<Grid::dimension-3>::EntityPointer EntityPointerElement;
> Then I write my class
> class fictitiousBoundaryFace
> {
> public:
> EntityPointerElement elemP;
> fictitiousBoundaryFace(EntityPointerElement elemP_,) { elemP = elemP_; }
> };
> When I compile the program, I get an error like
> error: no matching function for call to
> ‘Dune::EntityPointer<const Dune::ALU3dGrid<3, 3, tetra>,
> Dune::ALU3dGridEntityPointer<0, const Dune::ALU3dGrid<3, 3, tetra> >
> >::EntityPointer()’

Entity pointer does not have a default constructor. It should be
possible to get rid of this error by initialization during the comstruction:

 fictitiousBoundaryFace(EntityPointerElement elemP_)
 : elemP(elemP_){}

Now this variable is initialized by the copy constructor. Before it was
first initialized by the default constructor and then assigned a new

BTW this is more of a C++ question than a DUNE question.



Markus Blatt, Interdisciplinary Center for Scientific Computing,
University Heidelberg, Im Neuenheimer Feld 368, D-69120 Heidelberg

'Mathematics knows no races or geographic boundaries; for
mathematics, the cultural world is one country' - David Hilbert

More information about the Dune mailing list