1 /*! 2 * \file mfront/src/LSDYNAComputeThermalExpansionCoefficientTensor.cxx 3 * \brief 4 * \author Thomas Helfer 5 * \date 18 mar 2008 6 * \copyright Copyright (C) 2006-2018 CEA/DEN, EDF R&D. All rights 7 * reserved. 8 * This project is publicly released under either the GNU GPL Licence 9 * or the CECILL-A licence. A copy of thoses licences are delivered 10 * with the sources of TFEL. CEA or EDF may also distribute this 11 * project under specific licensing conditions. 12 */ 13 14 #include<algorithm> 15 16 #include"TFEL/Math/stensor.hxx" 17 #include"MFront/LSDYNA/LSDYNAComputeThermalExpansionCoefficientTensor.hxx" 18 19 #define LSDYNACOMPUTEISOTROPICTHERMALEXPANSIONCOEFFICIENTTENSORIMP(real) \ 20 static void \ 21 LSDYNAComputeIsotropicThermalExpansionCoefficientTensor2D(const real* const props, \ 22 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& A) \ 23 { \ 24 const real a = props[0]; \ 25 A(0)=A(1)=A(2)=a; \ 26 A(3)=0.; \ 27 } \ 28 \ 29 static void \ 30 LSDYNAComputeOrthotropicThermalExpansionCoefficientTensor2D(const real* const props, \ 31 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& A) \ 32 { \ 33 const real a0 = props[0]; \ 34 const real a1 = props[1]; \ 35 const real a2 = props[2]; \ 36 A(0)=a0; \ 37 A(1)=a1; \ 38 A(2)=a2; \ 39 A(3)=0.; \ 40 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 41 \ 42 void \ 43 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 44 tfel::material::ModellingHypothesis::PLANESTRESS, \ 45 ISOTROPIC>::exe(const real* const props, \ 46 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& A) \ 47 { \ 48 LSDYNAComputeIsotropicThermalExpansionCoefficientTensor2D(props,A); \ 49 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 50 \ 51 void \ 52 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 53 tfel::material::ModellingHypothesis::AXISYMMETRICAL, \ 54 ISOTROPIC>::exe(const real* const props, \ 55 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& A) \ 56 { \ 57 LSDYNAComputeIsotropicThermalExpansionCoefficientTensor2D(props,A); \ 58 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 59 \ 60 void \ 61 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 62 tfel::material::ModellingHypothesis::PLANESTRAIN, \ 63 ISOTROPIC>::exe(const real* const props, \ 64 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& A) \ 65 { \ 66 LSDYNAComputeIsotropicThermalExpansionCoefficientTensor2D(props,A); \ 67 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 68 \ 69 void \ 70 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 71 tfel::material::ModellingHypothesis::GENERALISEDPLANESTRAIN, \ 72 ISOTROPIC>::exe(const real* const props, \ 73 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& A) \ 74 { \ 75 LSDYNAComputeIsotropicThermalExpansionCoefficientTensor2D(props,A); \ 76 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 77 \ 78 void \ 79 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 80 tfel::material::ModellingHypothesis::TRIDIMENSIONAL, \ 81 ISOTROPIC>::exe(const real* const props, \ 82 tfel::config::Types<3u,real,false>::ThermalExpansionCoefficientTensor& A) \ 83 { \ 84 const real a = props[0]; \ 85 A(0)=A(1)=A(2)=a; \ 86 A(3)=A(4)=A(5)=0.; \ 87 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 88 \ 89 void \ 90 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 91 tfel::material::ModellingHypothesis::PLANESTRESS, \ 92 ORTHOTROPIC>::exe(const real* const props, \ 93 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& A) \ 94 { \ 95 LSDYNAComputeOrthotropicThermalExpansionCoefficientTensor2D(props,A); \ 96 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 97 \ 98 void \ 99 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 100 tfel::material::ModellingHypothesis::AXISYMMETRICAL, \ 101 ORTHOTROPIC>::exe(const real* const props, \ 102 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& C) \ 103 { \ 104 LSDYNAComputeOrthotropicThermalExpansionCoefficientTensor2D(props,C); \ 105 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 106 \ 107 void \ 108 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 109 tfel::material::ModellingHypothesis::PLANESTRAIN, \ 110 ORTHOTROPIC>::exe(const real* const props, \ 111 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& C) \ 112 { \ 113 LSDYNAComputeOrthotropicThermalExpansionCoefficientTensor2D(props,C); \ 114 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 115 \ 116 void \ 117 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 118 tfel::material::ModellingHypothesis::GENERALISEDPLANESTRAIN, \ 119 ORTHOTROPIC>::exe(const real* const props, \ 120 tfel::config::Types<2u,real,false>::ThermalExpansionCoefficientTensor& C) \ 121 { \ 122 LSDYNAComputeOrthotropicThermalExpansionCoefficientTensor2D(props,C); \ 123 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ \ 124 \ 125 void \ 126 LSDYNAComputeThermalExpansionCoefficientTensor<lsdyna::STANDARDSTRAINBASEDBEHAVIOUR, \ 127 tfel::material::ModellingHypothesis::TRIDIMENSIONAL, \ 128 ORTHOTROPIC>::exe(const real* const props, \ 129 tfel::config::Types<3u,real,false>::ThermalExpansionCoefficientTensor& A) \ 130 { \ 131 const real a0 = props[0]; \ 132 const real a1 = props[1]; \ 133 const real a2 = props[2]; \ 134 A(0)=a0; \ 135 A(1)=a1; \ 136 A(2)=a2; \ 137 A(3)=A(4)=A(5)=0.; \ 138 } /* end of struct LSDYNAComputeThermalExpansionCoefficientTensor */ 139 140 namespace lsdyna 141 { 142 143 LSDYNACOMPUTEISOTROPICTHERMALEXPANSIONCOEFFICIENTTENSORIMP(float) 144 LSDYNACOMPUTEISOTROPICTHERMALEXPANSIONCOEFFICIENTTENSORIMP(double) 145 146 } // end of namespace lsdyna 147