Skip to content
Snippets Groups Projects
Select Git revision
  • 62aaf4afc66e6eb4cb4e11c0abf8fec3f5f19caf
  • master default protected
  • dof-renumbering
  • dof-renumbering-simpler
  • func-supercond
  • test-dof-hash
  • gdemesy-master-patch-30528
  • eval-space-time
  • oscillating_multiharm
  • MH_movement
  • axisqu
  • write_vtu_and_ensight_formats
  • movingband
  • CP_1972_add_vtu_file_writing
  • mortar
  • fast_freq_sweep_Resolution
  • applyresolvent_again
  • marteaua-master-patch-54323
  • patch-1
  • binde-master-patch-08072
  • binde-master-patch-52461
  • getdp_3_5_0
  • getdp_3_4_0
  • getdp_3_3_0
  • getdp_3_2_0
  • getdp_3_1_0
  • getdp_3_0_4
  • getdp_3_0_3
  • getdp_3_0_2
  • getdp_3_0_1
  • getdp_3_0_0
  • onelab_mobile_2.1.0
  • getdp_2_11_3 protected
  • getdp_2_11_2 protected
  • getdp_2_11_1 protected
  • getdp_2_11_0 protected
  • getdp_2_10_0 protected
  • getdp_2_9_2 protected
  • getdp_2_9_1 protected
  • getdp_2_9_0 protected
  • getdp_2_8_0 protected
41 results

magnet.msh

Blame
  • 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_