tfel
Loading...
Searching...
No Matches
mfront::AbstractBehaviourDSL Struct Referenceabstract

interface class for all domain specific languages associated with behaviours. More...

#include </home/runner/work/tfel/tfel/mfront/include/MFront/AbstractBehaviourDSL.hxx>

Inheritance diagram for mfront::AbstractBehaviourDSL:
mfront::AbstractDSL mfront::BehaviourDSLCommon mfront::BehaviourDSLBase< DefaultDSLBase > mfront::BehaviourDSLBase< ImplicitDSLBase > mfront::BehaviourDSLBase< IsotropicBehaviourDSLBase > mfront::BehaviourDSLBase< RungeKuttaDSLBase > mfront::BehaviourDSLBase< Child > mfront::DefaultDSLBase mfront::ImplicitDSLBase mfront::IsotropicBehaviourDSLBase mfront::RungeKuttaDSLBase mfront::DefaultCZMDSL mfront::DefaultDSL mfront::DefaultFiniteStrainDSL mfront::DefaultGenericBehaviourDSL mfront::DefaultModelDSL mfront::ImplicitCZMDSL mfront::ImplicitDSL mfront::ImplicitDSLII mfront::ImplicitFiniteStrainDSL mfront::ImplicitGenericBehaviourDSL mfront::ImplicitModelDSL mfront::IsotropicMisesCreepDSL mfront::IsotropicMisesPlasticFlowDSL mfront::IsotropicStrainHardeningMisesCreepDSL mfront::MultipleIsotropicMisesFlowsDSL mfront::RungeKuttaDSL mfront::RungeKuttaFiniteStrainDSL mfront::RungeKuttaGenericBehaviourDSL mfront::RungeKuttaModelDSL

Public Types

using MaterialPropertyInput = BehaviourDescription::MaterialPropertyInput
 a simple alias
using ModellingHypothesis = tfel::material::ModellingHypothesis
 a simple alias
using Hypothesis = ModellingHypothesis::Hypothesis
 a simple alias
Public Types inherited from mfront::AbstractDSL
enum  DSLTarget { MATERIALPROPERTYDSL , BEHAVIOURDSL , MODELDSL }
 list of dsl targets
using DSLOptions = tfel::utilities::DataMap
 a simple alias

Public Member Functions

 AbstractBehaviourDSL ()=default
 constructor
DSLTarget getTargetType () const final
virtual std::map< std::string, std::shared_ptr< AbstractBehaviourInterface > > getBehaviourInterfaces () const =0
virtual BehaviourDSLDescription getBehaviourDSLDescription () const =0
virtual const BehaviourDescription & getBehaviourDescription () const =0
virtual std::unique_ptr< AbstractBehaviourCodeGenerator > getCodeGenerator () const =0
virtual void addMaterialProperties (const VariableDescriptionContainer &)=0
 add the given material properties
virtual void addParameters (const VariableDescriptionContainer &)=0
 add the given parameters
virtual void addStateVariables (const VariableDescriptionContainer &)=0
 add the given state variables
virtual void addAuxiliaryStateVariables (const VariableDescriptionContainer &)=0
 add the given auxiliary state variables
virtual void addExternalStateVariables (const VariableDescriptionContainer &)=0
 add the given external state variables
virtual void addLocalVariables (const VariableDescriptionContainer &)=0
 add the given local state variables
virtual void addIntegrationVariables (const VariableDescriptionContainer &)=0
 add the given integration variables
virtual std::string getCodeBlockTemplate (const std::string &, const MFrontTemplateGenerationOptions &) const =0
virtual std::set< Hypothesis > getDefaultModellingHypotheses () const =0
virtual void writeMaterialPropertyEvaluation (std::ostream &, const BehaviourDescription::MaterialProperty &, std::function< std::string(const MaterialPropertyInput &)> &) const =0
 write the call to a material property
virtual std::shared_ptr< MaterialPropertyDescription > handleMaterialPropertyDescription (const std::string &)=0
 This function handles a material property treated as a dependency of the current file.
virtual bool isModellingHypothesisSupported (const Hypothesis) const =0
 ~AbstractBehaviourDSL () override
 destructor
Public Member Functions inherited from mfront::AbstractDSL
virtual std::vector< DSLOptionDescription > getDSLOptions () const =0
virtual const MaterialKnowledgeDescription & getMaterialKnowledgeDescription () const =0
virtual const FileDescription & getFileDescription () const =0
virtual std::string getMaterialKnowledgeIdentifier () const =0
virtual std::string getMaterialName () const =0
virtual std::string getOverridableVariableNameByExternalName (const std::string &) const =0
virtual std::map< std::string, double > getOverridenParameters () const =0
virtual void analyseFile (const std::string &, const std::vector< std::string > &, const std::map< std::string, std::string > &)=0
 analyse a file
virtual void analyseString (const std::string &)=0
 analyse the specified string.
virtual void importFile (const std::string &, const std::vector< std::string > &, const std::map< std::string, std::string > &)=0
 import a file
virtual void endsInputFileProcessing ()=0
 method called at the end of the input file processing.
virtual void makeConsistencyChecks () const =0
 method called after processing the input file processing.
virtual const TargetsDescription & getTargetsDescription () const =0
virtual void generateOutputFiles ()=0
 treat the specified file.
virtual void setInterfaces (const std::set< std::string > &)=0
 set list of interfaces
virtual void getKeywordsList (std::vector< std::string > &) const =0
 return the list of keywords usable with this parser
virtual ~AbstractDSL ()
 destructor

Detailed Description

interface class for all domain specific languages associated with behaviours.

Member Function Documentation

◆ addAuxiliaryStateVariables()

virtual void mfront::AbstractBehaviourDSL::addAuxiliaryStateVariables ( const VariableDescriptionContainer & )
pure virtual

add the given auxiliary state variables

Parameters
[in]ivsauxiliary state variables

Implemented in mfront::BehaviourDSLCommon.

◆ addExternalStateVariables()

virtual void mfront::AbstractBehaviourDSL::addExternalStateVariables ( const VariableDescriptionContainer & )
pure virtual

add the given external state variables

Parameters
[in]evsexternal state variables

Implemented in mfront::BehaviourDSLCommon.

◆ addIntegrationVariables()

virtual void mfront::AbstractBehaviourDSL::addIntegrationVariables ( const VariableDescriptionContainer & )
pure virtual

add the given integration variables

Parameters
[in]lvsintegration variables

Implemented in mfront::BehaviourDSLCommon.

◆ addLocalVariables()

virtual void mfront::AbstractBehaviourDSL::addLocalVariables ( const VariableDescriptionContainer & )
pure virtual

add the given local state variables

Parameters
[in]lvslocal state variables

Implemented in mfront::BehaviourDSLCommon.

◆ addMaterialProperties()

virtual void mfront::AbstractBehaviourDSL::addMaterialProperties ( const VariableDescriptionContainer & )
pure virtual

add the given material properties

Parameters
[in]mpsmaterial properties

Implemented in mfront::BehaviourDSLCommon.

◆ addParameters()

virtual void mfront::AbstractBehaviourDSL::addParameters ( const VariableDescriptionContainer & )
pure virtual

add the given parameters

Parameters
[in]paramsparameters

Implemented in mfront::BehaviourDSLCommon.

◆ addStateVariables()

virtual void mfront::AbstractBehaviourDSL::addStateVariables ( const VariableDescriptionContainer & )
pure virtual

add the given state variables

Parameters
[in]ivsstate variables

Implemented in mfront::BehaviourDSLCommon.

◆ getBehaviourDescription()

virtual const BehaviourDescription & mfront::AbstractBehaviourDSL::getBehaviourDescription ( ) const
nodiscardpure virtual
Returns
the behaviour description

Implemented in mfront::BehaviourDSLCommon.

◆ getBehaviourDSLDescription()

◆ getBehaviourInterfaces()

virtual std::map< std::string, std::shared_ptr< AbstractBehaviourInterface > > mfront::AbstractBehaviourDSL::getBehaviourInterfaces ( ) const
nodiscardpure virtual
Returns
the declared behaviour interfaces

Implemented in mfront::BehaviourDSLCommon.

◆ getCodeBlockTemplate()

◆ getCodeGenerator()

◆ getDefaultModellingHypotheses()

virtual std::set< Hypothesis > mfront::AbstractBehaviourDSL::getDefaultModellingHypotheses ( ) const
nodiscardpure virtual
Returns
the list of hypothesis a priori supported by the parser.

To enable other hypothesis or restrict the hypotheses supported, the user must use the @ModellingHypothesis or @ModellingHypotheses keywords.

Implemented in mfront::BehaviourDSLCommon.

◆ getTargetType()

DSLTarget mfront::AbstractBehaviourDSL::getTargetType ( ) const
nodiscardfinalvirtual
Returns
the target of the dsl

Implements mfront::AbstractDSL.

◆ handleMaterialPropertyDescription()

virtual std::shared_ptr< MaterialPropertyDescription > mfront::AbstractBehaviourDSL::handleMaterialPropertyDescription ( const std::string & )
nodiscardpure virtual

This function handles a material property treated as a dependency of the current file.

This function:

  • analyse the given file using the MaterialPropertyDSL
  • register the function name generated by the MFront interface
  • add the function name to the list of material laws used by the current file
  • declared the headers generated by the MFront interface for inclusion
  • launch mfront in a sub-process to generate the source files associated with this material property and have them compiled when mandatory (done by the callMFront method).
Parameters
[in]f: file in which the material law is implemented. This must be the full path.

Implemented in mfront::BehaviourDSLCommon.

◆ isModellingHypothesisSupported()

virtual bool mfront::AbstractBehaviourDSL::isModellingHypothesisSupported ( const Hypothesis ) const
nodiscardpure virtual
Returns
true if the given modelling hypothesis is handled by the parser

Some parsers have restrictions on the modelling hypotheses supported. For example, the isotropic behaviours were not able to handle plane stress hypotheses when this comment was written(but it was planned, so this comment may be outdated now).

The fact that this method returns true means that the user can provide code to support this modelling hypothesis. For example, to support plane stress in RungeKutta and Implicit parsers, the user must provide some hand-crafted code. He must enable this modelling hypothesis by calling explicitely @ModellingHypothesis or @ModellingHypotheses keywords.

Implemented in mfront::BehaviourDSLCommon.

◆ writeMaterialPropertyEvaluation()

virtual void mfront::AbstractBehaviourDSL::writeMaterialPropertyEvaluation ( std::ostream & ,
const BehaviourDescription::MaterialProperty & ,
std::function< std::string(const MaterialPropertyInput &)> &  ) const
pure virtual

write the call to a material property

Parameters
[out]outoutput stream
[in]mmaterial property description
[in]ffunction converting input variable name. The function f can be used to specify how evaluate a variable value. For example, if we want to evaluate the variable name 'V' at the end of the time step, we could make f return V+dV

Implemented in mfront::BehaviourDSLCommon.


The documentation for this struct was generated from the following file: