[Dune] Error in one of ALUGrid's assertions

Christoph GrĂ¼ninger christoph.grueninger at iws.uni-stuttgart.de
Mon Oct 22 12:04:29 CEST 2012


Hi Dune,
I stumbled over an bug in dune's ALUGrid classes. I switched one of my 
applications from using UG to ALUGrid and it terminated with an 
assertion (find the complete backtrace below):

> [..]/dune-grid/dune/grid/alugrid/2d/entity_imp.cc:508:
 > int Dune::ALU2dGridEntityPointer<cd, GridImp>::level() const
 > [with int codim = 0; GridImp = const Dune::ALU2dGrid<2, 2, 
(ALU2DGrid::ElementType)1u>]:
 > Assertion `seed_.level() >= 0' failed.

I asked Steffen and he told me, that the documentation states
"(level == -1 means leaf level)"
in line 156 of dune/grid/common/alugrid/defaultindexset.hh

So -1 would be a valid level and the assertion should check for
`seed_.level() >= -1',
right?

Ciao
Christoph


Backtrace:
> #0  Dune::ALU2dGridEntityPointer<0, Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1> const>::level (this=0x7fffffffc5e0)
>     at /temp/gruenich/dune/complete/dune-grid/dune/grid/alugrid/2d/entity_imp.cc:508
> #1  0x0000000000471c4a in Dune::ALU2dGridEntityPointer<0, Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1> const>::dereference (this=0x7fffffffc5e0)
>     at /temp/gruenich/dune/complete/dune-grid/dune/grid/alugrid/2d/entity_imp.cc:497
> #2  0x0000000000488a7c in Dune::EntityPointer<Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1> const, Dune::ALU2dGridLeafIterator<0, (Dune::PartitionIteratorType)4, Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1> const> >::operator-> (this=0x7fffffffc5e0)
>     at /temp/gruenich/dune/complete/dune-grid/dune/grid/common/entitypointer.hh:192
> #3  0x0000000000473499 in Dune::DefaultIndexSet<Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1>, Dune::EntityIterator<0, Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1> const, Dune::ALU2dGridLeafIterator<0, (Dune::PartitionIteratorType)4, Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1> const> > >::calcNewIndex (this=0xe50740, begin=..., end=...) at /temp/gruenich/dune/complete/dune-grid/dune/grid/alugrid/common/defaultindexsets.hh:272
> #4  0x00000000004e7d2d in Dune::DefaultIndexSet<Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1>, Dune::EntityIterator<0, Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1> const, Dune::ALU2dGridLeafIterator<0, (Dune::PartitionIteratorType)4, Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1> const> > >::DefaultIndexSet (this=0xe50740, grid=..., begin=..., end=..., level=-1)
>     at /temp/gruenich/dune/complete/dune-grid/dune/grid/alugrid/common/defaultindexsets.hh:169
> #5  0x00000000004c344b in Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1>::leafIndexSet (this=0xe79330)
>     at /temp/gruenich/dune/complete/dune-grid/dune/grid/alugrid/2d/grid_imp.cc:654
> #6  0x00000000004a77f0 in Dune::DefaultLeafGridView<Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1, (Dune::ALUGridRefinementType)1, Dune::No_Comm> const, (Dune::PartitionIteratorType)4>::indexSet (this=0xe4fca8) at /temp/gruenich/dune/complete/dune-grid/dune/grid/common/defaultgridview.hh:329
> #7  0x000000000048bab4 in Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1, (Dune::ALUGridRefinementType)1, Dune::No_Comm> const, (Dune::PartitionIteratorType)4> >::indexSet (this=0xe4fca8)
>     at /temp/gruenich/dune/complete/dune-grid/dune/grid/common/gridview.hh:150
> #8  0x0000000000475652 in Dune::mdgrid::IndexSetWrapper<Dune::mdgrid::MultiDomainGrid<Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1, (Dune::ALUGridRefinementType)1, Dune::No_Comm>, Dune::mdgrid::FewSubDomainsTraits<2, 4ul, Dune::mdgrid::AllCodims> > const, Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1, (Dune::ALUGridRefinementType)1, Dune::No_Comm> const, (Dune::PartitionIteratorType)4> > >::reset
>     (this=0xe4fca0, full=true) at /temp/gruenich/dune/complete/dune-multidomaingrid/dune/grid/multidomaingrid/indexsets.hh:739
> #9  0x0000000000473a9f in Dune::mdgrid::MultiDomainGrid<Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1, (Dune::ALUGridRefinementType)1, Dune::No_Comm>, Dune::mdgrid::FewSubDomainsTraits<2, 4ul, Dune::mdgrid::AllCodims> >::updateIndexSets (this=0xe4fc80)
>     at /temp/gruenich/dune/complete/dune-multidomaingrid/dune/grid/multidomaingrid/multidomaingrid.hh:944
> #10 0x0000000000462ba2 in Dune::mdgrid::MultiDomainGrid<Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1, (Dune::ALUGridRefinementType)1, Dune::No_Comm>, Dune::mdgrid::FewSubDomainsTraits<2, 4ul, Dune::mdgrid::AllCodims> >::MultiDomainGrid (this=0xe4fc80, hostGrid=..., supportLevelIndexSets=true)
>     at /temp/gruenich/dune/complete/dune-multidomaingrid/dune/grid/multidomaingrid/multidomaingrid.hh:414
> #11 0x0000000000455699 in Dumux::MultiDomainBoxProblem<Dumux::Properties::TTag::TwoCStokesTwoPTwoCProblem>::MultiDomainBoxProblem (
>     this=0x7fffffffce90, hostGrid=..., timeManager=...) at ../../../dumux/modelcoupling/common/multidomainboxproblem.hh:98
> #12 0x000000000044dce2 in Dumux::TwoCStokesTwoPTwoCProblem<Dumux::Properties::TTag::TwoCStokesTwoPTwoCProblem>::TwoCStokesTwoPTwoCProblem (
>     this=0x7fffffffce90, hostGrid=..., timeManager=...) at 2cstokes2p2cproblem.hh:237
> #13 0x00000000004475dd in start_<Dumux::Properties::TTag::TwoCStokesTwoPTwoCProblem> (argc=1, argv=0x7fffffffd798) at test_2cstokes2p2c.cc:178
> #14 0x0000000000440210 in start<Dumux::Properties::TTag::TwoCStokesTwoPTwoCProblem> (argc=1, argv=0x7fffffffd798) at test_2cstokes2p2c.cc:217
> #15 0x0000000000408b13 in main (argc=1, argv=0x7fffffffd798) at test_2cstokes2p2c.cc:238





More information about the Dune mailing list