1 /*!
2  * \file  mfront/src/RungeKuttaDSL.cxx
3  * \brief
4  * \author Thomas Helfer
5  * \brief 18 févr. 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 #include"MFront/RungeKuttaDSL.hxx"
15 
16 namespace mfront{
17 
RungeKuttaDSL()18   RungeKuttaDSL::RungeKuttaDSL()
19   {
20     const auto h = ModellingHypothesis::UNDEFINEDHYPOTHESIS;
21     this->mb.setDSLName("RungeKutta");
22     // input variables
23     this->mb.declareAsASmallStrainStandardBehaviour();
24     // Default state variable
25     VariableDescription eel("StrainStensor","eel",1u,0u);
26     eel.description = "elastic strain";
27     this->mb.addStateVariable(h,eel);
28     this->mb.setGlossaryName(h,"eel","ElasticStrain");
29     // driving variables
30     for(const auto& v: this->mb.getMainVariables()){
31       const auto& dv = v.first;
32       this->mb.addLocalVariable(h,VariableDescription(dv.type,dv.name+"_",1u,0u));
33       this->mb.addLocalVariable(h,VariableDescription(SupportedTypes::getTimeDerivativeType(dv.type),
34 						 "d"+dv.name+"_",1u,0u));
35     }
36   } // end of RungeKuttaDSL::RungeKuttaDSL
37 
getName()38   std::string RungeKuttaDSL::getName()
39   {
40     return "RungeKutta";
41   }
42 
getDescription()43   std::string RungeKuttaDSL::getDescription()
44   {
45     return "this dsl provides a generic integrator based on one of the many "
46            "Runge-Kutta algorithm. Avalailable algorithms are 'euler', 'rk2', 'rk4' "
47            "'r42', 'rk54' and 'rkCastem'";
48   } // end of RungeKuttaDSL::getDescription
49 
50   RungeKuttaDSL::~RungeKuttaDSL() = default;
51 
52 } // end of namespace mfront
53 
54