# Is it possible to remesh with gmsh?

I am currently working on remeshers for my simulations (academic purpose) and I try to find a method to remesh previous meshes using Gmsh. The first mesh (normalMesh.msh) was created using a .geo file (normalMesh.geo) and the new meshes should be either coarser or finer depending on the location and stress distribution (Abaqus will be my solver). MWE is given below.

normalMesh.geo

Point(1) = {0, 0, 0, 1.0};
Point(2) = {0, 2, 0, 1.0};
Point(3) = {2, 2, 0, 1.0};
Point(4) = {0, 1, 0, 1.0};
Point(5) = {1, 2, 0, 1.0};
Circle(1) = {1, 2, 3};
Circle(2) = {4, 2, 5};
Line(3) = {5, 3};
Line(4) = {4, 1};
Line Loop(1) = {2, 3, -1, -4};
Plane Surface(1) = {1};
Physical Surface("surf1") = {1};
Physical Line("setTop") = {3};
Physical Line("setBot") = {4};
Physical Line("setInner") = {2};
Physical Line("setOuter") = {1};

If you now mesh the .geo file

gmsh <name_of_your_geo_file.geo> -2 <-o name_of_the_output_file>

you can view it in gmsh.

If you mesh finerMesh.geo, you will see what I aim to get.

Point(1) = {0, 0, 0, 0.3};
Point(2) = {0, 2, 0, 1.0};
Point(3) = {2, 2, 0, 1.0};
Point(4) = {0, 1, 0, 0.3};
Point(5) = {1, 2, 0, 1.0};
Circle(1) = {1, 2, 3};
Circle(2) = {4, 2, 5};
Line(3) = {5, 3};
Line(4) = {4, 1};
Line Loop(1) = {2, 3, -1, -4};
Plane Surface(1) = {1};
Physical Surface("surf1") = {1};
Physical Line("setTop") = {3};
Physical Line("setBot") = {4};
Physical Line("setInner") = {2};
Physical Line("setOuter") = {1};

If you now compare both .geo files, you will see that I only slightly changed 2 lines. I changed line 1 (from 1.0 to 0.3) and line 4 (from 1.0 to 0.3). I want to be able to only manipulating the .msh files to get the same result or remeshing the .msh files.

I appreciate any kind of suggestions and help coming up.

• For remeshing you could look into MMG: mmgtools.org Jul 15, 2019 at 11:15
• Regarding your request of adding the tag remesh, I think that right now it is not useful. Jul 15, 2019 at 14:20
• Regarding your question, do you want to refine (split each element in for) the original mesh? If that's the case, you can just use Refine by splitting in the software. Jul 15, 2019 at 14:22
• I don't want to uniformly split each element in the model. I want a way to select a given area in the body where I can either refine the mesh or even make it coarser there. That's why in the finerMesh.geo you can see that I only refined the mesh on the bottom end of the pipe and not on the top. Jul 16, 2019 at 7:30
• Well, I don't understand what is that you are asking then. Also, if you add @ and the user handle the person would be notified. Jul 16, 2019 at 13:44