Skip to content
Snippets Groups Projects
Select Git revision
  • f9da1a3db25181729c613040fead7e4bf533b4ce
  • master default protected
  • 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
  • convert_fdivs
  • 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

TreeUtils.h

Blame
  • Read_Mesh.cpp 23.35 KiB
    // $Id: Read_Mesh.cpp,v 1.76 2004-05-31 01:54:19 geuzaine Exp $
    //
    // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
    //
    // This program is free software; you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation; either version 2 of the License, or
    // (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
    // USA.
    // 
    // Please report all bugs and problems to <gmsh@geuz.org>.
    
    #include "Gmsh.h"
    #include "Geo.h"
    #include "CAD.h"
    #include "Mesh.h"
    #include "3D_Mesh.h"
    #include "Create.h"
    #include "MinMax.h"
    #include "Context.h"
    
    extern Context_T CTX;
    
    // Read mesh in native MSH format
    
    #define LGN1 1
    #define TRI1 2
    #define QUA1 3
    #define TET1 4
    #define HEX1 5
    #define PRI1 6
    #define PYR1 7
    #define LGN2 8
    #define TRI2 9
    #define QUA2 10
    #define TET2 11
    #define HEX2 12
    #define PRI2 13
    #define PYR2 14
    #define PNT  15
    
    #define NB_NOD_MAX_ELM 30
    
    void addPhysicalGroup(Mesh * M, int Type, int Physical, int Elementary)
    {
      PhysicalGroup *pg;
      if((pg = FindPhysicalGroup(Physical, Type, M))) {
        List_Insert(pg->Entities, &Elementary, fcmp_int);
      }
      else {
        List_T *tmp = List_Create(1, 1, sizeof(int));
        List_Add(tmp, &Elementary);
        pg = Create_PhysicalGroup(Physical, Type, tmp);
        List_Add(M->PhysicalGroups, &pg);
        List_Delete(tmp);
      }
    }
    
    /* Note: the "Dirty" flag only has an influence if one doesn't load
       the geometry along with the mesh (since we only add "dirty"
       geometrical entities if they don't already exist). */