getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] gmsh import problem


From: Ronan Perrussel
Subject: Re: [Getfem-users] gmsh import problem
Date: Thu, 27 Nov 2008 08:57:32 +0100
User-agent: Thunderbird 2.0.0.18 (X11/20081125)

Dear Lei Zhang,

By default the gmsh format read by getfem is the format 1.
By default the format used by gmsh is currently the format 2.
You have two solutions :
- you register your mesh as format 1 instead of 2 in gmsh.
- you use in getfem:
""getfem::import_mesh("t1.msh","gmshv2",m1);"" instead of:
""getfem::import_mesh("t1.msh","gmsh",m1);""

Best regards,
Ronan

Lei Zhang a écrit :
Dear developers,

Thanks for developing Getfem++. I am trying to use this package in my research.
Could you help with the following problem? Thanks a lot in advance!

When I tried to use import_mesh to import GMSH file into getfem like this:
    getfem::mesh m1;
    getfem::import_mesh("t1.msh","gmsh",m1);

I got the following error,
============================================
|      An error has been detected !!!      |
============================================
Error in getfem_import.cc, line 517 :
error while importing gmsh mesh file "t1.msh" : basic_ios::clear


The following is the gmsh file t1.msh.
$---------------------------------------------------------------------------------
$MeshFormat
2 0 8
$EndMeshFormat
$PhysicalNames
1
100 "My fancy surface label"
$EndPhysicalNames
$Nodes
9
1 0 0 0
2 1 0 0
3 1 2 0
4 0 2 0
5 0.4999999999986717 0 0
6 1 1.000000000002661 0
7 0.5000000000013305 2 0
8 0 1.000000000002661 0
9 0.5 1 0
$EndNodes
$Elements
16
1 15 3 1 1 0 1
2 15 3 1 2 0 2
3 1 3 99 1 0 1 5
4 1 3 99 1 0 5 2
5 1 3 99 2 0 3 6
6 1 3 99 2 0 6 2
7 1 3 99 4 0 4 8
8 1 3 99 4 0 8 1
9 2 3 100 6 0 2 6 9
10 2 3 100 6 0 6 7 9
11 2 3 100 6 0 6 3 7
12 2 3 100 6 0 9 7 4
13 2 3 100 6 0 2 9 5
14 2 3 100 6 0 9 8 5
15 2 3 100 6 0 9 4 8
16 2 3 100 6 0 5 8 1
$EndElements
$------------------------------------------------------------

Lei

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

Attachment: ronan_perrussel.vcf
Description: Vcard


reply via email to

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