Skip to content
Snippets Groups Projects
Select Git revision
  • 84948532c6c0ef154fb2aad93845ec60c08a85ab
  • master default protected
  • dev_mm_pf
  • cyrielle
  • vinayak
  • ujwal_21_08_2024
  • 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
  • gabriel
  • SFEM
  • 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

SMP.py

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