Skip to content

#624 [Dune] Gmsh reader crashes when using the grid factory read for ALUSimpleGRid<3, 3> with boundary id

Metadata

Property Value
Reported by Benedikt Oswald (benedikt.oswald@psi.ch)
Reported at Oct 12, 2009 07:33
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Christian Engwer (christi@conan.iwr.uni-heidelberg.de)
Last edited at Apr 19, 2010 18:43
Closed by Christian Engwer (christi@conan.iwr.uni-heidelberg.de)
Closed at Apr 19, 2010 18:43
Closed in version Unknown
Resolution Not a bug
Comment

Description

Hi Dune developers, I just tried to use the gmsh reader to read gmsh formatted file, including boundary and element id, in this way (using the Dune head version):

    typedef Dune::ALUSimplexGrid< 3, 3 > ALUSimplexGridType;


    /** brief provide a grid factory object for a grid of the ALUGSimplexGrid<3,3> type */
    Dune::GridFactory<ALUSimplexGrid< 3, 3 > > factory;


    /** brief open the GMSH formatted tetrahedral mesh file */

    /** brief open the GMSH formatted tetrahedral mesh file into a grid factory */
    std::vector<int> boundaryId2physicalEntity;
    boundaryId2physicalEntity.clear();

    std::vector<int> elementIndex2PhysicalEntity;
    elementIndex2PhysicalEntity.clear();

    Dune::GmshReader< ALUSimplexGridType >::read<int>(factory,
                                                                                                                    GMSH_FILE_NAME,
                                                                                                                    boundaryId2physicalEntity,
                                                                                                                    elementIndex2PhysicalEntity,
                                                                                                                    true,
                                                                                                                    true);

When I specify that the boundary id's of the GMSH file should be read, the code crashes as follows:

version 2 Gmsh file detected file contains 2645 nodes file contains 15119 elements number of real vertices = 2645 number of boundary elements = 328 number of elements = 14791 terminate called after throwing an instance of 'Dune::GridError' [benedikt-oswalds-macbook-pro:83658] *** Process received signal *** [benedikt-oswalds-macbook-pro:83658] Signal: Abort trap (6) [benedikt-oswalds-macbook-pro:83658] Signal code: (0) [benedikt-oswalds-macbook-pro:83658] [ 0] 2 libSystem.B.dylib 0x912bc2bb _sigtramp + 43 [benedikt-oswalds-macbook-pro:83658] [ 1] 3 ??? 0xffffffff 0x0 + 4294967295 [benedikt-oswalds-macbook-pro:83658] [ 2] 4 libSystem.B.dylib 0x9133023a raise + 26 [benedikt-oswalds-macbook-pro:83658] [ 3] 5 libSystem.B.dylib 0x9133c679 abort + 73 [benedikt-oswalds-macbook-pro:83658] [ 4] 6 libstdc++.6.dylib 0x96366005 _ZN9__gnu_cxx27__verbose_terminate_handlerEv + 445 [benedikt-oswalds-macbook-pro:83658] [ 5] 7 libstdc++.6.dylib 0x9636410c __gxx_personality_v0 + 1108 [benedikt-oswalds-macbook-pro:83658] [ 6] 8 libstdc++.6.dylib 0x9636414b _ZSt9terminatev + 29 [benedikt-oswalds-macbook-pro:83658] [ 7] 9 libstdc++.6.dylib 0x96364261 __cxa_throw + 101 [benedikt-oswalds-macbook-pro:83658] [ 8] 10 gmshreadertest 0x0005f99b _ZN4Dune20GridFactoryInterfaceINS_14ALUSimplexGridILi3ELi3EEEE21insertBoundarySegmentESt6vectorIjSaIjEEPKNS_15BoundarySegmentILi3ELi3EEE + 277 [benedikt-oswalds-macbook-pro:83658] [ 9] 11 gmshreadertest 0x000c0950 ZN4Dune13GmshReaderImpINS_14ALUSimplexGridILi3ELi3EEELi3EE4readIiEEvRNS_11GridFactoryIS2_EERKSsbbRSt6vectorIT_SaISB_EESE + 11326 [benedikt-oswalds-macbook-pro:83658] [10] 12 gmshreadertest 0x000c1523 _ZN4Dune10GmshReaderINS_14ALUSimplexGridILi3ELi3EEEE4readERNS_11GridFactoryIS2_EERKSsbb + 147 [benedikt-oswalds-macbook-pro:83658] [11] 13 gmshreadertest 0x00003802 main + 3248 [benedikt-oswalds-macbook-pro:83658] [12] 14 gmshreadertest 0x00001cc6 start + 54 [benedikt-oswalds-macbook-pro:83658] *** End of error message ***

Any idea, on what I do wrong ?

I had a look at the files alu3dgridfactory.hh and *.cc but could not find a method called insertBoundarySegment there.

Thanks for any suggestions! Benedikt