[Gmsh] Remeshing and coarsening

David Nolte dnolte at dim.uchile.cl
Tue Jun 13 19:08:36 CEST 2017


Dear all,

I am trying to figure out how to remesh a 3D tet mesh with a coarser
resolution. Something similar is done in t13.geo, so I adapted the file:

// remesh.geo
Mesh.CharacteristicLengthFactor=0.5;
Mesh.CharacteristicLengthMin=.01;
Mesh.CharacteristicLengthMax=.012;

Merge "Aorta1.msh";

CreateTopology;

// // We can now define a compound line (resp. surface) for each
discrete line
// // (resp. surface) in the model
ll[] = Line "*";
For j In {0 : #ll[]-1}
  Compound Line(newl) = ll[j];
EndFor
ss[] = Surface "*";
s = news;
For i In {0 : #ss[]-1}
  Compound Surface(s+i) = ss[i];
EndFor

// And we can create the volume based on the new compound entities
Surface Loop(1) = {s : s + #ss[]-1};
Volume(1) = {1};

Physical Surface(1) = {s : s + #ss[]-1};
Physical Volume(1) = 1;

Mesh.RemeshAlgorithm = 1; // automatic
Mesh.RemeshParametrization = 7; // conformal finite element
Mesh.Algorithm = 6; // Frontal

Mesh 2;
Mesh 3;


I can see that it remeshes at least the surface with the desired coarser
element size. However, the original fine mesh is still "there", together
with the new one.
When I save the mesh(es), they end up in one file. How can I extract
only the new coarse mesh?


Thank you very much in advance!

Best wishes
David






More information about the gmsh mailing list