Skip to content
Snippets Groups Projects
Select Git revision
  • c06ff569741d077d6909e9c340304a4a43f61cad
  • master default protected
  • NewDistributionGmshFWI
  • parametrizationSimpleWave
  • tuto_obstacle
  • everything
  • cleanup_configuuration_mesh
  • fix
  • source_estimation
  • unique_ptr
  • SobolevDirectionalFilter
  • OT
  • newPhysics
  • SimultaneousFrequency
  • SobolevDistance
  • BonesImaging
  • MultiParameter
  • UpdateAntho
  • v2.0
  • v1.0
20 results

objective.h

Blame
  • delaunay3d.cpp 26.78 KiB
    // Gmsh - Copyright (C) 1997-2016 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@onelab.info>.
    
    #ifdef _OPENMP
    #include <omp.h>
    #endif
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <list>
    #include <set>
    #include <stack>
    #include <map>
    #include <vector>
    #include <algorithm>
    #include <math.h>
    #include "SBoundingBox3d.h"
    #include "OS.h"
    #include "delaunay3d_private.h"
    #include "delaunay3d.h"
    #include "MVertex.h"
    #include "MEdge.h"
    #include "MTetrahedron.h"
    
    const int MEASURE_BARR = 0;
    
    #ifdef _HAVE_NUMA
    #include <numa.h>
    #endif
    
    //int Tet::in_sphere_counter = 0;
    
    
    struct HilbertSortB
    {
    // The code for generating table transgc
    // from: http://graphics.stanford.edu/~seander/bithacks.html.
      int transgc[8][3][8];
      int tsb1mod3[8];
      int maxDepth;
      int Limit;
      SBoundingBox3d bbox ;
      void ComputeGrayCode(int n);
      int Split(Vertex** vertices,
    	    int arraysize,int GrayCode0,int GrayCode1,
    	    double BoundingBoxXmin, double BoundingBoxXmax,
    	    double BoundingBoxYmin, double BoundingBoxYmax,
    	    double BoundingBoxZmin, double BoundingBoxZmax);
      void Sort(Vertex** vertices, int arraysize, int e, int d,
    	   double BoundingBoxXmin, double BoundingBoxXmax,
                double BoundingBoxYmin, double BoundingBoxYmax,
    	   double BoundingBoxZmin, double BoundingBoxZmax, int depth);
      HilbertSortB (int m = 0, int l=2) : maxDepth(m),Limit(l)
      {
        ComputeGrayCode(3);
      }
      void MultiscaleSortHilbert(Vertex** vertices, int arraysize,
    			     int threshold, double ratio, int *depth, std::vector<int> &indices)
      {
        int middle;
    
        middle = 0;
        if (arraysize >= threshold) {
          (*depth)++;
          middle = (int)(arraysize * ratio);
          MultiscaleSortHilbert(vertices, middle, threshold, ratio, depth, indices);
        }
        indices.push_back(middle);