mfem: Problem with Example 1 for continuous beam-quad.mesh
The General MFEM Mesh Format page lists a non-periodic and periodic versions of data/beam-quad.mesh
. Their difference is illustrated with their results of a simple Laplace problem with homogeneous essential boundary conditions.
Running Example 1 for the non-periodic beam-quad mesh yields me the same image as illustrated on the page, but for the periodic beam-quad mesh (Listing 5) the image instead looks like this: This has puzzled me for a long time and I don’t know what I’m missing. Can you please help me to I get the proper image for the periodic case?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
Thank you for clearing up the Listing 5 confusion and many thanks for the example code! This has been a huge help.
I hope it’s not a bad idea to steal the coordinate data from the topology, e.g. in case it doesn’t follow a grid. In the case of above code this can be done with a minor alteration to the coordinates loop:
(Although I will likely avoid using the
mesh->GetVertex
by keeping the vertices’ coordinates in a separate array.)Best wishes, Panu
However, you can reproduce the listing 5 mesh with this slightly modified version of your code from above: