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

base class for the description of material knowledge More...

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

Inheritance diagram for mfront::MaterialKnowledgeDescription:
mfront::BehaviourData mfront::BehaviourDescription mfront::MaterialPropertyDescription mfront::ModelDescription

Public Member Functions

 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

Static Public Member Functions

static void throwUndefinedAttribute (const std::string_view)
 throw an exception saying that no attribute with the given name exists

Static Public Attributes

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

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

base class for the description of material knowledge

Member Function Documentation

◆ addExternalMFrontFile()

void mfront::MaterialKnowledgeDescription::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.

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

◆ getAttribute() [1/3]

template<typename T>
requires ( isMaterialKnowledgeAttributeType<T>())
T & mfront::MaterialKnowledgeDescription::getAttribute ( const std::string_view n)
nodiscard
Returns
the attribute with the given name
Parameters
[in]n: name

◆ getAttribute() [2/3]

template<typename T>
requires (isMaterialKnowledgeAttributeType<T>())
const T & mfront::MaterialKnowledgeDescription::getAttribute ( const std::string_view n) const
nodiscard
Returns
the attribute with the given name
Parameters
[in]n: name

◆ getAttribute() [3/3]

template<typename T>
requires (isMaterialKnowledgeAttributeType<T>())
T mfront::MaterialKnowledgeDescription::getAttribute ( const std::string_view n,
const T & v ) const
nodiscard
Returns
the attribute with the given name
Parameters
[in]nname
[in]vdefault value if the attribute is not defined

◆ getAttributes()

const std::map< std::string, MaterialKnowledgeAttribute, std::less<> > & mfront::MaterialKnowledgeDescription::getAttributes ( ) const
nodiscard
Returns
all the attribute registred
Parameters
[in]n: name

◆ getExternalMFrontFiles()

const std::map< std::string, std::tuple< std::vector< std::string >, tfel::utilities::DataMap >, std::less<> > & mfront::MaterialKnowledgeDescription::getExternalMFrontFiles ( ) const
nodiscard
Returns
the external MFront files

◆ getUnitSystem()

const std::string & mfront::MaterialKnowledgeDescription::getUnitSystem ( ) const
nodiscard

associate an unit system to the material knowledge

Parameters
[in]sunit system

◆ hasAttribute()

bool mfront::MaterialKnowledgeDescription::hasAttribute ( const std::string_view ) const
nodiscard
Returns
true if an attribute with the given name as been registred
Parameters
[in]n: name

◆ setAttribute()

void mfront::MaterialKnowledgeDescription::setAttribute ( const std::string & ,
const MaterialKnowledgeAttribute & ,
const bool  )

insert a new attribute

Parameters
[in]n: name
[in]a: attribute
[in]b: don't throw if the the attribute already exists. The attribute is left unchanged. However the type of the attribute is checked.

◆ setUnitSystem()

void mfront::MaterialKnowledgeDescription::setUnitSystem ( const std::string_view )

associate an unit system to the material knowledge

Parameters
[in]sunit system

◆ updateAttribute()

void mfront::MaterialKnowledgeDescription::updateAttribute ( const std::string_view ,
const MaterialKnowledgeAttribute &  )

update an existing new attribute

Parameters
[in]nname
[in]aattribute

Member Data Documentation

◆ externalMFrontFiles

std::map<std::string, std::tuple<std::vector<std::string>, tfel::utilities::DataMap>, std::less<> > mfront::MaterialKnowledgeDescription::externalMFrontFiles
protected

external mfront files

  • key: mfront file name (full path)
  • value: list of interfaces to be used and DSL options This list of external mfront files will be used to generate the associated sources.

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