Skip to content
Snippets Groups Projects
Select Git revision
  • 91e5114cd71db44ce917f3b2fbd0d79d5ba6b32a
  • master default protected
  • cyrielle
  • dev_mm_pf
  • ujwal_05_08_2025
  • complexpetsc
  • ujwal_21_08_2024
  • vinayak
  • dev_mm_torchSCRU
  • debug_mm_pf
  • newStructureNonLocal
  • Mohamed_stochasticDMN
  • dev_mm_bench
  • stochdmn
  • revert-351ff7aa
  • ujwal_29April2024
  • dev_mm_ann
  • mohamed_vevp
  • ujwal_debug
  • ujwal_2ndApril2024
  • ujwal_October_2023
  • v4.0
  • v3.2.3_multiplePhase
  • v3.5
  • v3.3.2
  • v3.4
  • v3.3
  • ver3.2
  • verJulienWork
  • ver3.1
  • ver2
  • ver1.1.2
  • ver1.1.1
  • ver1.1
34 results

Plane_notch.py

Blame
  • quadratureRules.h 1.88 KiB
    // Gmsh - Copyright (C) 1997-2013 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@geuz.org>.
    //
    // 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_