Replies: 2 comments 1 reply
-
Hi @tr3920, is this helpful: https://mfem.org/tutorial/meshvis/#importing-meshes-from-gmsh-and-cubit? |
Beta Was this translation helpful? Give feedback.
-
Hello all, Sorry for the delay — I'm still running into some issues while adapting the tutorial to a custom geometry. I successfully generated a working mesh using a .geo file (see screenshot below), and everything runs fine with MFEM in that case: However, when I try generating the same geometry using the Gmsh C++ API, I get a segmentation fault. The issue seems to be that Here's the C++ code I use to generate the mesh: #include <set> int main(int argc, char **argv) double L = 1.0; int box1tag = gmsh::model::occ::addBox(0, 0, 0, L, L, L); // Subtract electrodes from the main box // Add physical groups gmsh::model::addPhysicalGroup(2, {7, 8, 9, 10, 11, 12}, 1); // electrode 1 gmsh::model::mesh::generate(3); if (!std::setstd::string(argv, argv + argc).count("-nopopup")) gmsh::finalize(); |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I am a complete beginner with MFEM. I would like to import a Gmsh mesh into MFEM, as I need to create the mesh from a .step file.
Could you please explain a basic method for creating boundary elements and assigning values to them based on the physical entities defined in the Gmsh file?
Thank you very much in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions