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

Gmsh.tab.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    Curvature.cpp 61.18 KiB
    // Gmsh - Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to <gmsh@geuz.org>.
    
    #include "Curvature.h"
    #include "MElement.h"
    #include "MTriangle.h"
    #include "GEntity.h"
    #include "GFaceCompound.h"
    #include "MLine.h"
    #include "GRbf.h"
    #include "OS.h"
    #include "SBoundingBox3d.h"
    #include "discreteEdge.h"
    
    #include<iostream>
    #include<fstream>
    #include<cmath>
    
    #define NEXT(i) ((i)<2 ? (i)+1 : (i)-2)
    #define PREV(i) ((i)>0 ? (i)-1 : (i)+2)
    //========================================================================================================
    
    //Initialization of the static variables:
    Curvature* Curvature::_instance = 0;
    bool Curvature::_destroyed = false;
    bool Curvature::_alreadyComputedCurvature = false;
    
    //========================================================================================================
    
    //CONSTRUCTOR
    Curvature::Curvature() : _isMapInitialized(false)
    {
    }
    
    // Curvature::Curvature(std::list<GFace*> &myFaces){
    
    //   std::list<GFace*>::const_iterator it = myFaces.begin();
    //   for( ; it != myFaces.end() ; ++it){
    //          _ptFinalEntityList.push_back(*it);
    //   }
    
    // }
    
    //========================================================================================================
    
    Curvature::~Curvature()
    {
       _instance = 0;
      _destroyed = true;
    
    }
    //========================================================================================================
    void Curvature::onDeadReference()
    {
      std::cout << "Dead reference of Curvature detected" << std::endl;
    }
    //========================================================================================================
    
    Curvature& Curvature::getInstance()
    {
      if (!_instance)  {
        if(_destroyed){
          onDeadReference();
        }
        else{
          create();
        }
      }