[Dune] Vector of IntersectionIterators

Dragan Vidovic vitkecar at gmail.com
Tue Mar 16 15:53:53 CET 2010


Hi all

I'm developing some very experimental finite volume methods and I
really need to store some kind of references to some faces, like
boundary faces or those where some physical parameters are
discontinuous, and use references these later to get areas, normals,
or to access neighbouring cells, without looping trough all cells
every time. Since mappers can only map from an IntersectionIterator to
an integer index and not the other way around, the only solution that
I found after allot of experimenting was to use a std::vector of
IntersectionIterators. Since an empty constructor for
IntersectionIterator is not allowed, I initialize it as

std::vector<IntersectionIterator> ismap (nfaces,
gridView.ibegin(*gridView.template begin<0>()));

and change it's elements later. There are two problems here:

1) This takes a hell of a space. I divided the increase in memory that
the process takes by the number of faces, and I found out that each
IntersectionIterator takes about 1k!

2) When this vector goes out of scope, this space is not recycled.

I'm using the newest ALUgrid, and Dune not older than two weeks.

Does anyone have some idea how to overcome these problems?

Best regards,

Dragan




More information about the Dune mailing list