Skip to content
Snippets Groups Projects
Select Git revision
  • gmsh_4_11_1
  • master default protected
  • patches-4.14
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • alphashapes
  • 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
  • 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_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
40 results

t8.geo

Blame
  • meshGRegionExtruded.cpp 20.64 KiB
    // Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
    
    #include <set>
    #include "GmshConfig.h"
    #include "GmshMessage.h"
    #include "GModel.h"
    #include "MTriangle.h"
    #include "MQuadrangle.h"
    #include "MTetrahedron.h"
    #include "MHexahedron.h"
    #include "MPrism.h"
    #include "MPyramid.h"
    #include "ExtrudeParams.h"
    #include "meshGFace.h"
    #include "meshGRegion.h"
    #include "Context.h"
    #include "MVertexRTree.h"
    
    #if defined(HAVE_QUADTRI)
    #include "QuadTriExtruded3D.h"
    #endif
    
    static void addTetrahedron(MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4,
                               GRegion *to)
    {
      to->tetrahedra.push_back(new MTetrahedron(v1, v2, v3, v4));
    }
    
    static void addPyramid(MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4,
                           MVertex *v5, GRegion *to)
    {
      to->pyramids.push_back(new MPyramid(v1, v2, v3, v4, v5));
    }
    
    static void addPrism(MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4,
                         MVertex *v5, MVertex *v6, GRegion *to)
    {
      to->prisms.push_back(new MPrism(v1, v2, v3, v4, v5, v6));
    }
    
    static void addHexahedron(MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4,
                              MVertex *v5, MVertex *v6, MVertex *v7, MVertex *v8,
                              GRegion *to)
    {
      to->hexahedra.push_back(new MHexahedron(v1, v2, v3, v4, v5, v6, v7, v8));
    }
    
    static void createPriPyrTet(std::vector<MVertex *> &v, GRegion *to,
                                MElement *source)
    {
      int dup[3];
      int j = 0;
      for(int i = 0; i < 3; i++)
        if(v[i] == v[i + 3]) dup[j++] = i;
    
      if(j == 2) {
        if(dup[0] == 0 && dup[1] == 1)
          addTetrahedron(v[0], v[1], v[2], v[5], to);
        else if(dup[0] == 1 && dup[1] == 2)
          addTetrahedron(v[0], v[1], v[2], v[3], to);
        else
          addTetrahedron(v[0], v[1], v[2], v[4], to);
      }
      else if(j == 1) {
        if(dup[0] == 0)
          addPyramid(v[1], v[4], v[5], v[2], v[0], to);
        else if(dup[0] == 1)