Skip to content
Snippets Groups Projects
Select Git revision
  • 3862278e6705ecc0f5d32144289635a34f5d90cb
  • master default protected
  • hierarchical-basis
  • alphashapes
  • bl
  • relaying
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 3115-issue-fix
  • 3023-Fillet2D-Update
  • convert_fdivs
  • tmp_jcjc24
  • fixedMeshIF
  • save_edges
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
41 results

t2.cpp

Blame
  • t7.geo 1.26 KiB
    // -----------------------------------------------------------------------------
    //
    //  Gmsh GEO tutorial 7
    //
    //  Background meshes
    //
    // -----------------------------------------------------------------------------
    
    // Mesh sizes can be specified very accurately by providing a background mesh,
    // i.e., a post-processing view that contains the target mesh sizes.
    
    // Merge a list-based post-processing view containing the target mesh sizes:
    Merge "t7_bgmesh.pos";
    
    // If the post-processing view was model-based instead of list-based (i.e. if it
    // was based on an actual mesh), we would need to create a new model to contain
    // the geometry so that meshing it does not destroy the background mesh. It's
    // not necessary here since the view is list-based, but it does no harm:
    NewModel;
    
    // Merge the first tutorial geometry:
    Merge "t1.geo";
    
    // Apply the view as the current background mesh size field:
    Background Mesh View[0];
    
    // In order to compute the mesh sizes from the background mesh only, and
    // disregard any other size constraints, one can set:
    Mesh.MeshSizeExtendFromBoundary = 0;
    Mesh.MeshSizeFromPoints = 0;
    Mesh.MeshSizeFromCurvature = 0;
    
    // See `t10.geo' for additional information: background meshes are actually a
    // particular case of general "mesh size fields".