#1276 dune-grid-howto adaptivefinitevolume segfaults
Metadata
Property | Value |
---|---|
Reported by | Andreas Buhr (andreas@andreasbuhr.de) |
Reported at | Apr 8, 2013 08:46 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Oliver Sander (oliver.sander@tu-dresden.de) |
Last edited at | Sep 21, 2013 21:22 |
Closed by | Oliver Sander (oliver.sander@tu-dresden.de) |
Closed at | Sep 21, 2013 21:22 |
Closed in version | Unknown |
Resolution | Fixed |
Comment | Fixed in YaspGrid in b22d69da7e6931ede8799e9f629b51f0bc040509 |
Description
Hi there,
this is my very first bug report here, I hope you will find it useful.
Working through the dune-grid-howto, I had to realize that the example "adaptivefinitevolume" segfaults. To reproduce, just build the examples in dune-grid-howto and run "adaptivefinitevolume". I debugged it a little bit and from my understanding, the problem is the following: By default, the example uses the YaspGrid. It does local mesh refinement. Not very useful, but that's what it does. A Dune::LeafMultipleCodimMultipleGeomTypeMapper is used. After mesh adaption, mapper.update() is called, which should update the mapper to work on the adapted grid. But this does not work. And here is why:
The mapper internally holds an IndexSet which it assumes to be a LeafIndexSet, both before and after mesh adaption. However, in the trunk, the LeafIndexSet of the YaspGrid does not have this property. In the trunk, a LeafIndexSet of the YaspGrid is an IndexSet bound to a specific level of the grid, which just happens to be the maximum level at the creation time of the IndexSet. After mesh adaption, the LeafIndexSet is not any more a LeafIndexSet.
This behavior was introduced with revision 8650: http://svn.dune-project.org/websvn/log.php?repname=dune-grid&path=%2Ftrunk%2Fdune%2Fgrid%2Fyaspgrid%2Fyaspgridindexsets.hh&
In my opinion, there are two possible ways to fix it: Either an LeafIndexSet should still be a LeafIndexSet after mesh adaption. In that case, YaspGrid should be modified to have this property. Or the LeafIndexSet are invalidated during mesh adaption. In that case the MCMGmapper update() function should recreate the IndexSets used internally.
If I can help to fix this, just let me know, I'm happy to help. Cheers, Andreas