1 /*! 2 * \file include/MFront/BehaviourBrick/IsotropicHardeningRule.hxx 3 * \brief 4 * \author Thomas Helfer 5 * \date 15/03/2018 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_MFRONT_BEHAVIOURBRICK_ISOTROPICHARDENINGRULE_HXX 15 #define LIB_MFRONT_BEHAVIOURBRICK_ISOTROPICHARDENINGRULE_HXX 16 17 #include <string> 18 #include <memory> 19 #include <vector> 20 #include "MFront/MFrontConfig.hxx" 21 #include "MFront/BehaviourDescription.hxx" 22 23 namespace tfel { 24 namespace utilities { 25 // forward declaration 26 struct Data; 27 } // end of namespace utilities 28 } // end of namespace tfel 29 30 namespace mfront { 31 32 // forward declaration 33 struct AbstractBehaviourDSL; 34 35 namespace bbrick { 36 37 // forward declaration 38 struct OptionDescription; 39 40 //! \brief class describing an isotropic hardening rule 41 struct MFRONT_VISIBILITY_EXPORT IsotropicHardeningRule { 42 //! a simple alias 43 using Data = tfel::utilities::Data; 44 //! a simple alias 45 using DataMap = std::map<std::string, Data>; 46 //! a simple alias 47 using ModellingHypothesis = tfel::material::ModellingHypothesis; 48 //! a simple alias 49 using Hypothesis = ModellingHypothesis::Hypothesis; 50 //! a simple alias 51 using MaterialProperty = BehaviourDescription::MaterialProperty; 52 //! a simple alias 53 using MaterialPropertyInput = BehaviourDescription::MaterialPropertyInput; 54 /*! 55 * \return the name of a variable from a base name and an identifier 56 * \param[in] n: base name 57 * \param[in] fid: flow id 58 * \param[in] id: identifier 59 */ 60 static std::string getVariableId(const std::string&, 61 const std::string&, 62 const std::string&); 63 /*! 64 * \param[in,out] bd: behaviour description 65 * \param[in,out] dsl: abstract behaviour dsl 66 * \param[in] fid: flow id 67 * \param[in] id: identifier 68 * \param[in] d: options 69 */ 70 virtual void initialize(BehaviourDescription&, 71 AbstractBehaviourDSL&, 72 const std::string&, 73 const std::string&, 74 const DataMap&) = 0; 75 /*! 76 * \brief return the code computing the initial radius. 77 * The code defines a variable named "Rel"+fid+"_"+id 78 * \param[in] fid: flow id 79 * \param[in] id: identifier 80 */ 81 virtual std::string computeElasticPrediction(const std::string&, 82 const std::string&) const = 0; 83 /*! 84 * \brief return the code computing the radius of the elastic limit. 85 * The code defines a variable named "R"+fid+"_"+id 86 * \param[in] fid: flow id 87 * \param[in] id: identifier 88 */ 89 virtual std::string computeElasticLimit(const std::string&, 90 const std::string&) const = 0; 91 /*! 92 * \brief return the code computing the radius of the elastic limit. 93 * The code defines two variables named "R"+fid+"_"+id and 94 * "dR"+fid+"_"+id+"ddp"+fid+"_"+id. 95 * \param[in] fid: flow id 96 * \param[in] id: identifier 97 */ 98 virtual std::string computeElasticLimitAndDerivative( 99 const std::string&, const std::string&) const = 0; 100 /*! 101 * \brief method called at the end of the input file processing 102 * \param[in] dsl: abstract behaviour dsl 103 * \param[in] bd: behaviour description 104 * \param[in] fid: flow id 105 * \param[in] id: identifier 106 */ 107 virtual void endTreatment(BehaviourDescription&, 108 const AbstractBehaviourDSL&, 109 const std::string&, 110 const std::string&) const = 0; 111 //! \return the flow options 112 virtual std::vector<OptionDescription> getOptions() const = 0; 113 //! destructor 114 virtual ~IsotropicHardeningRule(); 115 }; // end of struct IsotropicHardeningRule 116 117 } // end of namespace bbrick 118 119 } // end of namespace mfront 120 121 #endif /* LIB_MFRONT_BEHAVIOURBRICK_ISOTROPICHARDENINGRULE_HXX */ 122