[Dune] Questions on Grid syntax

Christian Engwer christi at uni-hd.de
Mon Sep 6 15:12:51 CEST 2010


On Mon, Sep 06, 2010 at 02:56:32PM +0200, Aleksejs Fomins wrote:
> Dear Dune,
> 
> I have a problem with compiling. I will give you a shortened version
> of my program. I will send the whole file if required.
> I need a class that would store an Element Pointer that is passed to
> it as a parameter.
> 
> 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()’
> note: candidates are:
> Dune::EntityPointer<GridImp, EntityPointerImp>::EntityPointer(const
> IteratorImp&) [with GridImp = const Dune::ALU3dGrid<3, 3, tetra>,
> IteratorImp = Dune::ALU3dGridEntityPointer<0, const
> Dune::ALU3dGrid<3, 3, tetra> >]
> note:
> Dune::EntityPointer<GridImp, EntityPointerImp>::EntityPointer(const
> typename IteratorImp::Entity&) [with GridImp = const
> Dune::ALU3dGrid<3, 3, tetra>, IteratorImp =
> Dune::ALU3dGridEntityPointer<0, const Dune::ALU3dGrid<3, 3, tetra>
> >]
>
> Could you please suggest what is going wrong?

I'm not too much into the ALUGrid code. The error basically states
that there is no default constructor for the alugrid-entitypointer.
You must not use an empty constructor and then later the
assignment-operator, but use directly the copy-constructor.

> There is another quick one:
> There is a method outerNormal in the intersection iterator class. It
> depends on a local coordinate.
> Could you please give me an example when the normals would be
> different for different local coordinates?

a quatrilateral face in 3d with the coordinates (0,0,0), (0,0,1), (0,1,1)
and (0,1,0.1). Any non-planar intersection...

Christian




More information about the Dune mailing list