Skip to content
Snippets Groups Projects
Select Git revision
  • 7b10b74bf252dfb1b5a7c3e5b60fa47a5cd4d9a9
  • master default protected
  • alphashapes
  • quadMeshingTools
  • cygwin_conv_path
  • macos_arm64
  • add-transfiniteautomatic-to-geo
  • patch_releases_4_10
  • HierarchicalHDiv
  • isuruf-master-patch-63355
  • hyperbolic
  • hexdom
  • hxt_update
  • jf
  • 1618-pythonocc-and-gmsh-api-integration
  • octreeSizeField
  • hexbl
  • alignIrregularVertices
  • getEdges
  • patch_releases_4_8
  • isuruf-master-patch-51992
  • 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
  • gmsh_4_8_4
  • gmsh_4_8_3
  • gmsh_4_8_2
  • gmsh_4_8_1
  • gmsh_4_8_0
  • gmsh_4_7_1
  • gmsh_4_7_0
41 results

GaussQuadratureQuad.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    meshGRegionLocalMeshMod.cpp 37.37 KiB
    // Gmsh - Copyright (C) 1997-2014 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@geuz.org>.
    
    #include "meshGRegionLocalMeshMod.h"
    #include "GEntity.h"
    #include "GRegion.h"
    #include "GmshMessage.h"
    #include "Numeric.h"
    
    static int edges[6][2] =    {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}};
    static int efaces[6][2] =   {{0,2},{0,1},{1,2},{0,3},{2,3},{1,3}};
    //static int enofaces[6][2] = {{1,3},{2,3},{0,3},{1,2},{0,1},{0,2}};
    //static int facesXedges[4][3] = {{0,1,3},{1,2,5},{0,2,4},{3,4,5}};
    static int faces[4][3] = {{0,1,2},{0,2,3},{0,1,3},{1,2,3}};
    static int vnofaces[4] = {3,1,2,0};
    static int vFac[4][3] = {{0,1,2},{0,2,3},{0,1,3},{1,2,3}};
    
    // as input, we give a tet and an edge, as return, we get
    // all tets that share this edge and all vertices that are
    // forming the outer ring of the cavity
    // we return true if the cavity is closed and false if it is open
    
    void computeNeighboringTetsOfACavity(const std::vector<MTet4*> &cavity,
                                         std::vector<MTet4*> &outside)
    {
      outside.clear();
      for (unsigned int i = 0; i < cavity.size(); i++){
        for (int j = 0; j < 4; j++){
          MTet4 * neigh = cavity[i]->getNeigh(j);
          if(neigh){
            bool found = false;
            for (unsigned int k = 0; k < outside.size(); k++){
              if(outside[k] == neigh){
                found = true;
                break;
              }
            }
            if(!found){
              for (unsigned int k = 0; k < cavity.size(); k++){
                if(cavity[k] == neigh){
                  found = true;
                }
              }
            }
            if(!found)outside.push_back(neigh);
          }
        }
      }
    }
    
    bool buildEdgeCavity(MTet4 *t, int iLocalEdge, MVertex **v1, MVertex **v2,
                         std::vector<MTet4*> &cavity, std::vector<MTet4*> &outside,
                         std::vector<MVertex*> &ring)
    {
      cavity.clear();
      ring.clear();
    
      *v1 = t->tet()->getVertex(edges[iLocalEdge][0]);
      *v2 = t->tet()->getVertex(edges[iLocalEdge][1]);
    
      // the 5 - i th edge contains the other 2 points of the tet
      MVertex *lastinring = t->tet()->getVertex(edges[5 - iLocalEdge][0]);
      ring.push_back(lastinring);
      cavity.push_back(t);
    
      while (1){
        MVertex *ov1 = t->tet()->getVertex(edges[5 - iLocalEdge][0]);
        MVertex *ov2 = t->tet()->getVertex(edges[5 - iLocalEdge][1]);