[Dune] gmsh mesh loading using dune-uggrid

Stary, Tomas T.Stary at exeter.ac.uk
Tue Apr 25 11:22:08 CEST 2017


Hi,

Thanks, the updating of the dune-grit repository has been helpful.  I
have been able to compile the code including the required header
files.

I am now trying to initialise the uggrid with the following code:

      typedef Dune::UGGrid<dim> GRID;
      GRID grid;

During the compilation I get a linking error:

CMakeFiles/dune-poroelastic.dir/dune-poroelastic.cc.o: In function `main':
/home/tom/Work/dune/dune-poroelastic/src/dune-poroelastic.cc:34: undefined reference to `Dune::UGGrid<3>::UGGrid()'
/home/tom/Work/dune/dune-poroelastic/src/dune-poroelastic.cc:34: undefined reference to `Dune::UGGrid<3>::~UGGrid()'
collect2: error: ld returned 1 exit status

Is there any other way of initialising the UGGrid?

Thank you,

Tomas

On Mon, Apr 24, 2017 at 11:09:48AM +0100, Stary, Tomas wrote:
> Hi,
> 
> I would like to load a mesh created in gmsh program into dune using
> dune-uggrid module. For that I have created a new project dependent on
> dune-uggrid and included required header files to the project:
> 
> #include <dune/grid/uggrid.hh>
> #include <dune/grid/common/gridfactory.hh>
> #include <dune/grid/common/gridinfo.hh>
> 
> When I try to compile the code I get the following error:
> 
> /home/tom/Work/dune/dune-grid/dune/grid/uggrid/ugwrapper.hh: In static member function 'static UG::DOUBLE Dune::UG_NS<2>::SurfaceElement(int, const DOUBLE (*)[2], const DOUBLE*)':
> /home/tom/Work/dune/dune-grid/dune/grid/uggrid/ugwrapper.hh:876:11: error: 'SurfaceElement' is not a member of 'UG::D2'
>        if (UG_NAMESPACE ::SurfaceElement(UG_DIM, nc, co_global, ip_local, &result))
> 
> I am using a Linux machine, the same configuration works fine with a
> different version of uggrid on Mac.
> 
> Do you have any suggestions on how to get over this issue, please?
> 
> Many thanks,
> 
> Tomas




More information about the Dune mailing list