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

PViewData.h

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    gmshElasticity.h 1.27 KiB
    // THIS FILE WILL BE REMOVED AS SOON AS THE NEW SOLVER INTERFACE IS READY
    
    // Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to <gmsh@geuz.org>.
    
    #ifndef _GMSH_ELASTICITY_H_
    #define _GMSH_ELASTICITY_H_
    
    #include "gmshTermOfFormulation.h"
    #include "Gmsh.h"
    #include "GModel.h"
    #include "MElement.h"
    #include "fullMatrix.h"
    
    class gmshElasticityTerm : public gmshNodalFemTerm<double> {
     protected:
      double _E, _nu;
      int _iField;
      SVector3 _f;
     public:
      virtual int sizeOfR(MElement *e) const { return 3 * e->getNumVertices(); }
      virtual int sizeOfC(MElement *e) const { return 3 * e->getNumVertices(); }
      void getLocalDofR(MElement *e, int iRow, MVertex **vR, int *iCompR, int *iFieldR) const
      {
        *iCompR = iRow / e->getNumVertices();
        int ithLocalVertex = iRow % e->getNumVertices();
        *vR = e->getVertex(ithLocalVertex);
        *iFieldR = _iField;
      }
     public:
     gmshElasticityTerm(GModel *gm, double E, double nu, int iField = 1) : 
      gmshNodalFemTerm<double>(gm), _E(E), _nu(nu), _iField(iField){}
      void setVector(const SVector3 &f) {_f = f;}
      void elementMatrix(MElement *e, fullMatrix<double> &m) const;
      void elementVector(MElement *e, fullVector<double> &m) const;
    };
    
    #endif