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

class describing a model More...

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

Inheritance diagram for mfront::ModelDescription:
mfront::MaterialKnowledgeDescription

Classes

struct  Function
 a model may contain several function More...

Public Member Functions

std::pair< std::string, unsigned short > decomposeVariableName (const std::string &) const
 decompose a variable name to get the basis and the depth of the variable
 ModelDescription ()
 defaut constructor
 ModelDescription (const ModelDescription &)
 copy constructor
 ModelDescription (ModelDescription &&) noexcept
 move constructor
ModelDescription & operator= (const ModelDescription &)
 assignement operator
ModelDescription & operator= (ModelDescription &&) noexcept
 move assignement operator
const VariableDescription & getVariableDescription (const std::string &) const
void setGlossaryName (const std::string &, const std::string &)
 associate a glossary name to a variable
void setEntryName (const std::string &, const std::string &)
 associate a glossary name to a variable
void addMaterialLaw (const std::string &)
 add a material law
void appendToIncludes (const std::string &)
 append the given code to the includes
void appendToMembers (const std::string &)
 append the given code to the members
void appendToPrivateCode (const std::string &)
 append the given code to the private code
void appendToSources (const std::string &)
 append the given code to the sources
void reserveName (const std::string &)
 register a name.
void registerMemberName (const std::string &)
 register a static member name
void registerStaticMemberName (const std::string &)
 register a static member name
bool isNameReserved (const std::string &) const
 look if a name is reserved
void checkAndCompletePhysicalBoundsDeclaration ()
 check and complete the physical bounds of variables
virtual ~ModelDescription ()
 destructor
std::set< std::string > & getReservedNames ()
Public Member Functions inherited from mfront::MaterialKnowledgeDescription
 MaterialKnowledgeDescription ()
 default constructor
 MaterialKnowledgeDescription (MaterialKnowledgeDescription &&) noexcept
 move constructor
 MaterialKnowledgeDescription (const MaterialKnowledgeDescription &)
 copy constructor
MaterialKnowledgeDescription & operator= (const MaterialKnowledgeDescription &)
 default assignement
MaterialKnowledgeDescription & operator= (MaterialKnowledgeDescription &&) noexcept
 move assignement
void setAttribute (const std::string &, const MaterialKnowledgeAttribute &, const bool)
 insert a new attribute
void updateAttribute (const std::string_view, const MaterialKnowledgeAttribute &)
 update an existing new attribute
bool hasAttribute (const std::string_view) const
template<typename T>
requires ( isMaterialKnowledgeAttributeType<T>())
T & getAttribute (const std::string_view)
template<typename T>
requires (isMaterialKnowledgeAttributeType<T>())
const T & getAttribute (const std::string_view) const
template<typename T>
requires (isMaterialKnowledgeAttributeType<T>())
T getAttribute (const std::string_view, const T &) const
const std::map< std::string, MaterialKnowledgeAttribute, std::less<> > & getAttributes () const
void addExternalMFrontFile (const std::string_view, const std::vector< std::string > &, const tfel::utilities::DataMap &)
 add an external MFront file and the list of interfaces used to treat it.
const std::map< std::string, std::tuple< std::vector< std::string >, tfel::utilities::DataMap >, std::less<> > & getExternalMFrontFiles () const
bool hasUnitSystem () const
 return if an unit system has been associated to the material knowledge
void setUnitSystem (const std::string_view)
 associate an unit system to the material knowledge
const std::string & getUnitSystem () const
 associate an unit system to the material knowledge
 ~MaterialKnowledgeDescription ()
 destructor

Public Attributes

std::optional< bool > use_qt
 use quantities if available
std::vector< Function > functions
 list of functions declared
VariableDescriptionContainer outputs
 list of all outputs
VariableDescriptionContainer inputs
 list of all inputs
VariableDescriptionContainer parameters
 list of all parameters
VariableDescriptionContainer constantMaterialProperties
 list of all constant material properties
StaticVariableDescriptionContainer staticVars
 static variables
std::string material
 material name
std::string library
 library name
std::string className
 class name
std::string modelName
 name of the model
std::string includes
 additionnal header files
std::string sources
 specific sources
std::string privateCode
 private code
std::string members
 class member
std::set< std::string > domains
std::vector< std::string > materialLaws
 list of material laws used
std::set< std::string > memberNames
 list of variables names
std::set< std::string > staticMemberNames
 list of variables names
std::map< std::string, double > overriding_parameters
 overriding parameters

Protected Member Functions

void checkVariableExistence (const std::string &) const
 check that a variable exists
const std::set< std::string > & getReservedNames () const

Additional Inherited Members

Static Public Member Functions inherited from mfront::MaterialKnowledgeDescription
static void throwUndefinedAttribute (const std::string_view)
 throw an exception saying that no attribute with the given name exists
Static Public Attributes inherited from mfront::MaterialKnowledgeDescription
static const char *const defaultOutOfBoundsPolicy
 standard option and attribute name
static const char *const disableRuntimeChecks
 standard option and attribute name
static const char *const runtimeModificationOfTheOutOfBoundsPolicy
 standard option name
static const char *const parametersAsStaticVariables
 attribute name
static const char *const initializeParametersFromFile
 attribute name
static const char *const validator
 attribute name
static const char *const buildIdentifier
 attribute name
static const char *const compatibilityMode
 attribute name
Protected Attributes inherited from mfront::MaterialKnowledgeDescription
std::optional< std::string > unit_system
 unit system
std::map< std::string, MaterialKnowledgeAttribute, std::less<> > attributes
 behaviour attributes
std::map< std::string, std::tuple< std::vector< std::string >, tfel::utilities::DataMap >, std::less<> > externalMFrontFiles
 external mfront files

Detailed Description

class describing a model

Member Function Documentation

◆ addMaterialLaw()

void mfront::ModelDescription::addMaterialLaw ( const std::string & )

add a material law

Parameters
[in]m: added material law name

◆ checkVariableExistence()

void mfront::ModelDescription::checkVariableExistence ( const std::string & ) const
protected

check that a variable exists

Parameters
[in]vvariable name

◆ getReservedNames() [1/2]

std::set< std::string > & mfront::ModelDescription::getReservedNames ( )
Returns
the list of reserved names

◆ getReservedNames() [2/2]

const std::set< std::string > & mfront::ModelDescription::getReservedNames ( ) const
nodiscardprotected
Returns
the list of reserved names

◆ getVariableDescription()

const VariableDescription & mfront::ModelDescription::getVariableDescription ( const std::string & ) const
nodiscard
Returns
the variable description with the given name
Parameters
[in]nvariable name

◆ isNameReserved()

bool mfront::ModelDescription::isNameReserved ( const std::string & ) const
nodiscard

look if a name is reserved

Parameters
[in]n: name

◆ registerMemberName()

void mfront::ModelDescription::registerMemberName ( const std::string & )

register a static member name

Parameters
[in]n: name

◆ registerStaticMemberName()

void mfront::ModelDescription::registerStaticMemberName ( const std::string & )

register a static member name

Parameters
[in]n: name

◆ reserveName()

void mfront::ModelDescription::reserveName ( const std::string & )

register a name.

Parameters
[in]n: name
[in]b: if false, don't check if variable has already been reserved yet. If true, check if the variable has alredy been registred and throws an exception if it does, register it otherwise
Note
this method is called internally by the registerVariable and registerStaticVariable methods.

◆ setEntryName()

void mfront::ModelDescription::setEntryName ( const std::string & ,
const std::string &  )

associate a glossary name to a variable

Parameters
[in]vvariable name
[in]gglossary name

◆ setGlossaryName()

void mfront::ModelDescription::setGlossaryName ( const std::string & ,
const std::string &  )

associate a glossary name to a variable

Parameters
[in]vvariable name
[in]gglossary name

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