mesh2d, worth keeping around? repurposing?

Discussion about coding and new developments
Post Reply
NJank
Posts: 99
Joined: 05 Dec 2009, 00:05
Location: Baltimore, MD, USA

mesh2d, worth keeping around? repurposing?

Post by NJank »

mesh2d has been mentioned in a couple recent elmersolver posts. Looking at the old archives, it appears that it was only used by Elmerfront, which is now no longer included in the default build. It comes up often with respect to adaptive meshing, as one of the two remesh options requires a 'mesh2d or mesh3d' program. I thought that was why mesh2d was was still included, but it appears you have to generate the initial mesh with mesh2d for that to work (you need an initial .mif file on which to base further refinements), and doing that no longer seems supported. searching both the forum and the old mailing list archives didn't present any mif examples to see if it would be simple to maintain as an alternative to elmergrid for simple 2D geometry definition (wherever you would want Delaunay triangulation instead of a mapped mesh). Also, not having ever used elmerfront, I can't say for certain that the full mesh.* files needed for elmersolver come out of mesh2d, or if you needed extra info from elmerfront (boundary definition, etc.).

Also, there are both mesh2d.exe and elmermesh2d.exe files, filesize is the same and they both produce the same output from the CLI. Is there a reason/need for both?

It would be nice for the full adaptive remeshing to be supported in Elmersolver without external software, even if only via CLI. Mesh2d seems to be the only immediate path forward for that, the alternative being to implement a coarsening scheme to the RGB refinement that works with Elmergrid.

If anyone has examples of some mif files, I wouldn't mind taking a look at them and playing around with them a bit. If it is functional without elmerfront, I would be willing to try putting together a brief tutorial for defining the geometry, generating the meshfiles and using them in the adaptive solver.
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: mesh2d, worth keeping around? repurposing?

Post by raback »

Hi

Yes, the Mesh2D is a historic piece of Elmer code. Originally the .mif files were created by the now obsolite ElmerFront. You can find some examples of *.mif files among the tests. Unfortunaly this is not meant to be created by humans, and I cannot find the exact description anywhere. There is a little bit similar .egf format (Elmer geometry file) that is given in http://www.nic.funet.fi/pub/sci/physics ... rguide.pdf, App. G. This might not be of much assitance.

Now the world was quite different in 1995 when work on Elmer was started. There were really no free libraries and hence the project had to be rather multifaceted. Now it does not really make much sense to write own mesh generation software, visualization etc. so we mainly concentrate on the ElmerSolver. From this point of view it would probably make most sense to enable the adaptivity for some other mesh generator. I know that in 3D netgen has been used. In 2D alternatives would probably include netgen, gmsh, triangle etc. Development of Mesh2D has been halted so it would probably not make too much sense to work on that. Of course having just minor modifications to have some working *.mif files migth be usefull for some canonnical geometries.

-Peter
NJank
Posts: 99
Joined: 05 Dec 2009, 00:05
Location: Baltimore, MD, USA

Re: mesh2d, worth keeping around? repurposing?

Post by NJank »

thanks for the reply. I guess my google-fu was failing me. I noticed that I didn't have the tests folder. Installing via the win32 zipfile binaries. (easier to update on the managed computer) and this seemed not to include the tests folder. even now, googling for one of the .mif files I found is bringing up nothing. Oh well, I'll play around with them and if I can come up with a simple test case, I'll post it to the contributed forum as something to keep functionality until something better comes along.

I agree that with the amount of code out there, it makes little sense to re-invent things. One thing I have always liked about Elmer is that it has the ability to handle the full process at a simple level with Elmergrid and Elmerpost. , and then more complicated things could get handled with external software. that's been more than sufficient for much of my academic work. I've also always been fond of Elmergrid's simple approach to geometry definition. I tried to gmsh something once, and the input file was 4x longer than the length of the grd file. Makes scripting and parameterization a bear. Since it was still around, I was hoping mesh2d would provide a similar simple bridge.

With elmergui calling nglib as its default mesher, seems like there should be a path forward to calling this routine from elmersolver when a remesh is desired. Preferring the CLI, however, I really have no idea how feasible it would be to to the hand-off without elmergui managing the transition. I can read code, but writing it isn't exactly my forte yet :)

thanks again.
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: mesh2d, worth keeping around? repurposing?

Post by raback »

mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: mesh2d, worth keeping around? repurposing?

Post by mzenker »

Hi,

according to the thread in viewtopic.php?f=9&t=2023, gmsh is the most frequently used mesh generator for Elmer. The netgen development seems to be inactive since 2010.

gmsh can do a lot of things and is actively developed and supported. Like probably all(?) free meshing tools, gmsh has the problem that duplicate boundaries are not conformally meshed, which is a problem at least for thermal and electrical simulations.
If anyone knows a meshing tool that does not have this problem, I would be most interested...

Matthias
Post Reply