diff --git a/Geo/GModel.h b/Geo/GModel.h index c2b31682d911206a54076aac5d5e051ae5f74981..2296adce2e2d13a16975d31d4470819c6719836b 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -312,11 +312,11 @@ class GModel // build a new GModel by cutting the elements crossed by the levelset ls GModel *buildCutGModel(gLevelset *ls); - // Gmsh native CAD format - int importGEOInternals(); - // read is static, since it can create multiple models + // Gmsh native CAD format (readGEO is static, since it can create + // multiple models) static int readGEO(const std::string &name); int writeGEO(const std::string &name, bool printLabels=true); + int importGEOInternals(); // Fourier model int readFourier(); diff --git a/benchmarks/levelset/carreTri.geo b/benchmarks/levelset/carreTri.geo index 5eac75e94ac865a20bc070fbab89c451221225fd..b8025d22a195cb424474a56247a5aa7a4e8dbae2 100644 --- a/benchmarks/levelset/carreTri.geo +++ b/benchmarks/levelset/carreTri.geo @@ -7,8 +7,6 @@ Point(1) = {-l/2,-l/2,0,cl}; Point(2) = {-l/2,l/2,0,cl}; Point(3) = {l/2,l/2,0,cl}; Point(4) = {l/2,-l/2,0,cl}; -//Point(3) = {2*l,l,0,cl}; -//Point(4) = {2*l,0,0,cl}; Line(1) = {1,2} ; Line(2) = {2,3} ; @@ -23,25 +21,19 @@ Physical Line(100) = {1}; Physical Line(200) = {2}; Physical Line(300) = {3}; Physical Line(400) = {4}; -//Physical Surface(1000) = {6}; Mesh 2; -Merge "level.med"; - Levelset Plane (1) = {0,-1,0,0.22}; Levelset Plane (2) = {-1,0,0,0.5}; Levelset Sphere (3) = {{0,0,0},0.75}; Levelset Ellipsoid (4) = { {0,0,0}, {1,0,0}, 0.55, 0.55, 0.75 }; +//Merge "level.med"; +//Levelset PostView (11) = 0; + Levelset Intersection (10) = {1,3}; -Levelset PostView (11) = 0; -Levelset CutMesh {11}; +Levelset CutMesh {10}; Physical Surface(1000) = {6}; Physical Surface(2000) = {7}; - -//Transfinite Line{1,3}=nb+1; -//Transfinite Line{2,4}=2*nb+1+1; -//Transfinite Surface{6}={1,2,3,4}; - diff --git a/benchmarks/levelset/cube.geo b/benchmarks/levelset/cube.geo new file mode 100644 index 0000000000000000000000000000000000000000..ea8247e666f1e30cc86858612ad23983ab01a63d --- /dev/null +++ b/benchmarks/levelset/cube.geo @@ -0,0 +1,29 @@ + +lc = 0.1; +Point(1) = {0.0,0.0,0.0,lc}; +Point(2) = {1,0.0,0.0,lc}; +Point(3) = {1,1,0.0,lc}; +Point(4) = {0,1,0.0,lc}; +Line(1) = {4,3}; +Line(2) = {3,2}; +Line(3) = {2,1}; +Line(4) = {1,4}; +Line Loop(5) = {2,3,4,1}; +Plane Surface(6) = {5}; +Extrude {0,0.0,1} { + Surface{6}; +} + +Mesh 3; +Levelset Plane (1) = {0,-1,0,0.5}; +Levelset Plane (2) = {-1,0,0,0.5}; +Levelset Sphere (3) = {{0.75,0.5,0.5},0.5}; +Levelset Ellipsoid (4) = { {0,0,0}, {1,0,0}, 0.45, 0.25, 0.75 }; +Levelset MathEval (5) = "(x-0.5)^2+(y-0.5)^2+(z-0.5)^2-0.5^2"; +Levelset MathEval (6) = "-((x-0.5)^2+(y-0.5)^2+(z-0.5)^2-0.4^2)"; +Levelset Sphere (7) = {{0.75,0.5,0.5},0.4}; +Levelset Intersection (10) = {1,2,3}; +Levelset Intersection (11) = {5,6}; +Levelset Cut (12) = {3,7}; + +Levelset CutMesh {10}; diff --git a/doc/gmsh.html b/doc/gmsh.html index e7834358d4451f0983cf552c2856d052d5ed3c2c..0580176db386e19375c6a6a02cda0a190e35dfc2 100644 --- a/doc/gmsh.html +++ b/doc/gmsh.html @@ -94,7 +94,7 @@ reference in your work (books, articles, reports, etc.): J.-F. Remacle. <em>Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities</em>. International Journal for Numerical Methods in -Engineering, Volume 79, Issue 11, pages 1309-1331, 2009. +Engineering, Volume 79, Issue 11, pages 1309-1331, 2009</a>''. <h2><a name="Authors"></a>Authors and credits</h2>