Skip to content
Snippets Groups Projects
Commit 99f196cb authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

No commit message

No commit message
parent ab058ce0
No related branches found
No related tags found
No related merge requests found
/*********************************************************************
/*********************************************************************
*
* Gmsh tutorial 10
*
*
* General mesh size fields
*
*********************************************************************/
// In addition to specifying target mesh sizes at the points of the
// geometry (see t1) or using a background mesh (see t7), you can use
// general mesh size "Fields".
// general mesh size "Fields".
// Let's create a simple rectangular geometry
lc = .15;
Point(1) = {0.0,0.0,0,lc}; Point(2) = {1,0.0,0,lc};
Point(3) = {1,1,0,lc}; Point(4) = {0,1,0,lc};
Point(1) = {0.0,0.0,0,lc}; Point(2) = {1,0.0,0,lc};
Point(3) = {1,1,0,lc}; Point(4) = {0,1,0,lc};
Point(5) = {0.2,.5,0,lc};
Line(1) = {3,2}; Line(2) = {2,1}; Line(3) = {1,4}; Line(4) = {4,3};
Line(1) = {1,2}; Line(2) = {2,3}; Line(3) = {3,4}; Line(4) = {4,1};
Line Loop(5) = {1,2,3,4}; Plane Surface(6) = {5};
......@@ -73,7 +73,7 @@ Field[5].F = Sprintf("F4^3 + %g", lc / 100);
Field[6] = Box;
Field[6].VIn = lc / 15;
Field[6].VOut = lc;
Field[6].XMin = 0.3;
Field[6].XMin = 0.3;
Field[6].XMax = 0.6;
Field[6].YMin = 0.3;
Field[6].YMax = 0.6;
......
/*********************************************************************
/*********************************************************************
*
* Gmsh tutorial 11
*
*
* Unstructured quadrangular meshes
*
*********************************************************************/
......@@ -12,13 +12,13 @@
// same way. Let's define a simple geometry with an analytical mesh
// size field:
Point(1) = {-1.25, -.5, 0}; Point(2) = {-1.25, 1.25, 0};
Point(3) = {1.25, -.5, 0}; Point(4) = {1.25, 1.25, 0};
Point(1) = {-1.25, -.5, 0}; Point(2) = {1.25, -.5, 0};
Point(3) = {1.25, 1.25, 0}; Point(4) = {-1.25, 1.25, 0};
Line(1) = {1, 2}; Line(2) = {2, 4};
Line(3) = {4, 3}; Line(4) = {3, 1};
Line(1) = {1, 2}; Line(2) = {2, 3};
Line(3) = {3, 4}; Line(4) = {4, 1};
Line Loop(4) = {1,2, 3, 4}; Plane Surface(100) = {4};
Line Loop(4) = {1, 2, 3, 4}; Plane Surface(100) = {4};
Field[1] = MathEval;
Field[1].F = "0.01*(1.0+30.*(y-x*x)*(y-x*x) + (1-x)*(1-x))";
......
/*********************************************************************
/*********************************************************************
*
* Gmsh tutorial 12
*
*
* Cross-patch meshing with compounds
*
*********************************************************************/
......@@ -19,9 +19,9 @@ Point(5) = {0.3, 0.2, 0, lc}; Point(6) = {0, 0.01, 0.01, lc};
Point(7) = {0, 0.02, 0.02, lc}; Point(8) = {1, 0.05, 0.02, lc};
Point(9) = {1, 0.32, 0.02, lc};
Line(1) = {1, 2}; Line(2) = {2, 8}; Line(3) = {8, 9};
Line(4) = {9, 3}; Line(5) = {3, 4}; Line(6) = {4, 7};
Line(7) = {7, 6}; Line(8) = {6, 1}; Spline(9) = {7, 5, 9};
Line(1) = {1, 2}; Line(2) = {2, 8}; Line(3) = {8, 9};
Line(4) = {9, 3}; Line(5) = {3, 4}; Line(6) = {4, 7};
Line(7) = {7, 6}; Line(8) = {6, 1}; Spline(9) = {7, 5, 9};
Line(10) = {6, 8};
Line Loop(11) = {5, 6, 9, 4}; Ruled Surface(12) = {11};
......@@ -52,7 +52,7 @@ Compound Surface(200) = {12, 14, 16};
// and J-F Remacle, "Quality meshing based on STL triangulations for
// biomedical simulations", International Journal for Numerical
// Methods in Biomedical Engineering", 26 (7), pp. 876-889, 2010.
//
//
// * E. Marchandise, C. Carton de Wiart, W. G. Vos, C. Geuzaine and
// J.-F. Remacle, "High Quality Surface Remeshing Using Harmonic
// Maps. Part II: Surfaces with High Genus and of Large Aspect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment