Skip to content
Snippets Groups Projects
Select Git revision
  • 4c30762f20eb438fa829e52503b7ab1bd9f0c130
  • master default protected
  • revert-ef4a3a4f
  • patch_releases_4_14
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • 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

CutMesh.h

Blame
  • BackgroundMesh.cpp 22.33 KiB
    // Gmsh - Copyright (C) 1997-2017 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to the public mailing list <gmsh@onelab.info>.
    
    #include "GmshMessage.h"
    #include "BackgroundMesh.h"
    #include "Numeric.h"
    #include "Context.h"
    #include "GVertex.h"
    #include "GEdge.h"
    #include "GEdgeCompound.h"
    #include "GFace.h"
    #include "GFaceCompound.h"
    #include "GModel.h"
    #include "OS.h"
    #include "Field.h"
    #include "MElement.h"
    #include "MElementOctree.h"
    #include "MLine.h"
    #include "MTriangle.h"
    #include "MQuadrangle.h"
    #include "MVertex.h"
    
    #if defined(HAVE_SOLVER)
    #include "dofManager.h"
    #include "laplaceTerm.h"
    #include "linearSystemGMM.h"
    #include "linearSystemCSR.h"
    #include "linearSystemFull.h"
    #include "linearSystemPETSc.h"
    #endif
    
    #if defined(HAVE_ANN)
    static int _NBANN = 2;
    #endif
    
    void backgroundMesh::set(GFace *gf)
    {
      if (_current) delete _current;
      _current = new backgroundMesh(gf);
    }
    
    void backgroundMesh::setCrossFieldsByDistance(GFace *gf)
    {
      if (_current) delete _current;
      _current = new backgroundMesh(gf, true);
    }
    
    void backgroundMesh::unset()
    {
      if (_current) delete _current;
      _current = 0;
    }
    
    backgroundMesh::backgroundMesh(GFace *_gf, bool cfd)
    #if defined(HAVE_ANN)
      : _octree(0), uv_kdtree(0), nodes(0), angle_nodes(0), angle_kdtree(0)
    #endif
    {
    
      if (cfd){
        Msg::Info("Building A Cross Field Using Closest Distance");
        propagateCrossFieldByDistance(_gf);
        return;
      }
    
      // create a bunch of triangles on the parametric space
      // those triangles are local to the backgroundMesh so that
      // they do not depend on the actual mesh that can be deleted