// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:

#include <config.h>           // file generated by CMake
#include <array>
#include <memory>
#include <dune/common/parallel/mpihelper.hh> // include mpi helper class
#include <dune/grid/yaspgrid.hh> // load Yasp grid definition
#include <dune/grid/common/gridinfo.hh> // definition of gridinfo /*@\label{gs:inc1}@*/
#include <dune/grid/io/file/vtk/vtkwriter.hh>
int main(int argc, char **argv)
{
  // initialize MPI, finalize is done automatically on exit
  Dune::MPIHelper::instance(argc,argv);

  // start try/catch block to get error messages from dune
  try{
    // make a grid
    const int dim=3;                                     /*@\label{gs:dim}@*/
    typedef Dune::YaspGrid<dim> GridType;                /*@\label{gs:gridtype}@*/
    Dune::FieldVector<double,dim> length(1.0);           /*@\label{gs:par0}@*/
    std::array<int,dim> elements;
    std::fill(elements.begin(), elements.end(), 4);      /*@\label{gs:par1}@*/
    GridType grid(length,elements);                      /*@\label{gs:grid}@*/

    // print some information about the grid
    Dune::gridinfo(grid);
    typedef  GridType::LeafGridView GridView;
    GridView gridView = grid.leafGridView();

    Dune::VTKWriter<GridView> vtkWriter(gridView);
    vtkWriter.write("Grid");

  }
  catch (std::exception & e) {
    std::cout << "ERROR: " << e.what() << std::endl;
    return 1;
  }
  catch (...) {
    std::cout << "Unknown ERROR" << std::endl;
    return 1;
  }

  // done
  return 0;
}



[ 50%] Linking CXX executable dp
CMakeFiles/dp.dir/dp.cc.o: In function `Dune::Geo::ReferenceElementImplementation<double, 3>::initialize(unsigned int)':
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi3EE10initializeEj[_ZN4Dune3Geo30ReferenceElementImplementationIdLi3EE10initializeEj]+0x5d): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `Dune::Geo::ReferenceElementImplementation<double, 3>::SubEntityInfo::initialize(unsigned int, int, unsigned int)':
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi3EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi3EE13SubEntityInfo10initializeEjij]+0x29): undefined reference to `Dune::Geo::Impl::subTopologyId(unsigned int, int, int, unsigned int)'
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi3EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi3EE13SubEntityInfo10initializeEjij]+0xcf): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi3EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi3EE13SubEntityInfo10initializeEjij]+0x1b0): undefined reference to `Dune::Geo::Impl::subTopologyNumbering(unsigned int, int, int, unsigned int, int, unsigned int*, unsigned int*)'
CMakeFiles/dp.dir/dp.cc.o: In function `unsigned int Dune::Geo::Impl::referenceCorners<double, 3>(unsigned int, int, Dune::FieldVector<double, 3>*)':
dp.cc:(.text._ZN4Dune3Geo4Impl16referenceCornersIdLi3EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl16referenceCornersIdLi3EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0xd0): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `double Dune::Geo::Impl::referenceVolume<double>(unsigned int, int)':
dp.cc:(.text._ZN4Dune3Geo4Impl15referenceVolumeIdEET_ji[_ZN4Dune3Geo4Impl15referenceVolumeIdEET_ji]+0x19): undefined reference to `Dune::Geo::Impl::referenceVolumeInverse(unsigned int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `unsigned int Dune::Geo::Impl::referenceIntegrationOuterNormals<double, 3>(unsigned int, int, Dune::FieldVector<double, 3>*)':
dp.cc:(.text._ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi3EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi3EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0x52): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
dp.cc:(.text._ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi3EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi3EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0xef): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `Dune::Geo::ReferenceElementImplementation<double, 2>::initialize(unsigned int)':
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi2EE10initializeEj[_ZN4Dune3Geo30ReferenceElementImplementationIdLi2EE10initializeEj]+0x5d): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `Dune::Geo::ReferenceElementImplementation<double, 1>::initialize(unsigned int)':
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi1EE10initializeEj[_ZN4Dune3Geo30ReferenceElementImplementationIdLi1EE10initializeEj]+0x5d): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `Dune::Geo::ReferenceElementImplementation<double, 0>::initialize(unsigned int)':
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi0EE10initializeEj[_ZN4Dune3Geo30ReferenceElementImplementationIdLi0EE10initializeEj]+0x5d): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `Dune::Geo::ReferenceElementImplementation<double, 2>::SubEntityInfo::initialize(unsigned int, int, unsigned int)':
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi2EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi2EE13SubEntityInfo10initializeEjij]+0x29): undefined reference to `Dune::Geo::Impl::subTopologyId(unsigned int, int, int, unsigned int)'
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi2EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi2EE13SubEntityInfo10initializeEjij]+0xcf): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi2EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi2EE13SubEntityInfo10initializeEjij]+0x1b0): undefined reference to `Dune::Geo::Impl::subTopologyNumbering(unsigned int, int, int, unsigned int, int, unsigned int*, unsigned int*)'
CMakeFiles/dp.dir/dp.cc.o: In function `unsigned int Dune::Geo::Impl::referenceCorners<double, 2>(unsigned int, int, Dune::FieldVector<double, 2>*)':
dp.cc:(.text._ZN4Dune3Geo4Impl16referenceCornersIdLi2EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl16referenceCornersIdLi2EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0xd0): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `unsigned int Dune::Geo::Impl::referenceIntegrationOuterNormals<double, 2>(unsigned int, int, Dune::FieldVector<double, 2>*)':
dp.cc:(.text._ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi2EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi2EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0x52): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
dp.cc:(.text._ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi2EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi2EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0xe9): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `Dune::Geo::ReferenceElementImplementation<double, 1>::SubEntityInfo::initialize(unsigned int, int, unsigned int)':
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi1EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi1EE13SubEntityInfo10initializeEjij]+0x29): undefined reference to `Dune::Geo::Impl::subTopologyId(unsigned int, int, int, unsigned int)'
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi1EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi1EE13SubEntityInfo10initializeEjij]+0xcf): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi1EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi1EE13SubEntityInfo10initializeEjij]+0x1b0): undefined reference to `Dune::Geo::Impl::subTopologyNumbering(unsigned int, int, int, unsigned int, int, unsigned int*, unsigned int*)'
CMakeFiles/dp.dir/dp.cc.o: In function `unsigned int Dune::Geo::Impl::referenceCorners<double, 1>(unsigned int, int, Dune::FieldVector<double, 1>*)':
dp.cc:(.text._ZN4Dune3Geo4Impl16referenceCornersIdLi1EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl16referenceCornersIdLi1EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0xd0): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `unsigned int Dune::Geo::Impl::referenceIntegrationOuterNormals<double, 1>(unsigned int, int, Dune::FieldVector<double, 1>*)':
dp.cc:(.text._ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi1EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi1EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0x52): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
dp.cc:(.text._ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi1EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl32referenceIntegrationOuterNormalsIdLi1EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0xea): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
CMakeFiles/dp.dir/dp.cc.o: In function `Dune::Geo::ReferenceElementImplementation<double, 0>::SubEntityInfo::initialize(unsigned int, int, unsigned int)':
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi0EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi0EE13SubEntityInfo10initializeEjij]+0x29): undefined reference to `Dune::Geo::Impl::subTopologyId(unsigned int, int, int, unsigned int)'
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi0EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi0EE13SubEntityInfo10initializeEjij]+0xc9): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
dp.cc:(.text._ZN4Dune3Geo30ReferenceElementImplementationIdLi0EE13SubEntityInfo10initializeEjij[_ZN4Dune3Geo30ReferenceElementImplementationIdLi0EE13SubEntityInfo10initializeEjij]+0x1aa): undefined reference to `Dune::Geo::Impl::subTopologyNumbering(unsigned int, int, int, unsigned int, int, unsigned int*, unsigned int*)'
CMakeFiles/dp.dir/dp.cc.o: In function `unsigned int Dune::Geo::Impl::referenceCorners<double, 0>(unsigned int, int, Dune::FieldVector<double, 0>*)':
dp.cc:(.text._ZN4Dune3Geo4Impl16referenceCornersIdLi0EEEjjiPNS_11FieldVectorIT_XT0_EEE[_ZN4Dune3Geo4Impl16referenceCornersIdLi0EEEjjiPNS_11FieldVectorIT_XT0_EEE]+0xd0): undefined reference to `Dune::Geo::Impl::size(unsigned int, int, int)'
collect2: error: ld returned 1 exit status
src/CMakeFiles/dp.dir/build.make:107: recipe for target 'src/dp' failed
make[2]: *** [src/dp] Error 1
CMakeFiles/Makefile2:1397: recipe for target 'src/CMakeFiles/dp.dir/all' failed
make[1]: *** [src/CMakeFiles/dp.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
