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

dG3DMaterialLaw.cpp

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