mfem / mfem

Lightweight, general, scalable C++ library for finite element methods
http://mfem.org
BSD 3-Clause "New" or "Revised" License
1.69k stars 492 forks source link

about NC meshing: "MFEM NC mesh v1.0", 3 questions #4514

Open liu1948 opened 3 weeks ago

liu1948 commented 3 weeks ago
  1. For the .mesh file, in the "elements part", does the attribute value of the root element need to be the same as that of the leaf element? Because I want to refine some areas to simulate the interface more accurately.

  2. For the .mesh file, in the "elements part", can I just write leaf elements?

  3. For the .mesh file, in the "vertex_parents", can I write most of the node relationships, whether they're newly generated hanging nodes or newly generated non-hanging nodes, as long as those nodes can be computed from the "coordinates" part?

dylan-copeland commented 2 weeks ago

There is some documentation on the MFEM website, relevant to your questions: https://mfem.org/mesh-format-v1.0/#mfem-nc-mesh-v10

  1. Elements inherit attributes from their parents.
  2. The documentation says that all elements should be listed, both active (leaf) and inactive (refined parents).
  3. To quote the documentation, "In fact, any vertex that was created as a result of refinement always has two "parent" vertices and needs to be listed in the vertex_parents section."

Hopefully this helps, but please let us know if you have more questions or suggestions to improve the documentation.