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

GmshClient.c

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    dG3DMaterialLaw.cpp 520.25 KiB
    //
    //
    // Description: Class with definition of materialLaw for shell
    //
    //
    // Author:  <Gauthier BECKER>, (C) 2011
    //
    // Copyright: See COPYING file that comes with this distribution
    //
    //
    
    #include "dG3DMaterialLaw.h"
    #include "ipstate.h"
    #include "MInterfaceElement.h"
    #include "ipField.h"
    #include "mlawLinearThermoMechanics.h"
    #include "mlawSMP.h"
    #include "mlawPhenomenologicalSMP.h"
    #include "mlaw.h"
    #include "mlawLinearElecTherMech.h"
    #include "mlawAnIsotropicElecTherMech.h"
    #include "mlawElecSMP.h"
    #include <iostream>
    #include <fstream>
    #include <sstream>
    #include <iomanip>
    #include <vector>
    #include <string>
    #include "dG3DCohesiveIPVariable.h"
    #include "FractureCohesiveDG3DIPVariable.h"
    #include "dG3DReduction.h"
    #include "mlawLinearElecMagTherMech.h"
    #include "nonLinearMechSolver.h"
    #include "numericalMaterial.h"
    #include "nonLocalDamageDG3DIPVariable.h"
    #if defined(HAVE_TORCH)
    #include <torch/torch.h>
    #include <torch/script.h>
    #endif
    
    
    // 3D to 1D
    void dG3DMaterialLaw::stress3DTo1D(IPVariable* ipv, const IPVariable* ipvprev, const bool stiff, const bool checkfrac){
    	reduction3DTo1DStress(this,ipv,ipvprev,stiff,checkfrac);
    };
    
    void dG3DMaterialLaw::stress3DTo1D_constantTriaxiality(double T, IPVariable* ipv, const IPVariable* ipvprev, const bool stiff, const bool checkfrac){
    	reduction3DTo1DStress_constantTriaxiality(T,this,ipv,ipvprev,stiff,checkfrac);
    };
    
    // 3D to 2D
    void dG3DMaterialLaw::stress3DTo2D(IPVariable* ipv, const IPVariable* ipvprev, const bool stiff, const bool checkfrac, const bool dTangent){
    	reduction3DTo2DStress(this,ipv,ipvprev,stiff,checkfrac,dTangent);
    };
    
    
    void dG3DMaterialLaw::fillElasticStiffness(double E, double nu, STensor43 &K_) const
    {
      double mu = 0.5*E/(1.+nu);
      double lambda = (E*nu)/(1.+nu)/(1.-2.*nu);
      double twicemu = mu+mu;
      STensorOperation::zero(K_);
      K_(0,0,0,0) = lambda + twicemu;
      K_(1,1,0,0) = lambda;
      K_(2,2,0,0) = lambda;
      K_(0,0,1,1) = lambda;
      K_(1,1,1,1) = lambda + twicemu;
      K_(2,2,1,1) = lambda;
      K_(0,0,2,2) = lambda;
      K_(1,1,2,2) = lambda;