Skip to content
Snippets Groups Projects
Select Git revision
  • a838a6c8bb2dbae6aae55145d22715b94e50b1ae
  • 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

drawGlyph.cpp

Blame
  • GModel.cpp 42.13 KiB
    // Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to <gmsh@geuz.org>.
    
    #include <stdlib.h>
    #include <sstream>
    #include "GmshConfig.h"
    #include "GmshMessage.h"
    #include "GModel.h"
    #include "MPoint.h"
    #include "MLine.h"
    #include "MTriangle.h"
    #include "MQuadrangle.h"
    #include "MTetrahedron.h"
    #include "MHexahedron.h"
    #include "MPrism.h"
    #include "MPyramid.h"
    #include "MElementCut.h"
    #include "discreteRegion.h"
    #include "discreteFace.h"
    #include "discreteEdge.h"
    #include "discreteVertex.h"
    #include "gmshSurface.h"
    #include "Octree.h"
    #include "SmoothData.h"
    #include "Context.h"
    #include "OS.h"
    
    #include "OpenFile.h"
    #include "CreateFile.h"
    
    #if defined(HAVE_MESH)
    #include "Field.h"
    #include "Generator.h"
    #endif
    
    std::vector<GModel*> GModel::list;
    int GModel::_current = -1;
    
    GModel::GModel(std::string name)
      : _name(name), _visible(1), _octree(0),
        _geo_internals(0), _occ_internals(0), _fm_internals(0),
        _fields(0), _currentMeshEntity(0), normals(0)
    {
      partitionSize[0] = 0; partitionSize[1] = 0;
      list.push_back(this);
      // at the moment we always create (at least an empty) GEO model
      _createGEOInternals();
    #if defined(HAVE_MESH)
      _fields = new FieldManager();
    #endif
    }
    
    GModel::~GModel()
    {
      std::vector<GModel*>::iterator it = std::find(list.begin(), list.end(), this);
      if(it != list.end()) list.erase(it);
      destroy();
      _deleteGEOInternals();
      _deleteOCCInternals();
    #if defined(HAVE_MESH)
      delete _fields;
    #endif
    }
    
    GModel *GModel::current(int index)
    {
      if(list.empty()){
        Msg::Warning("No current model available: creating one");