<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    I would need some more explanation about the use of <br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-15">
    <small><i>virtual void insertElement (const GeometryType &type,
        const std::vector< unsigned int > &vertices, const
        shared_ptr< VirtualFunction< FieldVector< ctype,
        dimension >, FieldVector< ctype, dimworld > > >
        &elementParametrization)<br>
      </i></small>with ALUCubeGrid.<br>
    <br>
    I call it like this<br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-15">
    <small><i>factory.insertElement(
        Dune::GeometryType(Dune::GeometryType::cube,dim),
        cubeVertices,Dune::shared_ptr<VirtualFunction<FieldVector<ctype,dim>,
        FieldVector<ctype,dim> > >(new
        myParametrization<FieldVector<ctype,dim>,
        FieldVector<ctype,dim> >() ) );<br>
      </i></small>and myParametrization is simply:<br>
    <small><i>#include <dune/common/function.hh><br>
        template<class DomainType, class RangeType><br>
        class myParametrization : public Dune::VirtualFunction<const
        DomainType&, RangeType&><br>
        {<br>
        public:<br>
          myParametrization() {};<br>
          void evaluate(const DomainType& x, RangeType& y) const<br>
          {<br>
            y=x;<br>
          }<br>
        };</i></small><br>
    but the g++ compiler answer me:<br>
    <small><i>In file included from ./gridtools.cc:10,<br>
                         from dune_foo.cc:11:<br>
        ./starcdreader.hh: In static member function ‘static GridType*
        Dune::StarCDReader<GridType>::read(const std::string&,
        const Dune::MPIHelper&, bool) [with GridType =
        Dune::ALUCubeGrid<3, 3>]’:<br>
        ./gridtools.cc:30:   instantiated from ‘GridType* readGrid(const
        std::string&, Dune::MPIHelper&) [with GridType =
        Dune::ALUCubeGrid<3, 3>]’<br>
        dune_foo.cc:47:   instantiated from here<br>
        ./starcdreader.hh:170: error: no matching function for call to
        ‘Dune::GridFactory<Dune::ALUCubeGrid<3, 3>
        >::insertElement(Dune::GeometryType, std::vector<unsigned
        int, std::allocator<unsigned int> >&,
        std::shared_ptr<Dune::VirtualFunction<Dune::FieldVector<double,
        3>, Dune::FieldVector<double, 3> > >)’<br>
        /home/marco/workspace/ThalesAlenia/lib/dune/2.1.1/dune-grid-2.1.1/dune/grid/alugrid/3d/alu3dgridfactory.hh:142:
        note: candidates are: void Dune::ALU3dGridFactory<
        <template-parameter-1-1> >::insertElement(const
        Dune::GeometryType&, const std::vector<unsigned int,
        std::allocator<unsigned int> >&) [with ALUGrid =
        Dune::ALUCubeGrid<3, 3>]<br>
        In file included from /usr/include/c++/4.4/memory:83,<br>
                         from
/home/marco/workspace/ThalesAlenia/lib/dune/2.1.1/dune-common-2.1.1/dune/common/shared_ptr.hh:8,<br>
                         from
/home/marco/workspace/ThalesAlenia/lib/dune/2.1.1/dune-common-2.1.1/dune/common/mpicollectivecommunication.hh:19,<br>
                         from
/home/marco/workspace/ThalesAlenia/lib/dune/2.1.1/dune-common-2.1.1/dune/common/mpihelper.hh:9,<br>
                         from dune_foo.cc:7:<br>
        /usr/include/c++/4.4/bits/shared_ptr.h: In constructor
        ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Tp1*) [with
        _Tp1 = myParametrization<Dune::FieldVector<double, 3>,
        Dune::FieldVector<double, 3> >, _Tp =
        Dune::VirtualFunction<Dune::FieldVector<double, 3>,
        Dune::FieldVector<double, 3> >, __gnu_cxx::_Lock_policy
        _Lp = (__gnu_cxx::_Lock_policy)2u]’:<br>
        /usr/include/c++/4.4/bits/shared_ptr.h:1244:   instantiated from
        ‘std::shared_ptr<_Tp>::shared_ptr(_Tp1*) [with _Tp1 =
        myParametrization<Dune::FieldVector<double, 3>,
        Dune::FieldVector<double, 3> >, _Tp =
        Dune::VirtualFunction<Dune::FieldVector<double, 3>,
        Dune::FieldVector<double, 3> >]’<br>
        ./starcdreader.hh:170:   instantiated from ‘static GridType*
        Dune::StarCDReader<GridType>::read(const std::string&,
        const Dune::MPIHelper&, bool) [with GridType =
        Dune::ALUCubeGrid<3, 3>]’<br>
        ./gridtools.cc:30:   instantiated from ‘GridType* readGrid(const
        std::string&, Dune::MPIHelper&) [with GridType =
        Dune::ALUCubeGrid<3, 3>]’<br>
        dune_foo.cc:47:   instantiated from here<br>
        /usr/include/c++/4.4/bits/shared_ptr.h:568: error: cannot
        convert ‘myParametrization<Dune::FieldVector<double,
        3>, Dune::FieldVector<double, 3> >*’ to
        ‘Dune::VirtualFunction<Dune::FieldVector<double, 3>,
        Dune::FieldVector<double, 3> >*’ in initialization<br>
        make[1]: *** [dune_foo-dune_foo.o] Errore 1<br>
        make[1]: uscita dalla directory
        "/home/marco/workspace/ThalesAlenia/lib/dune/2.1.1/dune-foo/src"<br>
        make: *** [all-recursive] Errore 1<br>
      </i></small>What am I doing wrongly??<br>
    Does ALUCubeGrid supports parametrized elements?? And if not, why?
    Is there the chance to have this kind of support in ALUCubeGrid?<br>
    Shall I use something else in order to have curvilinear parametric
    elements in my grid with Dune??<br>
    Thanks a lot.<br>
    <br>
    Cheers,<br>
    Marco<br>
    <br>
    PS: I will not say anything about yesterday... 'cause I really need
    your help. :)<br>
    <br>
  </body>
</html>