getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Problem importing 3D gmsh mesh file.


From: julien pommier
Subject: Re: [Getfem-users] Problem importing 3D gmsh mesh file.
Date: Fri, 03 Nov 2006 10:40:44 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060922)

Hi Ron,

Yes please send me the gmsh file, I'll fix that bug immediatly

--
Julien

Ron Daisy wrote:
Hello all,

I tried to import 3D mesh, generated using gmsh, into getfem.
The program crashed with with the message: "non invertible matrix".

During the debbugging session I printed the mesh after it was imported from the external file, using the following piece of code:

  for (size_type kk=0; kk<mesh.nb_convex(); kk++) {
    cout << "MESH: " << mesh.nb_points_of_convex(kk) << " "
         << (size_type)mesh.nb_faces_of_convex(kk) << " ";
    bgeot::pconvex_structure pcstrct = mesh.structure_of_convex(kk);
    cout << *pcstrct << "\n";
    getfem::mesh::ref_mesh_pt_ct pnts = mesh.points_of_convex(kk);
    cout << "CONVEX[" << kk << "] POINTS: ";
    for (size_type nn=0; nn<pnts.size(); nn++) {
      cout << pnts[nn] << " ";
    }
    cout << "\n";
  }

To my surprise, it turns out that the points of the convexes are all have two coordinate ! (2D) even though the mesh is 3D.

The gmsh mesh file looks like this:

$NOD
9274
7500 -0.5 -0.5 -0.5
7501 0.5 -0.5 -0.5
7502 -0.5 0.5 -0.5
7503 0.5 0.5 -0.5
      .
      .
      .
      .
16770 0.1275846722912854 -0.165153082224801 -0.4833248147681861
16771 0.06332425499449677 0.2871261267859881 -0.4604494567443444
16772 0.4157091004855031 -0.06370221080387274 -0.3406477100229922
16773 0.4436176831098405 0.4436176831098408 0.423820829060733
$ENDNOD
$ELM
46775
1 2 1000047 30 3 7776 7777 8357
2 2 1000047 30 3 7510 7770 7769
3 2 1000047 30 3 8373 8052 8374
      .
      .
      .
      .
46772 4 1000049 46 4 15064 15208 15048 15004
46773 4 1000049 46 4 14999 15208 15064 15030
46774 4 1000049 46 4 15064 15208 15035 15030
46775 4 1000049 46 4 15208 15064 15035 15004
$ENDELM

The text printed by the above given piece of code looks like the following:

CONVEX[0] POINTS: [0.270499, 0.094229] [0.261685, 0.114787] [0.262885, 
0.107277] [0.254292, 0.0957974]
MESH: 4 4 convex structure of dimension 3 with 4 points and 4 faces

CONVEX[1] POINTS: [0.133208, 0.0383059] [0.145319, 0.0213313] [0.118919, 
0.03692] [0.143122, 0.0512199]
MESH: 4 4 convex structure of dimension 3 with 4 points and 4 faces

CONVEX[2] POINTS: [0.153059, -0.179236] [0.168462, -0.183324] [0.178554, 
-0.211137] [0.195041, -0.188924]
MESH: 4 4 convex structure of dimension 3 with 4 points and 4 faces

CONVEX[3] POINTS: [0.118564, -0.22825] [0.133333, -0.206681] [0.113596, 
-0.230077] [0.1444, -0.223142]
MESH: 4 4 convex structure of dimension 3 with 4 points and 4 faces

CONVEX[4] POINTS: [-0.274724, 0.18957] [-0.250519, 0.200483] [-0.26901, 
0.175057] [-0.260334, 0.192852]
  .
  .
. CONVEX[31782] POINTS: [0.120977, -0.142635] [0.138031, -0.142592] [0.122452, -0.12752] [0.125729, -0.142274]
MESH: 4 4 convex structure of dimension 3 with 4 points and 4 faces

CONVEX[31783] POINTS: [-0.15732, 0.108678] [-0.140741, 0.0869603] [-0.150538, 
0.103806] [-0.158609, 0.0909137]
MESH: 4 4 convex structure of dimension 3 with 4 points and 4 faces

CONVEX[31784] POINTS: [0.00719873, 0.128786] [-0.000551599, 0.141442] 
[-0.00627408, 0.135242] [-0.00757573, 0.145099]
MESH: 4 4 convex structure of dimension 3 with 4 points and 4 faces

As can be seen in the printings, although the MESH is claimed to be 3 
dimensional,
(by the line "MESH: 4 4 convex structure of dimension 3 with 4 points and 4 
faces") the convexes'
points are described by two coordinates - which is 2D !!!

I downloaded the last changes made regarding the code of importing gmsh files 
(From Oct. 30).

To my best knowledge this seems to be a BUG !!

In order to enable debbugging I can provide the whole gmsh mesh file.

Any help please ?


Regards,

Ron.

_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users


--
Julien Pommier, bureau 111
GMM, INSA Toulouse, tél:05 61 55 93 42




reply via email to

[Prev in Thread] Current Thread [Next in Thread]