Curved gmsh meshes in Firedrake #4455
Replies: 5 comments 17 replies
-
Hi Ed, |
Beta Was this translation helpful? Give feedback.
-
Many thanks for the answer. I have .msh files generated by some of the Nektar++ guys from their own format (xml) - Nektar's high-order geom capability is pretty good. Can these be converted to Netgen do you know? I'll take a good look at the Netgen demo anyhow. Cheers, Ed |
Beta Was this translation helpful? Give feedback.
-
By the way, if it is specifically a high order disk mesh that you want, you can get one from a low order disk mesh by interpolating the distance R to the centre of the disk to the CG1 space. Then you build a Vector CGk field by interpolating Similar tricks are possible whenever an analytic equation defining the boundary (or part of it) is known. |
Beta Was this translation helpful? Give feedback.
-
Many thanks for the answers. I've found that I can make / save / load simple meshes inc. curved elements using the Netgen integration linked by Colin. (Uploaded simple script with things I tried to my repo linked above.) I haven't yet found a way to use my gmsh-format curved meshes in Firedrake (tried converting to Netgen .vol format using meshio, which works for straight meshes but not curved ones). I'm talking to the Nektar++ guys about how to resolve this - the meshes are fairly involved as they come from a CAD rep of a tokamak divertor. |
Beta Was this translation helpful? Give feedback.
-
Further to this - I've been trying to generate curved meshes in Netgen format. I want to be able to load these from file, but I'm not sure how. I can save a mesh and re-load it, but the call to the curve_field method seems to need the geo object that I used to create the mesh i.e. the curved mesh info is not actually saved in the mesh file. See https://github.com/ethrelfall/simple-curved-meshes/tree/main/further_example_1. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear community,
I'd like to be able to use higher-order geometries in Firedrake - eventually 3D, but I'm starting with 2D. I'm using meshes in gmsh .msh format.
There is a very simple example at https://github.com/ethrelfall/simple-curved-meshes/tree/main. It doesn't work; it gives the error
ValueError: cannot reshape array of size 168 into shape (12,2)
when trying to set up a FunctionSpace. Note there are 14 elements, quadratic order, 168=14*12 wh. 12 is probably 6 nodes * 2 dimensions.
Is there a way to make this work, please?
Search for matching discussions done - nada.
Thanks,
Ed
Beta Was this translation helpful? Give feedback.
All reactions