[Dune] problem with updating dune

Oliver Sander oliver.sander at tu-dresden.de
Mon Feb 5 20:17:57 CET 2018


Hi,

nowadays, if you want to use UGGrid you have to have dune-uggrid installed.

--
Oliver

On 05.02.2018 20:06, Arya Fallahi wrote:
> Dear Dune
> 
> I am currently trying to update my dune version to the latest release. But, I am stocked with a problem whose solution I can not figure out.
> 
> I just installed dune-common, dune-grid, dune-geometry, and dune-alugrid. Then I defined a new project. Everything works fine as long as I do not change anything. But, when I just add some new lines copy and pasted from the Dune Guide. I get error messages.
> 
> The source file looks as follows:
> 
> #ifdef HAVE_CONFIG_H
> # include "config.h"
> #endif
> #include <iostream>
> #include <dune/common/parallel/mpihelper.hh> // An initializer of MPI
> #include <dune/common/exceptions.hh> // We use exceptions
> 
> #include <dune/grid/uggrid.hh> /*************************/
> 
> int main(int argc, char** argv)
> {
>   const int dim = 2; /*************************/
>   typedef Dune::UGGrid<dim> Grid; /*************************/
>   const int DIM = Grid::dimension; /*************************/
> 
> 
>   try{
>     // Maybe initialize MPI
>     Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv);
>     std::cout << "Hello World! This is salam." << std::endl;
>     if(Dune::MPIHelper::isFake)
>       std::cout<< "This is a sequential program." << std::endl;
>     else
>       std::cout<<"I am rank "<<helper.rank()<<" of "<<helper.size()
>         <<" processes!"<<std::endl;
>     return 0;
>   }
>   catch (Dune::Exception &e){
>     std::cerr << "Dune reported error: " << e << std::endl;
>   }
>   catch (...){
>     std::cerr << "Unknown exception thrown!" << std::endl;
>   }
> }
> 
> The lines with stars in front are the ones I add to the initial file. However when I compile this file I get the following error message:
> 
> /afs/desy.de/user/a/afallahi/workspace/salam/src/salam.cc <http://desy.de/user/a/afallahi/workspace/salam/src/salam.cc>: In function ‘int main(int, char**)’:
> /afs/desy.de/user/a/afallahi/workspace/salam/src/salam.cc:17:17 <http://desy.de/user/a/afallahi/workspace/salam/src/salam.cc:17:17>: error: ‘UGGrid’ in namespace ‘Dune’ does not name a template type
>    typedef Dune::UGGrid<dim> Grid;
>                  ^~~~~~
> /afs/desy.de/user/a/afallahi/workspace/salam/src/salam.cc:18:19 <http://desy.de/user/a/afallahi/workspace/salam/src/salam.cc:18:19>: error: ‘Grid’ has not been declared
>    const int DIM = Grid::dimension;
>                    ^~~~
> gmake[2]: *** [src/CMakeFiles/salam.dir/salam.cc.o] Error 1
> gmake[1]: *** [src/CMakeFiles/salam.dir/all] Error 2
> gmake: *** [all] Error 2
> 
> The CMAKELists files are not touched and stay the same as the ones created by duneproject.
> 
> Can you guess what I am doing wrong?
> 
> Best regards,
> Arya
> 
> 
> _______________________________________________
> Dune mailing list
> Dune at lists.dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5158 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20180205/08e2c72a/attachment.bin>


More information about the Dune mailing list