1 /*!
2  * \file   mfront/src/DefaultDSL.cxx
3  * \brief
4  * \author Thomas Helfer
5  * \date   08 nov 2006
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<string>
15 #include<fstream>
16 #include<stdexcept>
17 
18 #include"MFront/AbstractBehaviourInterface.hxx"
19 #include"MFront/BehaviourInterfaceFactory.hxx"
20 #include"MFront/DefaultDSL.hxx"
21 
22 namespace mfront{
23 
DefaultDSL()24   DefaultDSL::DefaultDSL() {
25     this->mb.setDSLName("Default");
26     this->registerNewCallBack("@RequireStiffnessTensor",
27 			      &DefaultDSL::treatRequireStiffnessOperator);
28     this->mb.declareAsASmallStrainStandardBehaviour();
29   }
30 
getDescription()31   std::string DefaultDSL::getDescription() {
32     return "this parser is the most generic one as it does not make any restriction "
33            "on the behaviour or the integration method that may be used";
34   } // end of DefaultDSL::getDescription
35 
getName()36   std::string DefaultDSL::getName() { return "DefaultDSL"; }
37 
getBehaviourDSLDescription() const38   BehaviourDSLDescription DefaultDSL::getBehaviourDSLDescription() const {
39     auto d = mfront::getDefaultStrainBasedBehaviourDSLDescription();
40     d.integrationScheme = IntegrationScheme::USERDEFINEDSCHEME;
41     d.typicalCodeBlocks = {BehaviourData::ComputePredictionOperator,
42                            BehaviourData::Integrator,
43                            BehaviourData::ComputeTangentOperator};
44     d.minimalMFrontFileBody = "@Integrator{}\n\n";
45     return d;
46   }  // end of DefaultDSL::getBehaviourDSLDescription
47 
48   DefaultDSL::~DefaultDSL() = default;
49 
50 } // end of namespace mfront
51