1 /*! 2 * \file mtest/include/MTest/CastemEvolution.hxx 3 * \brief 4 * \author Thomas Helfer 5 * \brief 05 avril 2013 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_MTEST_MTESTCASTEMEVOLUTION_HXX 15 #define LIB_MTEST_MTESTCASTEMEVOLUTION_HXX 16 17 #include <map> 18 #include <string> 19 #include <vector> 20 #include <memory> 21 #include "TFEL/System/ExternalFunctionsPrototypes.hxx" 22 #include "MTest/Config.hxx" 23 #include "MTest/Types.hxx" 24 #include "MTest/Evolution.hxx" 25 26 namespace mtest { 27 28 /*! 29 * An evolution defined by a castem fonction 30 */ 31 struct MTEST_VISIBILITY_EXPORT CastemEvolution : public Evolution { 32 /*! 33 * \brief constructor 34 * \param[in] l : library 35 * \param[in] f : function 36 * \param[in] evm_ : externally defined evolutions 37 * \param[in] vm_ : externally defined values 38 */ 39 CastemEvolution(const std::string&, 40 const std::string&, 41 const EvolutionManager&); 42 real operator()(const real) const override; 43 bool isConstant() const override; 44 void setValue(const real) override; 45 void setValue(const real, const real) override; 46 //! destructor 47 ~CastemEvolution() override; 48 49 protected: 50 //! externally defined evolutions 51 const EvolutionManager& evm; 52 //! the castem function 53 tfel::system::CastemFunctionPtr f; 54 //! names of the variables 55 std::vector<std::string> vnames; 56 //! arguments send to the Cast3M function 57 mutable std::vector<real> args; 58 }; 59 60 } // end of namespace mtest 61 62 #endif /* LIB_MTEST_MTESTCASTEMEVOLUTION_HXX */ 63