1 /*! 2 * \file include/TFEL/Material/Hosford1972YieldCriterion.hxx 3 * \brief 4 * \author Thomas Helfer 5 * \date 15/11/2017 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 #ifndef LIB_TFEL_MATERIAL_HOSFORD_HXX 15 #define LIB_TFEL_MATERIAL_HOSFORD_HXX 16 17 #include "TFEL/Math/stensor.hxx" 18 #include "TFEL/Math/st2tost2.hxx" 19 20 namespace tfel { 21 22 namespace material { 23 24 //! a simple alias 25 template <typename StressStensor> 26 using HosfordStressType = tfel::math::StensorNumType<StressStensor>; 27 //! a simple alias 28 template <typename StressStensor> 29 using HosfordBaseType = 30 tfel::typetraits::base_type<tfel::math::StensorNumType<StressStensor>>; 31 //! a simple alias 32 template <typename StressStensor> 33 using HosfordInvertStressType = 34 tfel::math::result_type<HosfordBaseType<StressStensor>, 35 HosfordStressType<StressStensor>, 36 tfel::math::OpDiv>; 37 //! a simple alias 38 template <typename StressStensor> 39 using HosfordStressNormalType = 40 tfel::math::stensor<tfel::math::StensorTraits<StressStensor>::dime, 41 HosfordBaseType<StressStensor>>; 42 //! a simple alias 43 template <typename StressStensor> 44 using HosfordStressEigenTensorType = 45 tfel::math::stensor<tfel::math::StensorTraits<StressStensor>::dime, 46 HosfordBaseType<StressStensor>>; 47 //! a simple alias 48 template <typename StressStensor> 49 using HosfordStressSecondDerivativeType = 50 tfel::math::st2tost2<tfel::math::StensorTraits<StressStensor>::dime, 51 HosfordInvertStressType<StressStensor>>; 52 /*! 53 * \brief compute the Hosford yield stress 54 * \tparam StressStensor: type of the stress tensor 55 * \tparam HosfordExponentType: type of the hosford exponent 56 * (could be a numeric type or an integer type) 57 * \tparam es: eigen solver to be used 58 * \param[in] s: stress tensor 59 * \param[in] a: Hosford exponent 60 * \param[in] e: criterion used to check if the stress are null 61 */ 62 template <typename StressStensor, 63 typename HosfordExponentType, 64 tfel::math::stensor_common::EigenSolver = 65 tfel::math::stensor_common::TFELEIGENSOLVER> 66 HosfordStressType<StressStensor> computeHosfordStress( 67 const StressStensor&, 68 const HosfordExponentType, 69 const HosfordStressType<StressStensor>); 70 /*! 71 * \brief compute the Hosford yield stress and the its first derivative 72 * \tparam StressStensor: type of the stress tensor 73 * \tparam HosfordExponentType: type of the hosford exponent 74 * (could be a numeric type or an integer type) 75 * \tparam es: eigen solver to be used 76 * \param[in] s: stress tensor 77 * \param[in] a: Hosford exponent 78 * \param[in] e: criterion used to check if the stress are null 79 */ 80 template <typename StressStensor, 81 typename HosfordExponentType, 82 tfel::math::stensor_common::EigenSolver = 83 tfel::math::stensor_common::TFELEIGENSOLVER> 84 std::tuple<HosfordStressType<StressStensor>, 85 HosfordStressNormalType<StressStensor>> 86 computeHosfordStressNormal(const StressStensor&, 87 const HosfordExponentType, 88 const HosfordStressType<StressStensor>); 89 /*! 90 * \brief compute the Hosford yield stress and its first and second 91 * derivatives 92 * \tparam StressStensor: type of the stress tensor 93 * \tparam HosfordExponentType: type of the hosford exponent 94 * (could be a numeric type or an integer type) 95 * \tparam es: eigen solver to be used 96 * \param[in] s: stress tensor 97 * \param[in] a: Hosford exponent 98 * \param[in] e: criterion used to check if the stress are null 99 */ 100 template <typename StressStensor, 101 typename HosfordExponentType, 102 tfel::math::stensor_common::EigenSolver = 103 tfel::math::stensor_common::TFELEIGENSOLVER> 104 std::tuple<HosfordStressType<StressStensor>, 105 HosfordStressNormalType<StressStensor>, 106 HosfordStressSecondDerivativeType<StressStensor>> 107 computeHosfordStressSecondDerivative( 108 const StressStensor&, 109 const HosfordExponentType, 110 const HosfordStressType<StressStensor>); 111 112 } // end of namespace material 113 114 } // end of namespace tfel 115 116 #include "TFEL/Material/Hosford1972YieldCriterion.ixx" 117 118 #endif /* LIB_TFEL_MATERIAL_HOSFORD_HXX */ 119