/*! * \file TFEL/Material/IsotropicLinearHardeningPlasticityBehaviourData.hxx * \brief this file implements the IsotropicLinearHardeningPlasticityBehaviourData class. * File generated by tfel version 3.3.0 * \author Thomas Helfer * \date 14 / 10 / 2016 */ #ifndef LIB_TFELMATERIAL_ISOTROPICLINEARHARDENINGPLASTICITY_BEHAVIOUR_DATA_HXX #define LIB_TFELMATERIAL_ISOTROPICLINEARHARDENINGPLASTICITY_BEHAVIOUR_DATA_HXX #include #include #include #include #include #include #include"TFEL/Raise.hxx" #include"TFEL/PhysicalConstants.hxx" #include"TFEL/Config/TFELConfig.hxx" #include"TFEL/Config/TFELTypes.hxx" #include"TFEL/Metaprogramming/StaticAssert.hxx" #include"TFEL/TypeTraits/IsFundamentalNumericType.hxx" #include"TFEL/TypeTraits/IsReal.hxx" #include"TFEL/Math/General/IEEE754.hxx" #include"TFEL/Math/stensor.hxx" #include"TFEL/Math/Stensor/StensorConceptIO.hxx" #include"TFEL/Math/tmatrix.hxx" #include"TFEL/Math/Matrix/tmatrixIO.hxx" #include"TFEL/Math/st2tost2.hxx" #include"TFEL/Math/ST2toST2/ST2toST2ConceptIO.hxx" #include"TFEL/Material/ModellingHypothesis.hxx" #include "MFront/GenericBehaviour/State.hxx" #include "MFront/GenericBehaviour/BehaviourData.hxx" namespace tfel{ namespace material{ //! \brief forward declaration template class IsotropicLinearHardeningPlasticityBehaviourData; //! \brief forward declaration template class IsotropicLinearHardeningPlasticityIntegrationData; //! \brief forward declaration template std::ostream& operator <<(std::ostream&,const IsotropicLinearHardeningPlasticityBehaviourData&); template class IsotropicLinearHardeningPlasticityBehaviourData { static constexpr unsigned short N = ModellingHypothesisToSpaceDimension::value; TFEL_STATIC_ASSERT(N==1||N==2||N==3); TFEL_STATIC_ASSERT(tfel::typetraits::IsFundamentalNumericType::cond); TFEL_STATIC_ASSERT(tfel::typetraits::IsReal::cond); friend std::ostream& operator<< <>(std::ostream&,const IsotropicLinearHardeningPlasticityBehaviourData&); /* integration data is declared friend to access driving variables at the beginning of the time step */ friend class IsotropicLinearHardeningPlasticityIntegrationData; static constexpr unsigned short TVectorSize = N; typedef tfel::math::StensorDimeToSize StensorDimeToSize; static constexpr unsigned short StensorSize = StensorDimeToSize::value; typedef tfel::math::TensorDimeToSize TensorDimeToSize; static constexpr unsigned short TensorSize = TensorDimeToSize::value; using ushort = unsigned short; using Types = tfel::config::Types; using real = typename Types::real; using time = typename Types::time; using length = typename Types::length; using frequency = typename Types::frequency; using stress = typename Types::stress; using strain = typename Types::strain; using strainrate = typename Types::strainrate; using stressrate = typename Types::stressrate; using temperature = typename Types::temperature; using thermalexpansion = typename Types::thermalexpansion; using thermalconductivity = typename Types::thermalconductivity; using massdensity = typename Types::massdensity; using energydensity = typename Types::energydensity; using TVector = typename Types::TVector; using Stensor = typename Types::Stensor; using Stensor4 = typename Types::Stensor4; using FrequencyStensor = typename Types::FrequencyStensor; using ForceTVector = typename Types::ForceTVector; using StressStensor = typename Types::StressStensor; using StressRateStensor = typename Types::StressRateStensor; using DisplacementTVector = typename Types::DisplacementTVector; using StrainStensor = typename Types::StrainStensor; using StrainRateStensor = typename Types::StrainRateStensor; using StiffnessTensor = typename Types::StiffnessTensor; using Tensor = typename Types::Tensor; using FrequencyTensor = typename Types::FrequencyTensor; using StressTensor = typename Types::StressTensor; using ThermalExpansionCoefficientTensor = typename Types::ThermalExpansionCoefficientTensor; using DeformationGradientTensor = typename Types::DeformationGradientTensor; using DeformationGradientRateTensor = typename Types::DeformationGradientRateTensor; using TemperatureGradient = typename Types::TemperatureGradient; using HeatFlux = typename Types::HeatFlux; using TangentOperator = StiffnessTensor; using PhysicalConstants = tfel::PhysicalConstants; protected: StrainStensor eto; StressStensor sig; #line 17 "IsotropicLinearHardeningPlasticity.mfront" stress young; #line 19 "IsotropicLinearHardeningPlasticity.mfront" real nu; #line 21 "IsotropicLinearHardeningPlasticity.mfront" stress H; #line 23 "IsotropicLinearHardeningPlasticity.mfront" stress s0; #line 26 "IsotropicLinearHardeningPlasticity.mfront" StrainStensor eel; #line 28 "IsotropicLinearHardeningPlasticity.mfront" strain p; temperature T; public: /*! * \brief Default constructor */ IsotropicLinearHardeningPlasticityBehaviourData() {} /*! * \brief Copy constructor */ IsotropicLinearHardeningPlasticityBehaviourData(const IsotropicLinearHardeningPlasticityBehaviourData& src) : eto(src.eto), sig(src.sig) , young(src.young), nu(src.nu), H(src.H), s0(src.s0), eel(src.eel), p(src.p), T(src.T) {} /* * \brief constructor for the Generic interface * \param[in] mgb_d: behaviour data */ IsotropicLinearHardeningPlasticityBehaviourData(const mfront::gb::BehaviourData& mgb_d) : young(mgb_d.s1.material_properties[0]), nu(mgb_d.s1.material_properties[1]), H(mgb_d.s1.material_properties[2]), s0(mgb_d.s1.material_properties[3]), eel(&mgb_d.s0.internal_state_variables[0]), p(mgb_d.s0.internal_state_variables[StensorSize]), T(mgb_d.s0.external_state_variables[0]) { } /* * \brief Assignement operator */ IsotropicLinearHardeningPlasticityBehaviourData& operator=(const IsotropicLinearHardeningPlasticityBehaviourData& src){ this->eto = src.eto; this->sig = src.sig; this->young = src.young; this->nu = src.nu; this->H = src.H; this->s0 = src.s0; this->eel = src.eel; this->p = src.p; this->T = src.T; return *this; } void exportStateData(mfront::gb::State& mbg_s1) const { using namespace tfel::math; tfel::fsalgo::copy::exe(this->sig.begin(), mbg_s1.thermodynamic_forces); tfel::fsalgo::copy::exe(this->eel.begin(), mbg_s1.internal_state_variables); mbg_s1.internal_state_variables[StensorSize] = this->p; } // end of exportStateData }; // end of IsotropicLinearHardeningPlasticityBehaviourDataclass template std::ostream& operator <<(std::ostream& os,const IsotropicLinearHardeningPlasticityBehaviourData& b) { os << "εᵗᵒ : " << b.eto << '\n'; os << "σ : " << b.sig << '\n'; os << "young : " << b.young << '\n'; os << "nu : " << b.nu << '\n'; os << "H : " << b.H << '\n'; os << "s0 : " << b.s0 << '\n'; os << "eel : " << b.eel << '\n'; os << "p : " << b.p << '\n'; os << "T : " << b.T << '\n'; return os; } } // end of namespace material } // end of namespace tfel #endif /* LIB_TFELMATERIAL_ISOTROPICLINEARHARDENINGPLASTICITY_BEHAVIOUR_DATA_HXX */