Skip to content
Snippets Groups Projects
Select Git revision
  • 36e3ee4208ad5791573808c6ae3f847fb31b743f
  • master default protected
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • patches-4.14
  • 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
  • fix_overlaps
  • 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

sparsityPattern.h

Blame
  • GModel.cpp 46.09 KiB
    // Gmsh - Copyright (C) 1997-2010 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 "MElementOctree.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;
    
    static void recur_connect(MVertex *v,
                              std::multimap<MVertex*,MEdge> &v2e,
                              std::set<MEdge,Less_Edge> &group,
                              std::set<MVertex*> &touched)
    {
      if (touched.find(v) != touched.end())return;
    
      touched.insert(v);
      for (std::multimap <MVertex*,MEdge>::iterator it = v2e.lower_bound(v); 
           it != v2e.upper_bound(v) ; ++it){
        group.insert(it->second);
        for (int i=0;i<it->second.getNumVertices();++i){
          recur_connect (it->second.getVertex(i),v2e,group,touched);
        }
      }
    
    }
    
    // starting form a list of elements, returns
    // lists of lists that are all simply connected
    static void recur_connect_e (const MEdge &e,
                                 std::multimap<MEdge,MElement*,Less_Edge> &e2e,
                                 std::set<MElement*> &group,
                                 std::set<MEdge,Less_Edge> &touched){
      if (touched.find(e) != touched.end())return;
      touched.insert(e);
      for (std::multimap <MEdge,MElement*,Less_Edge>::iterator it = e2e.lower_bound(e);
             it != e2e.upper_bound(e) ; ++it){
        group.insert(it->second);