<div dir="ltr"><div><div><div><div><div><div><div>Dear Dune<br><br></div>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.<br><br></div>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.<br><br>The source file looks as follows:<br><br>#ifdef HAVE_CONFIG_H<br># include "config.h"<br>#endif<br>#include <iostream><br>#include <dune/common/parallel/<wbr>mpihelper.hh> // An initializer of MPI<br>#include <dune/common/exceptions.hh> // We use exceptions<br><br>#include <dune/grid/uggrid.hh> /*************************/<br><br>int main(int argc, char** argv)<br>{<br> const int dim = 2; /*************************/<br> typedef Dune::UGGrid<dim> Grid; /*************************/<br> const int DIM = Grid::dimension; /*************************/<br><br><br> try{<br> // Maybe initialize MPI<br> Dune::MPIHelper& helper = Dune::MPIHelper::instance(<wbr>argc, argv);<br> std::cout << "Hello World! This is salam." << std::endl;<br> if(Dune::MPIHelper::isFake)<br> std::cout<< "This is a sequential program." << std::endl;<br> else<br> std::cout<<"I am rank "<<helper.rank()<<" of "<<helper.size()<br> <<" processes!"<<std::endl;<br> return 0;<br> }<br> catch (Dune::Exception &e){<br> std::cerr << "Dune reported error: " << e << std::endl;<br> }<br> catch (...){<br> std::cerr << "Unknown exception thrown!" << std::endl;<br> }<br>}<br><br></div>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:<br><br>/afs/<a href="http://desy.de/user/a/afallahi/workspace/salam/src/salam.cc" target="_blank">desy.de/user/a/afallahi/<wbr>workspace/salam/src/salam.cc</a>: In function ‘int main(int, char**)’:<br>/afs/<a href="http://desy.de/user/a/afallahi/workspace/salam/src/salam.cc:17:17" target="_blank">desy.de/user/a/afallahi/<wbr>workspace/salam/src/salam.cc:<wbr>17:17</a>: error: ‘UGGrid’ in namespace ‘Dune’ does not name a template type<br> typedef Dune::UGGrid<dim> Grid;<br> ^~~~~~<br>/afs/<a href="http://desy.de/user/a/afallahi/workspace/salam/src/salam.cc:18:19" target="_blank">desy.de/user/a/afallahi/<wbr>workspace/salam/src/salam.cc:<wbr>18:19</a>: error: ‘Grid’ has not been declared<br> const int DIM = Grid::dimension;<br> ^~~~<br>gmake[2]: *** [src/CMakeFiles/salam.dir/<wbr>salam.cc.o] Error 1<br>gmake[1]: *** [src/CMakeFiles/salam.dir/all] Error 2<br>gmake: *** [all] Error 2<br><br></div>The CMAKELists files are not touched and stay the same as the ones created by duneproject.<br><br></div>Can you guess what I am doing wrong?<br><br></div>Best regards,<br></div>Arya<br></div>