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

class handling all type variables types supported by MFront More...

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

Inheritance diagram for mfront::SupportedTypes:
mfront::BehaviourDSLCommon mfront::BehaviourData mfront::BehaviourDescription mfront::BehaviourInterfaceBase mfront::ZMATInterface mfront::BehaviourDSLBase< DefaultDSLBase > mfront::BehaviourDSLBase< ImplicitDSLBase > mfront::BehaviourDSLBase< IsotropicBehaviourDSLBase > mfront::BehaviourDSLBase< RungeKuttaDSLBase > mfront::BehaviourDSLBase< Child > mfront::GenericBehaviourInterface mfront::UMATInterfaceBase mfront::DefaultDSLBase mfront::ImplicitDSLBase mfront::IsotropicBehaviourDSLBase mfront::RungeKuttaDSLBase mfront::AbaqusInterfaceBase mfront::AnsysInterface mfront::AsterInterface mfront::CalculiXInterface mfront::CastemInterface mfront::ComsolInterface mfront::CyranoInterface mfront::DianaFEAInterface mfront::LSDYNAInterface

Classes

struct  TypeSize
 class handling the size of a variable or a set of variables as a function of the variables' type and the modelling hypothesis More...
struct  TypeParsingOptions
 a small structure which allows to configure how type can be parsed. More...

Public Types

enum  TypeFlag { SCALAR , TVECTOR , STENSOR , TENSOR }
 flag associaed with a variable type
using const_iterator = tfel::utilities::CxxTokenizer::const_iterator
 a simple alias

Public Member Functions

 SupportedTypes ()
 default constructor
 SupportedTypes (SupportedTypes &&)=default
 move constructor
 SupportedTypes (const SupportedTypes &)=default
 copy constructor
SupportedTypes & operator= (SupportedTypes &&)=default
 move assignement
SupportedTypes & operator= (const SupportedTypes &)=default
 copy assignement
virtual ~SupportedTypes ()
 desctructor

Static Public Member Functions

static const std::map< std::string, TypeFlag, std::less<> > & getTypeFlags ()
static bool isSupportedConstexprIntegerVariables (const std::string_view)
static std::string extractType (const_iterator &, const const_iterator &, const TypeParsingOptions &=TypeParsingOptions())
static std::string extractType (const std::string_view, const TypeParsingOptions &=TypeParsingOptions())
static bool hasTypeFlag (const std::string_view)
static bool isScalarType (const std::string_view)
static TypeFlag getTypeFlag (const std::string_view)
static int getTypeIdentifier (const std::string_view)
static TypeSize getTypeSize (const std::string_view, const unsigned short=1)
static std::string getTimeDerivativeType (const std::string_view)

Static Public Attributes

static constexpr int ArraySizeLimit = 10u
 limit for small array support

Detailed Description

class handling all type variables types supported by MFront

Member Function Documentation

◆ extractType() [1/2]

std::string mfront::SupportedTypes::extractType ( const std::string_view ,
const TypeParsingOptions & = TypeParsingOptions() )
static
Returns
a normalized representation of a type read from a string.
Parameters
[in]sstring.
[in]optsparsing options

◆ extractType() [2/2]

std::string mfront::SupportedTypes::extractType ( const_iterator & ,
const const_iterator & ,
const TypeParsingOptions & = TypeParsingOptions() )
static
Returns
a normalized representation of a type read from a list of tokens.
Parameters
[in]currentcurrent position.
[in]enditerator past the last token.
[in]optsparsing options

◆ getTimeDerivativeType()

std::string mfront::SupportedTypes::getTimeDerivativeType ( const std::string_view )
static
Returns
the time derivative of a variable

◆ getTypeFlag()

TypeFlag mfront::SupportedTypes::getTypeFlag ( const std::string_view )
static
Returns
the flag associated with the given type
Parameters
[in]t: type

◆ getTypeFlags()

const std::map< std::string, TypeFlag, std::less<> > & mfront::SupportedTypes::getTypeFlags ( )
static
Returns
a list of type names associated with type flags

◆ getTypeIdentifier()

int mfront::SupportedTypes::getTypeIdentifier ( const std::string_view )
static
Returns
a integer encoding the type of a tensorial variable
Parameters
[in]t: type

Those integers shall be intepreted as follows:

  • the three first bits, converted in an integer, gives the type of variable:
    • 0 denotes a scalar
    • 1 denotes a symmetric tensor
    • 2 denotes a vector
    • 3 denotes an unsymmetric tensor
    • 4 denotes a derivative function
  • For tensorial objects, the two next bits, converted in an integer, gives the space dimension of the variable:
    • 0 indicates that the space dimension depends on the modelling hypothesis considered.
    • 1 indicates that the object has a space dimension of 1, indepently of the modelling hypothesis considered.
    • 2 indicates that the object has a space dimension of 2, indepently of the modelling hypothesis considered.
    • 3 indicates that the object has a space dimension of 3, indepently of the modelling hypothesis considered.
  • Concerning a derivative function, the next bits encodes the type of the function and the bits after the type of the variables with respect to which the function is derivated.

◆ getTypeSize()

TypeSize mfront::SupportedTypes::getTypeSize ( const std::string_view ,
const unsigned short = 1 )
static
Returns
the size of a type (i.e. the number of values hold)
Note
this method is only meaningful for TFEL mathematical objects.
Parameters
[in]t: variable type
[in]a: array size

◆ hasTypeFlag()

bool mfront::SupportedTypes::hasTypeFlag ( const std::string_view )
static
Returns
if the given type is associated with a flag
Parameters
[in]t: type

◆ isScalarType()

bool mfront::SupportedTypes::isScalarType ( const std::string_view )
static
Returns
if the given type describes a scalar
Parameters
[in]t: type

◆ isSupportedConstexprIntegerVariables()

bool mfront::SupportedTypes::isSupportedConstexprIntegerVariables ( const std::string_view )
static
Returns
if the given value designates one of the supported constexpr integer variables, i.e. N, TVectorSize, StensorSize, TensorSize.
Parameters
[in]vvalue

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