Skip to content
Snippets Groups Projects
Select Git revision
  • dcdafd764363a14533f47a7a6439e6ae2cdf40ff
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

graphicWindow.cpp

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