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.
remesh
, I think that right now it is not useful. $\endgroup$Refine by splitting
in the software. $\endgroup$