Importing mesh file (.msh) from the gmesh

33 views
Skip to first unread message

Furkan Yildirim

unread,
Jun 27, 2023, 2:25:54 AM6/27/23
to deal.II User Group
Hi everyone,

I am trying to get used to deal.ii. I have a problem about the function grid in. The error that I get is the following when I try to import the msh file defines a mesh around an airfoil. The mesh is surface mesh and it is triangular. When I checked mesh file, it works accurately in gmesh but the following error comes in deal.ii.

An error occurred in line <2278> of file </home/furkan/Downloads/dealii-9.4.2/source/grid/grid_in.cc> in function
    void dealii::GridIn<dim, spacedim>::read_msh(std::istream&) [with int dim = 2; int spacedim = 2; std::istream = std::basic_istream<char>]
The violated condition was:
    ::dealii::deal_II_exceptions::internals::compare_for_equality(global_vertex, n_vertices)
Additional information:
    Dimension 685 not equal to 6610.

Wolfgang Bangerth

unread,
Jun 27, 2023, 9:32:43 AM6/27/23
to dea...@googlegroups.com
Furkan:
it's hard to tell without seeing the mesh what may be going wrong. But if
you're trying to read a surface mesh, I suspect that you need to use a
Triangulation<2,3> and consequently GridIn<2,3>. Can you try that?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages