Skip to content
Snippets Groups Projects
Select Git revision
  • a838a6c8bb2dbae6aae55145d22715b94e50b1ae
  • master default protected
  • patches-4.14
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • alphashapes
  • relaying
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 3115-issue-fix
  • 3023-Fillet2D-Update
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • 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
41 results

GRegion.h

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