"Fossies" - the Fresh Open Source Software Archive

Member "gmsh-4.3.0-source/tutorial/t13.geo" (16 Aug 2018, 926 Bytes) of package /linux/privat/gmsh-4.3.0-source.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 /*********************************************************************
    2  *
    3  *  Gmsh tutorial 13
    4  *
    5  *  Remeshing without an underlying CAD model
    6  *
    7  *********************************************************************/
    8 
    9 // Let's merge a mesh that we would like to remesh. This mesh was reclassified
   10 // ("colored") from an initial STL triangulation using the "Reclassify 2D" tool
   11 // in Gmsh, so that we could split it along sharp geometrical features.
   12 Merge "t13_data.msh";
   13 
   14 // Create a geometry for all the curves and surfaces in the mesh, by computing a
   15 // parametrization for each entity
   16 CreateGeometry;
   17 
   18 // Create a volume as usual
   19 Surface Loop(1) = Surface{:};
   20 Volume(1) = {1};
   21 
   22 // element size imposed by a size field
   23 Field[1] = MathEval;
   24 Field[1].F = "4";
   25 Background Field = 1;
   26 
   27 funny = DefineNumber[0, Choices{0,1}, Name "Parameters/Apply funny mesh size field?" ];
   28 If(funny)
   29   Field[1].F = "2*Sin((x+y)/5) + 3";
   30 EndIf