From 00db1683c98109dd5236d480d1e710d53b3916eb Mon Sep 17 00:00:00 2001 From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be> Date: Tue, 29 Nov 2016 16:19:52 +0000 Subject: [PATCH] fixed --- tutorial/t13.geo | 64 +++--------------------------------------------- 1 file changed, 4 insertions(+), 60 deletions(-) diff --git a/tutorial/t13.geo b/tutorial/t13.geo index 61edda77b7..6ff1021a7b 100644 --- a/tutorial/t13.geo +++ b/tutorial/t13.geo @@ -1,63 +1,7 @@ -/********************************************************************* - * - * Gmsh tutorial 13 - * - * Remeshing STL with compounds - * - *********************************************************************/ - -// Since compound geometrical compute a new parametrization, one can also use -// them to remesh STL files, even if in this case there's usually only a single -// elementary geometrical entity per compound. - -// Let's merge the mesh that we would like to remesh. This mesh was reclassified -// ("colored") from an initial STL triangulation using the "Reclassify 2D" tool -// in Gmsh, so that we could split it along sharp geometrical features. +General.MeshDiscrete = 1; Merge "t13_data.msh"; - +Mesh.Algorithm=6; +Mesh.CharacteristicLengthMax = 1; // Since the original mesh is a bit coarse, we refine it once RefineMesh; - -// Create the topology of the discrete model -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; -Physical Line(1) = {26 ... 37}; - -// element size imposed by a size field -Field[1] = MathEval; -Field[1].F = "2.5"; -Background Field = 1; - -DefineConstant[ - funny = {0, Choices{0,1}, - Name "Parameters/Apply funny mesh size field?"}, - hide = {Geometry.HideCompounds, Choices{0,1}, - AutoCheck 0, GmshOption "Geometry.HideCompounds", - Name "Parameters/Hide compound sub-entities"} -]; - -If(funny) - Field[1].F = "2*Sin((x+y)/5) + 3"; -EndIf - -Mesh.RemeshAlgorithm = 1; // automatic -Mesh.RemeshParametrization = 7; // conformal finite element -Mesh.Algorithm = 6; // Frontal +CreateTopology; \ No newline at end of file -- GitLab