[Dune] UG grid - limit on grid size?

Eike Mueller E.Mueller at bath.ac.uk
Wed Oct 5 14:23:33 CEST 2011


Dear Dune-list,

I've used the UG grid factory to construct a UG grid on spherical shell 
like this [1], basically following the instructions in [2]. It all works 
fine, but fails (or rather hangs) once my grid reaches a certain size (I 
found that if the number of elements is 25x25x25x6 = 93750 it's ok, but 
for 26x26x26x6 = 105456 it fails). The number of nodes is about the same 
as the number of elements. I do not get a runtime error message, but it 
just hangs in

   uggrid = new Dune::UGGrid<3>;
   uggrid = factory.createGrid();

Now, I might be getting the memory allocation wrong (I've tried passing 
a larger heapsize to to Dune::UGGrid<3> constructor), but I also saw 
this discussion here [3] saying that there are limits on the size of the 
UG grid that can be constructed (I do not compile with -DNDEBUG and this 
is a serial run and from how I understand it the limit should be 2^32 
elements in serial runs?).

Basically, I've got a class called Cubedsphere, which has the private 
data field

   Dune::GridFactory<Dune::UGGrid<3>> factory;
   Dune::UGGrid<3>* uggrid;

In the constructor I generate my grid vertices (I know the exact 
expressions for the positions, so don't need to read them from file) by 
first calling

   factory.insertVertex(vertex);

for all vertices and storing their ids and positions (both as unsigned 
ints) in a lookup table and then generating the elements from the 
entries in the lookup table with

   factory.insertElement(cube,vertices);

When all this is done I call

   uggrid = new Dune::UGGrid<3>;
   uggrid = factory.createGrid();

in the constructor and the class also has a method

  Dune::UGGrid<3>* getUGGrid() { return uggrid; };

for returning a reference to the uggrid pointer.



Thank you very much for any help,

Eike



[1] http://people.bath.ac.uk/em459/dune.html
[2] 
http://www.dune-project.org/doc/doxygen/html/classDune_1_1GridFactory_3_01UGGrid_3_01dimworld_01_4_01_4.html
[3] 
http://www.dune-project.org/flyspray/index.php?do=details&task_id=250#comment2700




More information about the Dune mailing list