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

structure standing for a standard (non static) variable More...

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

Inheritance diagram for mfront::VariableDescription:
mfront::VariableDescriptionBase mfront::BehaviourMaterialProperty mfront::Gradient mfront::ThermodynamicForce

Public Member Functions

 VariableDescription ()
 default constructor
 VariableDescription (const VariableDescription &)
 copy constructor
 VariableDescription (VariableDescription &&) noexcept
 move constructor
VariableDescription & operator= (VariableDescription &&) noexcept
 move operator
VariableDescription & operator= (const VariableDescription &)
 assignement operator
 VariableDescription (const std::string &, const std::string &, const unsigned short, const size_t)
 constructor
 VariableDescription (const std::string &, const std::string &, const std::string &, const unsigned short, const size_t)
 constructor
void setAttribute (const std::string &, const VariableAttribute &, const bool)
 insert a new attribute
bool hasAttribute (const std::string &) const
template<typename T>
requires ( isVariableAttribute<T>)
T & getAttribute (const std::string &)
template<typename T>
requires (isVariableAttribute<T>)
const T & getAttribute (const std::string &) const
template<typename T>
requires (isVariableAttribute<T>)
T getAttribute (const std::string &, const T &) const
const std::map< std::string, VariableAttribute > & getAttributes () const
bool hasBounds () const
bool hasBounds (const unsigned short) const
void setBounds (const VariableBoundsDescription &)
 set bounds on this variable
void setBounds (const VariableBoundsDescription &, const unsigned short)
 set bounds on this variable
const VariableBoundsDescription & getBounds () const
const VariableBoundsDescription & getBounds (const unsigned short) const
bool hasPhysicalBounds () const
bool hasPhysicalBounds (const unsigned short) const
void setPhysicalBounds (const VariableBoundsDescription &)
 set physical bounds on this variable
void setPhysicalBounds (const VariableBoundsDescription &, const unsigned short)
 set physical bounds on this variable
const VariableBoundsDescription & getPhysicalBounds () const
const VariableBoundsDescription & getPhysicalBounds (const unsigned short) const
void setGlossaryName (const std::string &)
 associate a glossary name to the variable
void resetGlossaryName (const std::string &)
 associate a new glossary name to the variable
void setEntryName (const std::string &)
 associate an entry name to the variable
void resetEntryName (const std::string &)
 associate a new entry name to the variable
bool hasGlossaryName () const
bool hasEntryName () const
const std::string & getExternalName () const
bool isScalar () const
 ~VariableDescription ()
 destructor
Public Member Functions inherited from mfront::VariableDescriptionBase
 VariableDescriptionBase ()
 default constructor
 VariableDescriptionBase (const VariableDescriptionBase &)
 copy constructor
 VariableDescriptionBase (VariableDescriptionBase &&) noexcept
 move constructor
VariableDescriptionBase & operator= (VariableDescriptionBase &&) noexcept
 move operator
VariableDescriptionBase & operator= (const VariableDescriptionBase &)
 assignement operator
 VariableDescriptionBase (const std::string &, const std::string &, const unsigned short, const size_t)
 constructor
 VariableDescriptionBase (const std::string &, const std::string &, const std::string &, const unsigned short, const size_t)
 constructor
SupportedTypes::TypeFlag getTypeFlag () const
SupportedTypes::TypeSize getTypeSize () const
int getVariableTypeIdentifier () const
 ~VariableDescriptionBase ()
 destructor

Static Public Member Functions

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

Static Public Attributes

template<typename T>
static constexpr bool isVariableAttribute
static const char *const depth
 standard attribute name
static const char *const initialValue
 standard attribute name
static const char *const defaultValue
 standard attribute name
static const char *const errorNormalisationFactor
 error normalisation factor
static const char *const variableDeclaredInBaseClass
 attribute stating that a variable has already been declared in a based class.

Additional Inherited Members

Public Attributes inherited from mfront::VariableDescriptionBase
std::string type
 type of the variable
std::string symbolic_form
 symbolic representation of the variable
std::string name
 name of the variable
std::string description
 description
unsigned short arraySize
 if the variable has been declared as an array, this field contains a value greater than 1
size_t lineNumber
 line at wich the variable has been declared

Detailed Description

structure standing for a standard (non static) variable

Constructor & Destructor Documentation

◆ VariableDescription() [1/2]

mfront::VariableDescription::VariableDescription ( const std::string & ,
const std::string & ,
const unsigned short ,
const size_t  )

constructor

Parameters
[in]tvariable type
[in]nvariable name
[in]asif greater than 1, this variable will be considered as an array
[in]lline number

◆ VariableDescription() [2/2]

mfront::VariableDescription::VariableDescription ( const std::string & ,
const std::string & ,
const std::string & ,
const unsigned short ,
const size_t  )

constructor

Parameters
[in]tvariable type
[in]ssymbolic name
[in]nvariable name
[in]asif greater than 1, this variable will be considered as an array
[in]lline number

Member Function Documentation

◆ getAttribute() [1/3]

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

◆ getAttribute() [2/3]

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

◆ getAttribute() [3/3]

template<typename T>
requires (isVariableAttribute<T>)
T mfront::VariableDescription::getAttribute ( const std::string & n,
const T & v ) const
nodiscard
Returns
the attribute with the given name or the given default value if the variable does not exists
Parameters
[in]n: name
[in]v: value

◆ getAttributes()

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

◆ getBounds() [1/2]

const VariableBoundsDescription & mfront::VariableDescription::getBounds ( ) const
nodiscard
Returns
the bounds of this variable

◆ getBounds() [2/2]

const VariableBoundsDescription & mfront::VariableDescription::getBounds ( const unsigned short ) const
nodiscard
Returns
the bounds of this variable
Parameters
[in]iposition

◆ getExternalName()

const std::string & mfront::VariableDescription::getExternalName ( ) const
nodiscard
Returns
the external name of the variable

◆ getPhysicalBounds() [1/2]

const VariableBoundsDescription & mfront::VariableDescription::getPhysicalBounds ( ) const
nodiscard
Returns
the physical bounds of this variable

◆ getPhysicalBounds() [2/2]

const VariableBoundsDescription & mfront::VariableDescription::getPhysicalBounds ( const unsigned short ) const
nodiscard
Returns
the physical bounds of this variable
Parameters
[in]iposition

◆ hasAttribute()

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

◆ hasBounds() [1/2]

bool mfront::VariableDescription::hasBounds ( ) const
nodiscard
Returns
true if bounds has been specified for this variable

◆ hasBounds() [2/2]

bool mfront::VariableDescription::hasBounds ( const unsigned short ) const
nodiscard
Returns
true if bounds has been specified for this variable
Parameters
[in]iposition

◆ hasEntryName()

bool mfront::VariableDescription::hasEntryName ( ) const
nodiscard
Returns
true if the variable has a glossary name

◆ hasGlossaryName()

bool mfront::VariableDescription::hasGlossaryName ( ) const
nodiscard
Returns
true if the variable has a glossary name

◆ hasPhysicalBounds() [1/2]

bool mfront::VariableDescription::hasPhysicalBounds ( ) const
nodiscard
Returns
true if physical bounds has been specified for this variable

◆ hasPhysicalBounds() [2/2]

bool mfront::VariableDescription::hasPhysicalBounds ( const unsigned short ) const
nodiscard
Returns
true if bounds has been specified for this variable
Parameters
[in]iposition

◆ isScalar()

bool mfront::VariableDescription::isScalar ( ) const
nodiscard
Returns
if the variable describes a scalar

◆ resetEntryName()

void mfront::VariableDescription::resetEntryName ( const std::string & )

associate a new entry name to the variable

Parameters
[in]eentry name

◆ resetGlossaryName()

void mfront::VariableDescription::resetGlossaryName ( const std::string & )

associate a new glossary name to the variable

Parameters
[in]gglossary name

◆ setAttribute()

void mfront::VariableDescription::setAttribute ( const std::string & ,
const VariableAttribute & ,
const bool  )

insert a new attribute

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

◆ setBounds() [1/2]

void mfront::VariableDescription::setBounds ( const VariableBoundsDescription & )

set bounds on this variable

Parameters
[in]bbounds

◆ setBounds() [2/2]

void mfront::VariableDescription::setBounds ( const VariableBoundsDescription & ,
const unsigned short  )

set bounds on this variable

Parameters
[in]bbounds
[in]iposition

◆ setEntryName()

void mfront::VariableDescription::setEntryName ( const std::string & )

associate an entry name to the variable

Parameters
[in]eentry name

◆ setGlossaryName()

void mfront::VariableDescription::setGlossaryName ( const std::string & )

associate a glossary name to the variable

Parameters
[in]gglossary name

◆ setPhysicalBounds() [1/2]

void mfront::VariableDescription::setPhysicalBounds ( const VariableBoundsDescription & )

set physical bounds on this variable

Parameters
[in]bphysical bounds

◆ setPhysicalBounds() [2/2]

void mfront::VariableDescription::setPhysicalBounds ( const VariableBoundsDescription & ,
const unsigned short  )

set physical bounds on this variable

Parameters
[in]bphysical bounds

◆ throwUndefinedAttribute()

void mfront::VariableDescription::throwUndefinedAttribute ( const std::string & )
static

throw an exception saying that no attribute with the given name exists

Parameters
[in]nname of the attribute

Member Data Documentation

◆ isVariableAttribute

template<typename T>
bool mfront::VariableDescription::isVariableAttribute
staticconstexpr
Initial value:
=
tfel::meta::TLCountNbrOfT<T, VariableAttributeTypes>::value == 1

◆ variableDeclaredInBaseClass

const char* const mfront::VariableDescription::variableDeclaredInBaseClass
static

attribute stating that a variable has already been declared in a based class.

This attribute has been introduced for parameters corresponding to numerical parameters declared in base classes describing the resolution algorithms.


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