tfel
Loading...
Searching...
No Matches
mfront::MaterialPropertyDSL Struct Reference

domain specific language handling material properties More...

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

Inheritance diagram for mfront::MaterialPropertyDSL:
mfront::DSLBase mfront::AbstractDSL tfel::utilities::CxxTokenizer tfel::utilities::CxxTokenizerOptions

Public Member Functions

 MaterialPropertyDSL (const DSLOptions &)
 constructor
virtual const MaterialPropertyDescription & getMaterialPropertyDescription () const
DSLTarget getTargetType () const final
void overrideByAParameter (const std::string &, const double) final
 specify that the given variable must be overriden by a parameter.
const MaterialKnowledgeDescription & getMaterialKnowledgeDescription () const override
std::string getMaterialKnowledgeIdentifier () const override
std::string getMaterialName () const override
std::string getOverridableVariableNameByExternalName (const std::string &) const override
std::map< std::string, double > getOverridenParameters () const override
void getKeywordsList (std::vector< std::string > &) const override
 return the list of keywords usable with this parser
void setInterfaces (const std::set< std::string > &) override
 set list of interfaces
void analyseFile (const std::string &, const std::vector< std::string > &={}, const std::map< std::string, std::string > &={}) override
 analyse a file
void analyseString (const std::string &) override
 analyse the specified string.
void importFile (const std::string &, const std::vector< std::string > &, const std::map< std::string, std::string > &) override
 import a file
void endsInputFileProcessing () override
 method called at the end of the input file processing.
void makeConsistencyChecks () const override
 method called after processing the input file processing.
 ~MaterialPropertyDSL () override
 destructor
Public Member Functions inherited from mfront::DSLBase
std::vector< DSLOptionDescription > getDSLOptions () const override
const FileDescription & getFileDescription () const final
const TargetsDescription & getTargetsDescription () const override
virtual void openFile (const std::string &, const std::vector< std::string > &, const std::map< std::string, std::string > &)
 open a file and add given external instructions at the beginning
Public Member Functions inherited from mfront::AbstractDSL
virtual ~AbstractDSL ()
 destructor
Public Member Functions inherited from tfel::utilities::CxxTokenizer
 CxxTokenizer ()
 default constructor
 CxxTokenizer (const CxxTokenizerOptions &)
 constructor with options
 CxxTokenizer (const std::string &)
 constructor from a file
 CxxTokenizer (const std::string &, const CxxTokenizerOptions &)
 constructor from a file
template<typename InputIterator>
void import (const InputIterator, const InputIterator)
 import the specified tokens
void parseString (const std::string &)
 analyse the string given all previous tokens are erased
void openFile (const std::string &)
 import the specified file
void printFileTokens (std::ostream &) const
 print the stored tokens to the specified stream
void setCStyleCommentOpened (const bool)
 assume that a C-style comment was opened at the beginning of the processing. This is usefull when parsing a file line by line
bool isCStyleCommentOpened () const
void setRawStringOpened (const bool)
 assume that a raw string was opened at the beginning of the processing.
void setRawStringDelimiter (std::string_view)
 set the raw string deliminter. This assume that a raw string was opened at the beginning of the processing, i.e. sets the rawStringOpened boolean to true.
bool isRawStringOpened () const
std::string getCurrentRawStringDelimiter () const noexcept
void stripComments ()
 remove all comment tokens
void clear ()
 clear the object
void treatCharAsString (const bool)
 set if char tokens shall be treated as string tokens
void keepCommentBoundaries (const bool)
 set if the comment boundaries must be left in the resulting tokens.
void treatDotAsSeparator (const bool)
 set if '.' shall be treated as as sperator
void treatPlusAsSeparator (const bool)
 set if '+' shall be treated as as sperator
void treatMinusAsSeparator (const bool)
 set if '-' shall be treated as as sperator
void mergeStrings (const bool)
 set if successive strings shall be merged
void extractNumbers (const bool)
 set if tokens shall be split to extract numbers
void addSeparator (const std::string &)
 add a new separator
void substitute (const std::map< std::string, std::string > &)
 apply the given substitutions by calling replace_all on the values hold by the standard and string tokens.
bool empty () const
const_iterator begin () const
const_iterator end () const
const_iterator cbegin () const
const_iterator cend () const
const Token & operator[] (const size_type) const
size_type size () const
virtual ~CxxTokenizer ()
 destructor

Static Public Member Functions

static std::string getName ()
static std::string getDescription ()
Static Public Member Functions inherited from mfront::DSLBase
static tfel::utilities::DataMapValidator getDSLOptionsValidator ()
Static Public Member Functions inherited from tfel::utilities::CxxTokenizer
static bool isValidIdentifier (std::string_view, const IsValidIdentifierOptions &)
static bool isValidIdentifier (std::string_view, const bool=true)
static void checkNotEndOfLine (const std::string &, const_iterator &, const const_iterator)
 an helper method throwing an exception if the given iterator is egal to the third argument (which shall point after the last token of the line)
static void checkNotEndOfLine (const std::string &, const std::string &, const_iterator &, const const_iterator)
 an helper method throwing an exception if the given iterator is egal to the fourth argument (which shall point after the last token of the line)
static void readSpecifiedToken (const std::string &, const std::string &, const_iterator &, const const_iterator)
 an helper method throwing an exception if the given iterator is egal to the fourth argument (which shall point after the last token of the line) or if the given token is not equal to the expected value
static unsigned int readUnsignedInt (const_iterator &, const const_iterator)
 an helper method to extract an unsigned int from the given token
static std::string readString (const_iterator &, const const_iterator)
 an helper method to extract a string from the given token
static std::vector< std::string > readArray (const std::string &, const_iterator &, const const_iterator)
 an helper method to extract a set of values from the given as an array
static void readArray (const std::string &, std::vector< std::string > &, const_iterator &, const const_iterator)
 an helper method to extract a set of values from the given as an array
static std::vector< Token > readList (const std::string &, const std::string &, const std::string &, const_iterator &, const const_iterator)
 extract a list of token
static void readList (std::vector< Token > &, const std::string &, const std::string &, const std::string &, const_iterator &, const const_iterator)
 extract a list of token
static std::vector< std::string > readStringArray (const_iterator &, const const_iterator)
 an helper method to extract a set of values from the given as an array
static double readDouble (const_iterator &, const const_iterator)
 an helper method to extract a double from the given token
static int readInt (const_iterator &, const const_iterator)
 an helper method to extract a int from the given token

Protected Types

typedef void(MaterialPropertyDSL::* MemberFuncPtr) ()
typedef std::map< std::string, MemberFuncPtr > CallBackContainer

Protected Member Functions

void reserveName (const std::string &) final
 register a name.
DSLOptions buildDSLOptions () const override
std::map< std::string, int > getIntegerConstants () const override
bool useQt () const override
void disableQuantitiesUsageIfNotAlreadySet () override
 disable the usage of quantities if not already set
void addExternalMFrontFile (const std::string &, const std::vector< std::string > &, const tfel::utilities::DataMap &) override
 add a dependency to an external MFront file
void treatUnknownKeyword () override
 treat an unknown keyword
bool isNameReserved (const std::string &) const override
 look if a name is reserved
std::string getClassName () const override
void addMaterialLaw (const std::string &) override
 add a material law
void appendToIncludes (const std::string &) override
 append the given code to the includes
void appendToMembers (const std::string &) override
 append the given code to the members
void appendToPrivateCode (const std::string &) override
 append the given code to the private code
void appendToSources (const std::string &) override
 append the given code to the sources
void generateOutputFiles () override
 treat the specified file.
void addStaticVariableDescription (const StaticVariableDescription &) override
 add a static variable description
int getIntegerConstant (const std::string &) const override
void setUnitSystem (const std::string_view) override
 set the unit system
void setMaterial (const std::string &) override
 set the material described by the implementation
void setMaterialKnowledgeIdentifier (const std::string &) override
 set the name of the implementation, i.e. the material property' name, the behaviour' name or the model' name.
virtual void analyse ()
 method called by the analyseFile and analyseString method
virtual void addInterface (const std::string &)
 add a new interface
virtual void treatUseQt ()
 treat the UseQt keyword
virtual void treatLibrary ()
 treat the @Library keyword
virtual void treatOutput ()
 treat the @Output keyword
virtual void treatInput ()
 treat the @Input keyword
virtual void treatLaw ()
 treat the @Law keyword
virtual void treatFunction ()
 treat the @Function keyword
virtual void treatData ()
 treat the @Data keyword
void treatDataWithoutInput ()
 auxiliary method to treat constant data
void treatDataWithOneInput ()
 auxiliary method to treat data for one input
virtual void treatMethod ()
virtual void treatInterface ()
 treat the @Interface keyword
virtual void treatParameter ()
 treat the @Parameter keyword
virtual void treatConstant ()
 treat the @Constant keyword
virtual void treatBounds ()
 treat the @Bounds keyword
virtual void treatPhysicalBounds ()
 treat the @PhysicalBounds keyword
virtual void doPedanticChecks () const
 perform pedantic checks
void registerNewCallBack (const std::string &, const MemberFuncPtr)
void finalizeVariablesDeclaration ()
 method that shall be called when all variables are declared.
Protected Member Functions inherited from mfront::DSLBase
 DSLBase (const DSLOptions &)
 constructor
virtual void overrideMaterialKnowledgeIdentifier (const std::string &)
 specify the name of the implementation before parsing the MFront source file. Any name specified in the MFront file, through the @Law, @Behaviour or @Model keywords, will be ignored.
virtual void overrideMaterialName (const std::string &)
 specify the name of the material before parsing the MFront source file. Any material name specified with the @Material keyword will be ignored.
virtual void overrideAuthorName (const std::string &)
 specify the name of the author before parsing the MFront source file. Any author' name specified with the @Author keyword will be ignored.
virtual void overrideDate (const std::string &)
 specify the date of the MFront implementation before parsing the MFront source file. Any date specified with the @Date keyword will be ignored.
virtual void overrideDescription (const std::string &)
 specify the description of the MFront implementation before parsing the MFront source file. Any description specified with the @Description keyword will be ignored.
virtual void overrideUnitSystem (const std::string &)
 specify the unit system of the MFront implementation before parsing the MFront source file. Any unit system specified with the @UnitSystem keyword will be ignored.
void checkNotEndOfFile (const std::string &, const std::string &="") const
 check that the end of file in not reached yet
void readSpecifiedToken (const std::string &, const std::string &)
 read a specified token and advance to the next token
void throwRuntimeError (const std::string &, const std::string &) const
 throw an std::runtime_error
std::string readUntilEndOfInstruction ()
unsigned short readUnsignedShort (const std::string &)
void readNextBlock (CodeBlock &, CodeBlock &, const CodeBlockParserOptions &, const CodeBlockParserOptions &)
 parse the next code block twice.
CodeBlock readNextBlock (const CodeBlockParserOptions &)
std::string readOnlyOneToken ()
 read one token and increment "current"
template<typename T>
std::pair< bool, T > readInitialisationValue (const std::string &, const bool)
virtual SupportedTypes::TypeParsingOptions getTypeParsingOptions () const
 return the type parsing options used by the DSL
std::string readType ()
 read a C++ type
std::optional< std::string > readVariableTypeIfPresent ()
 read a C++ type if present
bool readSafeOptionTypeIfPresent ()
unsigned int readArrayOfVariablesSize (const std::string &, const bool)
void readVarList (VariableDescriptionContainer &, const std::string &, const bool)
void readVarList (VariableDescriptionContainer &, const bool)
bool readBooleanValue (const std::string &)
std::string readString (const std::string &)
std::vector< std::string > readArrayOfString (const std::string &)
std::vector< double > readArrayOfDouble (const std::string &)
std::vector< std::string > readStringOrArrayOfString (const std::string &)
void readList (std::vector< tfel::utilities::Token > &, const std::string &, const std::string &, const std::string &, const bool)
 extract a list of token
std::vector< tfel::utilities::Token > readList (const std::string &, const std::string &, const std::string &, const bool)
std::string readSpecifiedValue (const std::string &, const std::string &)
std::vector< std::string > readSpecifiedValues (const std::string &, const std::string &, const std::string &)
std::vector< std::string > readSpecifiedValues (const std::string &, const std::vector< std::string > &)
std::pair< std::string, VariableBoundsDescription > readVariableBounds ()
 read the bounds associated to a variable
virtual void callMFront (const std::vector< std::string > &, const std::vector< std::string > &, const tfel::utilities::DataMap &)
virtual std::shared_ptr< MaterialPropertyDescription > handleMaterialPropertyDescription (const std::string &)
 This function handles a material property treated as a dependency of the current file.
virtual void setAuthor (const std::string &)
 set the author of the implementation
virtual void setDate (const std::string &)
 set the date at which the implementation has been written
virtual void setDescription (const std::string &)
 set the description of the MFront file
virtual void treatMaterial ()
 treat the @Material keyword
virtual void treatUnitSystem ()
 treat the @UnitSystem keyword
virtual void treatMFront ()
 handle the @MFront keyword
virtual void treatImport ()
 handle the @Import keyword
virtual void treatMaterialLaw ()
 handle the @MaterialLaw keyword
virtual void treatLink ()
 handle the @Link keyword
virtual void treatTFELLibraries ()
 handle the @TFELLibraries keyword
virtual void treatAuthor ()
 handle the @Author keyword
virtual void treatDate ()
 handle the @Data keyword
virtual void treatIncludes ()
 handle the @Includes keyword
virtual void treatSources ()
 handle the @Sources keyword
virtual void treatPrivate ()
 handle the @Private keyword
virtual void treatMembers ()
 handle the @Members keyword
virtual void treatDSL ()
 handle the @DSL or @Parser keyword
virtual void treatStaticVar ()
 handle the @StaticVar keyword
virtual void treatIntegerConstant ()
 handle the @IntegerConstant keyword
virtual void treatDescription ()
 handle the @Description keyword
virtual void treatLonelySeparator ()
 handle the @LonelySeparator keyword
virtual void ignoreKeyWord (const std::string &)
virtual void completeTargetsDescription ()
 this method must be called at the end of the treatment:
virtual void registerIntegerConstant (const std::string &, const size_t, const int)
 register an integer constant.
double readDouble ()
 extract a double from the current token
 ~DSLBase () override
 destructor
Protected Member Functions inherited from tfel::utilities::CxxTokenizer
virtual void parseStream (std::istream &, Token::size_type &, const std::string &)
 tokenize the lines of a stream
virtual void splitLine (const std::string &, const Token::size_type)
virtual void parseChar (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type)
virtual void parseString (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type, const char)
virtual void parseCComment (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type)
virtual void parseCxxComment (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type)
virtual void try_join (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type, const char)
virtual void try_join (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type, const char, const char)
virtual void parseNumber (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type)
 read a number
virtual void parsePreprocessorDirective (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const std::string::const_iterator, const Token::size_type)
virtual void parseStandardLine (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const std::string::const_iterator, const Token::size_type)
virtual void parseRawString (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type, const Token::size_type)
 read the contents of a raw string literal, which starts at the current iterator, past the opening R"delim( prefix
Protected Member Functions inherited from tfel::utilities::CxxTokenizerOptions
 CxxTokenizerOptions ()
 default constructor
 CxxTokenizerOptions (const CxxTokenizerOptions &)
 copy constructor
 CxxTokenizerOptions (CxxTokenizerOptions &&) noexcept
 move constructor
CxxTokenizerOptions & operator= (const CxxTokenizerOptions &)
 standard assignement
CxxTokenizerOptions & operator= (CxxTokenizerOptions &&) noexcept
 move assignement
 ~CxxTokenizerOptions ()
 destructor

Protected Attributes

MaterialPropertyDescription md
 description of the material property
std::map< std::string, double > overriding_parameters
 overriding parameters
std::map< std::string, std::shared_ptr< AbstractMaterialPropertyInterface > > interfaces
 list of registred interfaces
std::set< std::string > registredKeyWords
 list of resgistred keywords
CallBackContainer callBacks
 map of callbacks used during the file interpretation
std::string currentVar
Protected Attributes inherited from mfront::DSLBase
FileDescription fd
 description of the file treated
TargetsDescription td
 main targets description
std::vector< std::string > ldflags
 additional linker flags
std::vector< std::string > additional_libraries_sources
 additional libraries's sources
std::vector< std::string > link_libraries
 additional link libraries
std::vector< std::string > link_directories
 additional link directories
std::vector< TargetsDescription > atds
 auxiliary target descriptions
TokensContainer::const_iterator current
 current position in the input stream
std::string currentComment
 current comment This is the user comment associated with the current keyword, if any.
std::string overriden_implementation_name
 overriden implementation name
std::string overriden_material
 overriden material
std::string overriden_author
 overriden author
std::string overriden_date
 overriden date
std::string overriden_description
 overriden description
std::string overriden_unit_system
 overriden unit system
Protected Attributes inherited from tfel::utilities::CxxTokenizer
std::vector< std::string > additional_separators
TokensContainer tokens
 list of tokens read
std::map< Token::size_type, std::string > comments
 store the comments which have been removed by the stripComments method. The key of the map is the line a comment starts on and the value is the values of the comments of this line, in the order they appear in the line, separated by a space character.
bool cStyleCommentOpened = false
 if true, a cStyle comment what opened when the last line treatment was finised
bool rawStringOpened = false
std::string currentRawStringDelimiter
 name of the current delimiter for a raw string
Protected Attributes inherited from tfel::utilities::CxxTokenizerOptions
bool bKeepCommentBoundaries = false
 if true, keep the comment boundaries
bool shallMergeStrings = false
 if true, successive strings are merged
bool allowStrayHashCharacter = false
 allow stray hash character
bool treatHashCharacterAsCommentDelimiter = false
 the hash character can start a comment, as in python, shell, etc..
bool allowStrayBackSlash = false
 allow stray backslash
bool treatPreprocessorDirectives = true
 treat preprocessor directives
bool treatStrings = true
 treat strings and characters If false, the ' and '"' are treated as indivdual tokens
bool treatNumbers = true
 extract number
bool treatCComments = true
 treat comments
bool treatCxxComments = true
 treat comments
bool joinCxxTwoCharactersSeparators = true
bool graveAccentAsSeparator = true
 strings and characters
bool charAsString = false
bool dotAsSeparator = true
 treat . as a separator
bool plusAsSeparator = true
 treat + as a separator
bool minusAsSeparator = true
 treat - as a separator
bool addCurlyBraces = false
 add curly braces at the beginning and at the end of the file

Additional Inherited Members

Public Types inherited from mfront::AbstractDSL
enum  DSLTarget { MATERIALPROPERTYDSL , BEHAVIOURDSL , MODELDSL }
 list of dsl targets
using DSLOptions = tfel::utilities::DataMap
 a simple alias
Public Types inherited from tfel::utilities::CxxTokenizer
using TokensContainer = std::vector<Token>
 a simple alias
using const_iterator = TokensContainer::const_iterator
 a simple alias
using size_type = TokensContainer::size_type
 a simple alias
Static Public Attributes inherited from mfront::DSLBase
static const char *const defaultOutOfBoundsPolicyOption
 standard option name
static const char *const runtimeModificationOfTheOutOfBoundsPolicyOption
 standard option name
static const char *const parametersAsStaticVariablesOption
 standard option name
static const char *const initializationFromFileOption
 standard option name
static const char *const validatorOption
 standard option name
static const char *const buildIdentifierOption
 standard option name
static const char *const overridingParameters
 standard option
static const char *const disableRuntimeChecksOption
 standard option name
static const char *const compatibilityModeOption
 standard option name
Static Protected Member Functions inherited from mfront::DSLBase
static std::vector< std::string > getDefaultReservedNames ()
static void handleDSLOptions (MaterialKnowledgeDescription &, const DSLOptions &)
 handle DSL options
static DSLOptions buildCommonDSLOptions (const MaterialKnowledgeDescription &)
 extract common options
Static Protected Member Functions inherited from tfel::utilities::CxxTokenizer
static bool isValidFunctionIdentifier (const std::string &, const bool=true)

Detailed Description

domain specific language handling material properties

Constructor & Destructor Documentation

◆ MaterialPropertyDSL()

mfront::MaterialPropertyDSL::MaterialPropertyDSL ( const DSLOptions & )
explicit

constructor

Parameters
[in]optsoptions passed to the DSL

Member Function Documentation

◆ addExternalMFrontFile()

void mfront::MaterialPropertyDSL::addExternalMFrontFile ( const std::string & ,
const std::vector< std::string > & ,
const tfel::utilities::DataMap &  )
overrideprotectedvirtual

add a dependency to an external MFront file

Parameters
[in]ffile path
[in]interfaceslist of interfaces used to treat the file

Implements mfront::DSLBase.

◆ addInterface()

virtual void mfront::MaterialPropertyDSL::addInterface ( const std::string & )
protectedvirtual

add a new interface

Parameters
[in]ninterface name

◆ addMaterialLaw()

void mfront::MaterialPropertyDSL::addMaterialLaw ( const std::string & )
overrideprotectedvirtual

add a material law

Parameters
[in]m: added material law name

Implements mfront::DSLBase.

◆ addStaticVariableDescription()

void mfront::MaterialPropertyDSL::addStaticVariableDescription ( const StaticVariableDescription & )
overrideprotectedvirtual

add a static variable description

Parameters
[in]v: variable description

Implements mfront::DSLBase.

◆ analyseFile()

void mfront::MaterialPropertyDSL::analyseFile ( const std::string & ,
const std::vector< std::string > & = {},
const std::map< std::string, std::string > & = {} )
overridevirtual

analyse a file

Parameters
[in]f: file name
[in]ecmds: additionnal commands inserted treated before the input file commands (those commands are given through the --@?? option of the command line
[in]s: substitutions patterns inserted (those substitutions are given through command-line options such as --@YYY@=XXX)

Implements mfront::AbstractDSL.

◆ analyseString()

void mfront::MaterialPropertyDSL::analyseString ( const std::string & )
overridevirtual

analyse the specified string.

Parameters
[in]s: analysed a string

Implements mfront::AbstractDSL.

◆ appendToIncludes()

void mfront::MaterialPropertyDSL::appendToIncludes ( const std::string & )
overrideprotectedvirtual

append the given code to the includes

Implements mfront::DSLBase.

◆ appendToMembers()

void mfront::MaterialPropertyDSL::appendToMembers ( const std::string & )
overrideprotectedvirtual

append the given code to the members

Implements mfront::DSLBase.

◆ appendToPrivateCode()

void mfront::MaterialPropertyDSL::appendToPrivateCode ( const std::string & )
overrideprotectedvirtual

append the given code to the private code

Implements mfront::DSLBase.

◆ appendToSources()

void mfront::MaterialPropertyDSL::appendToSources ( const std::string & )
overrideprotectedvirtual

append the given code to the sources

Implements mfront::DSLBase.

◆ buildDSLOptions()

DSLOptions mfront::MaterialPropertyDSL::buildDSLOptions ( ) const
nodiscardoverrideprotectedvirtual

Implements mfront::DSLBase.

◆ disableQuantitiesUsageIfNotAlreadySet()

void mfront::MaterialPropertyDSL::disableQuantitiesUsageIfNotAlreadySet ( )
overrideprotectedvirtual

disable the usage of quantities if not already set

Implements mfront::DSLBase.

◆ endsInputFileProcessing()

void mfront::MaterialPropertyDSL::endsInputFileProcessing ( )
overridevirtual

method called at the end of the input file processing.

Note
This method shall be called after the analyseFile or analyseString methods.

Implements mfront::AbstractDSL.

◆ finalizeVariablesDeclaration()

void mfront::MaterialPropertyDSL::finalizeVariablesDeclaration ( )
protected

method that shall be called when all variables are declared.

This method overrides variables by parameters

◆ generateOutputFiles()

void mfront::MaterialPropertyDSL::generateOutputFiles ( )
overrideprotectedvirtual

treat the specified file.

Note
This method shall be called after the analyseFile method

Implements mfront::AbstractDSL.

◆ getClassName()

std::string mfront::MaterialPropertyDSL::getClassName ( ) const
nodiscardoverrideprotectedvirtual
Returns
the name of the generated class

Implements mfront::DSLBase.

◆ getDescription()

std::string mfront::MaterialPropertyDSL::getDescription ( )
static
Returns
a description of the parser

◆ getIntegerConstant()

int mfront::MaterialPropertyDSL::getIntegerConstant ( const std::string & ) const
nodiscardoverrideprotectedvirtual
Returns
the value of an integer constant
Parameters
[in]nvariable name

Implements mfront::DSLBase.

◆ getIntegerConstants()

std::map< std::string, int > mfront::MaterialPropertyDSL::getIntegerConstants ( ) const
nodiscardoverrideprotectedvirtual
Returns
all the integer constants (static variables of the integer type)

Implements mfront::DSLBase.

◆ getKeywordsList()

void mfront::MaterialPropertyDSL::getKeywordsList ( std::vector< std::string > & ) const
overridevirtual

return the list of keywords usable with this parser

Parameters
[out]k: the list of keywords registred for this parser

Implements mfront::AbstractDSL.

◆ getMaterialKnowledgeDescription()

const MaterialKnowledgeDescription & mfront::MaterialPropertyDSL::getMaterialKnowledgeDescription ( ) const
nodiscardoverridevirtual
Returns
the description of the considered material knowledge

Implements mfront::AbstractDSL.

◆ getMaterialKnowledgeIdentifier()

std::string mfront::MaterialPropertyDSL::getMaterialKnowledgeIdentifier ( ) const
nodiscardoverridevirtual
Returns
the identifier (material property name, behaviour name, model name) of the treated file

Implements mfront::AbstractDSL.

◆ getMaterialName()

std::string mfront::MaterialPropertyDSL::getMaterialName ( ) const
nodiscardoverridevirtual
Returns
the material described by the treated file

Implements mfront::AbstractDSL.

◆ getMaterialPropertyDescription()

virtual const MaterialPropertyDescription & mfront::MaterialPropertyDSL::getMaterialPropertyDescription ( ) const
nodiscardvirtual
Returns
the description of the material property treated by the DSL

◆ getName()

std::string mfront::MaterialPropertyDSL::getName ( )
static
Returns
the name of the parser

◆ getOverridableVariableNameByExternalName()

std::string mfront::MaterialPropertyDSL::getOverridableVariableNameByExternalName ( const std::string & ) const
nodiscardoverridevirtual
Returns
the variable name associated with the given external name
Parameters
[in]nexternal name of the quantity overridable by a parameter

Depending on the DSL's, a parameter may override a parameter, but also a material property for example.

Implements mfront::AbstractDSL.

◆ getOverridenParameters()

std::map< std::string, double > mfront::MaterialPropertyDSL::getOverridenParameters ( ) const
nodiscardoverridevirtual
Returns
the list of overriden parameters

Implements mfront::AbstractDSL.

◆ getTargetType()

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

Implements mfront::AbstractDSL.

◆ importFile()

void mfront::MaterialPropertyDSL::importFile ( const std::string & ,
const std::vector< std::string > & ,
const std::map< std::string, std::string > &  )
overridevirtual

import a file

Parameters
[in]f: file name
[in]ecmds: additionnal commands inserted treated before the input file commands
[in]s: substitutions patterns inserted (those substitutions are given through command-line options such as --@YYY@=XXX)

Implements mfront::AbstractDSL.

◆ isNameReserved()

bool mfront::MaterialPropertyDSL::isNameReserved ( const std::string & ) const
nodiscardoverrideprotectedvirtual

look if a name is reserved

Parameters
[in]n: name

Implements mfront::DSLBase.

◆ makeConsistencyChecks()

void mfront::MaterialPropertyDSL::makeConsistencyChecks ( ) const
overridevirtual

method called after processing the input file processing.

Note
This method shall be called after the endsInputFileProcessing.

Implements mfront::AbstractDSL.

◆ overrideByAParameter()

void mfront::MaterialPropertyDSL::overrideByAParameter ( const std::string & ,
const double  )
finalvirtual

specify that the given variable must be overriden by a parameter.

Parameters
[in]nvariable name
[in]vvariable value

Implements mfront::DSLBase.

◆ reserveName()

void mfront::MaterialPropertyDSL::reserveName ( const std::string & )
finalprotectedvirtual

register a name.

Parameters
[in]n: name

Implements mfront::DSLBase.

◆ setInterfaces()

void mfront::MaterialPropertyDSL::setInterfaces ( const std::set< std::string > & )
overridevirtual

set list of interfaces

Parameters
[in]inames: list of interfaces

Implements mfront::AbstractDSL.

◆ setMaterial()

void mfront::MaterialPropertyDSL::setMaterial ( const std::string & )
overrideprotectedvirtual

set the material described by the implementation

Parameters
[in]mmaterial name

Implements mfront::DSLBase.

◆ setMaterialKnowledgeIdentifier()

void mfront::MaterialPropertyDSL::setMaterialKnowledgeIdentifier ( const std::string & )
overrideprotectedvirtual

set the name of the implementation, i.e. the material property' name, the behaviour' name or the model' name.

Parameters
[in]iimplementation name

Implements mfront::DSLBase.

◆ setUnitSystem()

void mfront::MaterialPropertyDSL::setUnitSystem ( const std::string_view )
overrideprotectedvirtual

set the unit system

Parameters
[in]sunit system

Implements mfront::DSLBase.

◆ treatMethod()

virtual void mfront::MaterialPropertyDSL::treatMethod ( )
protectedvirtual

treat the setGlossaryName and the setEntryName method for inputs or output.

◆ treatUnknownKeyword()

void mfront::MaterialPropertyDSL::treatUnknownKeyword ( )
overrideprotectedvirtual

treat an unknown keyword

Reimplemented from mfront::DSLBase.

◆ useQt()

bool mfront::MaterialPropertyDSL::useQt ( ) const
nodiscardoverrideprotectedvirtual
Returns
if the usage of quantities is alllowed

Implements mfront::DSLBase.

Member Data Documentation

◆ currentVar

std::string mfront::MaterialPropertyDSL::currentVar
protected

a temporary object used to store the name of the variable on which a method is called


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