Error in Reading Gmsh File in Dealii

55 views
Skip to first unread message

Deepika Kushwah

unread,
Dec 22, 2022, 1:47:32 AM12/22/22
to dea...@googlegroups.com
Hello Everyone,

I have successfully read a gmsh file for one material in my code. Now I am trying to read the gmsh file which has two different materials, but it is showing the following error (see below). I am not able to understand the meaning of the error message. Please help.

image.png
The gmsh geometry is also attached for reference.
image.png

Thanks & Regards,
Deepika

**************************************************************************
This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
************************************************************************************************

Bruno Turcksin

unread,
Dec 22, 2022, 9:11:50 AM12/22/22
to deal.II User Group
Deepika,

Can you try using a linear mesh instead of curvilinear one? Does that work?

Best,

Bruno

Deepika Kushwah

unread,
Dec 22, 2022, 10:23:35 AM12/22/22
to dea...@googlegroups.com
Thank you for your response.
I have changed the 2d algorithm from tool -> option-> mesh. Now it is showing that the mesh curvilinear is off. Still I am getting the same error while reading the gmsh file in dealii. Please find the attached updated mesh and the error message.

image.png
image.png

Thanks
Deepika

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/819f4a60-a64f-414c-b1a2-cc980f9c6b4bn%40googlegroups.com.

Abbas

unread,
Dec 23, 2022, 2:02:49 AM12/23/22
to deal.II User Group
If you get stuck you can set the material ID manually after importing it with something like:

Point<dim> p ;
for (const auto &cell : triangulation.active_cell_iterators())
  {p=cell->center() ;
   if(sqrt(p[0]^2+p[1]^2)<r)
     cell->set_material_id(1) ;
else
    cell->set_material_id(2) ;
   }

It's a cheat and might be a bad idea if your geometry gets complicated though. 
Reply all
Reply to author
Forward
0 new messages