Skip to content
Snippets Groups Projects
Select Git revision
  • aa151c1faaea3821062eceef919b60949e584e56
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

Levy3D.h

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    Levy3D.h 2.57 KiB
    // Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to <gmsh@geuz.org>.
    //
    // Contributor(s):
    //   Tristan Carrier
    
    #ifndef _LEVY3D_H_
    #define _LEVY3D_H_
    
    #include <list>
    #include "SVector3.h"
    #include "fullMatrix.h"
    #include "GRegion.h"
    #include "MElementOctree.h"
    
    class VoronoiVertex{
     private:
      SPoint3 point;
      int category;
      int index1;
      int index2;
      int index3;
      int index4;
      SVector3 normal1;
      SVector3 normal2;
      double h;
     public:
      VoronoiVertex();
      ~VoronoiVertex();
      SPoint3 get_point();
      int get_category();
      int get_index1();
      int get_index2();
      int get_index3();
      int get_index4();
      SVector3 get_normal1();
      SVector3 get_normal2();
      double get_h();
      void set_point(SPoint3);
      void set_category(int);
      void set_index1(int);
      void set_index2(int);
      void set_index3(int);
      void set_index4(int);
      void set_normal1(SVector3);
      void set_normal2(SVector3);
      void set_h(double);
    };
    
    class Tensor{
     private:
      double t11,t21,t31,t12,t22,t32,t13,t23,t33;
     public:
      Tensor();
      ~Tensor();
      void set_t11(double);
      void set_t21(double);
      void set_t31(double);
      void set_t12(double);
      void set_t22(double);
      void set_t32(double);
      void set_t13(double);
      void set_t23(double);
      void set_t33(double);
      double get_t11();
      double get_t21();
      double get_t31();
      double get_t12();
      double get_t22();
      double get_t32();
      double get_t13();
      double get_t23();
      double get_t33();
    };
    
    class VoronoiElement{
     private:
      VoronoiVertex v1;
      VoronoiVertex v2;
      VoronoiVertex v3;
      VoronoiVertex v4;
      double jacobian;
      double dh_dx;
      double dh_dy;
      double dh_dz;
      Tensor t;
     public:
      VoronoiElement();
      ~VoronoiElement();
      VoronoiVertex get_v1();
      VoronoiVertex get_v2();
      VoronoiVertex get_v3();
      VoronoiVertex get_v4();
      double get_jacobian();
      double get_dh_dx();
      double get_dh_dy();
      double get_dh_dz();
      Tensor get_tensor();
      void set_v1(VoronoiVertex);
      void set_v2(VoronoiVertex);
      void set_v3(VoronoiVertex);
      void set_v4(VoronoiVertex);
      void set_tensor(Tensor);
      double get_h(double,double,double);
      void deriv_h();
      void compute_jacobian();
      double T(double,double,double,double,double,double,double);
      void swap();
      double get_quality();
    };
    
    class LpSmoother{
     private:
      int max_iter;
      int norm;
      static std::vector<MVertex*> interior_vertices;
     public:
      LpSmoother(int,int);
      ~LpSmoother();
      void improve_model();
      void improve_region(GRegion*);
      static int get_nbr_interior_vertices();
      static MVertex* get_interior_vertex(int);
    };
    
    #endif