Test mesh for pieces, Calculate Mesh Pieces

Numerical methods and mathematical models of Elmer
Post Reply
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Test mesh for pieces, Calculate Mesh Pieces

Post by Rich_B »

Hello,

As a follow up to this post:

viewtopic.php?p=27465#p27465

Elmersolver can test the given mesh for multiple volumes. The usual case is someone who has just started with Elmer and has created geometry in a tool such as gmsh, Salome, or Freecad. The geometry needs to be conforming for most cases, and typically should not have multiple meshes. Then the new user tries to run Elmer which then fails without much explanation, causing frustration and posting to the forum. There have been several forum posts a year on this topic. The Calculate Mesh Pieces tool is designed to find and provide a positive test of the mesh, and will be very helpful for new users, as well as for old users trying to help on the forum.

Adding

Code: Select all

Calculate Mesh Pieces = Logical True
to the simulation section causes Elmersolver to check the mesh for multiple pieces. The result of the test is then printed in the solver log. The user then must search for the printed results.

Would it make sense to add another keyword, such as
Desired Mesh Pieces = Integer 1
Then in the subroutine, CalculateMeshPieces, after having calculated the number of mesh pieces, test to see if the calculated result is equal to the desired result. If not equal, print a few lines explaining what happened and what to do about it, then Call Fatal to stop Elmersolver. The printed results will then be the last few lines of the solver output and the user doesn't need to search for the results.

Having a default value of 1 will be convenient for most new users. Some solutions, such as Mortar Boundary Conditions, require multiple meshes, so the user can enter the desired number of meshes, and the tool will then confirm that the mesh has the desired number of meshes.

Thanks for listening!

Rich.
Post Reply