Hi Lilanath, If you check step-50 https://www.dealii.org/developer/doxygen/deal.II/step_49.html#Importingfromexternalprograms you can see an example where it works correctly (including the .geo file https://github.com/dealii/dealii/blob/master/examples/step-49/example.geo ) Maybe this is because you assign names instead of just physical ids?
On Sun, Feb 19, 2023 at 11:02 PM Lilanath Ghimire <[email protected]> wrote: > > I have meshed my cad model in gmesh and provided bounday ids for different > surfaces by add physical group option and saved mesh in .msh file format. > the first few lines of .msh file look like this: $MeshFormat 2. 2 0 8 > $EndMeshFormat $PhysicalNames > ZjQcmQRYFpfptBannerStart > This Message Is From an External Sender > Use caution when opening links or attachments if you do not recognize the > sender. > > ZjQcmQRYFpfptBannerEnd > I have meshed my cad model in gmesh and provided bounday ids for different > surfaces by add physical group option and saved mesh in .msh file format. > the first few lines of .msh file look like this: > $MeshFormat > 2.2 0 8 > $EndMeshFormat > $PhysicalNames > 4 > 2 13 "bottom" > 2 14 "top" > 2 15 "inner" > 2 16 "outer" > $EndPhysicalNames > $Nodes > 4556 > > then i read the mesh file by gridin function as > Triangulation<3> triangulation; > > GridIn<3> gridin; > gridin.attach_triangulation(triangulation); > std::ifstream f("input.msh"); > gridin.read_msh(f); > > and i tried to access the boundary id by following line of code: > for (const auto& face : triangulation.active_face_iterators()) { > if (face->at_boundary()) { > std::cout << "Face " << face->index() > << " has boundary ID " << face->boundary_id() << std::endl; > } > but the output of this code shows every face of mesh have boundary id zero > as > .......... > Face 136 has boundary ID 0 > Face 137 has boundary ID 0 > Face 140 has boundary ID 0 > Face 141 has boundary ID 0 > ......... > > it seems like every face/surface is assigned with boundary id zero by default > when i read .msh file in deal.ii > how can i access boundary id (created in gmesh) in deal.ii ? > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/d7064e12-642a-47fd-8d67-6132ced24bccn%40googlegroups.com. -- Timo Heister http://www.math.clemson.edu/~heister/ -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CAMRj59Fmt%2BkvkCaLPSf_xzHLO9%3DBvdNb8DgoUyN9DZOd5zUATg%40mail.gmail.com.
