Skip to content
Snippets Groups Projects
Select Git revision
  • bf66c842fb8a492b13e7709f48d68b74235bb6c2
  • master default protected
  • alphashapes
  • quadMeshingTools
  • cygwin_conv_path
  • macos_arm64
  • add-transfiniteautomatic-to-geo
  • patch_releases_4_10
  • HierarchicalHDiv
  • isuruf-master-patch-63355
  • hyperbolic
  • hexdom
  • hxt_update
  • jf
  • 1618-pythonocc-and-gmsh-api-integration
  • octreeSizeField
  • hexbl
  • alignIrregularVertices
  • getEdges
  • patch_releases_4_8
  • isuruf-master-patch-51992
  • 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
  • gmsh_4_8_4
  • gmsh_4_8_3
  • gmsh_4_8_2
  • gmsh_4_8_1
  • gmsh_4_8_0
  • gmsh_4_7_1
  • gmsh_4_7_0
41 results

qualityMeasures.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    quadratureRules.h 1.88 KiB
    // Gmsh - Copyright (C) 1997-2018 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>.
    //
    // Contributor(s):
    //   Eric Bechet
    //
    
    #ifndef _QUADRATURERULES_H_
    #define _QUADRATURERULES_H_
    
    #include "GaussIntegration.h"
    #include "MElement.h"
    
    class QuadratureBase
    {
      public :
      virtual ~QuadratureBase(){}
      virtual int getIntPoints(MElement *e, IntPt **GP) =0;
    };
    
    // For rigid contact no need of Gauss'integration
    // but to use clasical get function in term npts and IntPt are needed
    // so use a empty gaussQuadrature rule
    class QuadratureVoid : public QuadratureBase
    {
     public:
      QuadratureVoid() : QuadratureBase(){}
      ~QuadratureVoid(){}
      int getIntPoints(MElement *e, IntPt **GP){GP=NULL; return 0;}
    } ;
    
    class GaussQuadrature : public QuadratureBase
    {
     public :
      enum IntegCases {Other, Val, Grad, ValVal, GradGrad};
     private :
      int order;
      IntegCases info;
     public :
      GaussQuadrature(int order_ = 0) : order(order_), info(Other) {}
      GaussQuadrature(IntegCases info_) : order(0), info(info_) {}
      virtual ~GaussQuadrature(){}
      virtual int getIntPoints(MElement *e, IntPt **GP)
      {
        int integrationOrder;
        int npts;
        int geoorder = e->getPolynomialOrder();
        switch(info)
        {
        case Other :
          integrationOrder = order;
          break;
        case Val :
          integrationOrder = geoorder + 1;
          break;
        case Grad :
          integrationOrder = geoorder;
          break;
        case ValVal :
          integrationOrder = 2 * geoorder;
          break;
        case GradGrad :
          integrationOrder = 3 * (geoorder - 1) + 1;
          break;
        default : integrationOrder = 1;
        }
        e->getIntegrationPoints(integrationOrder, &npts, GP);
        return npts;
      }
      // copy constructor
      GaussQuadrature(const GaussQuadrature &other) : order(other.order), info(other.info){}
    };
    
    #endif //_QUADRATURERULES_H_