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

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

Inheritance diagram for mfront::ZMATInterface:
mfront::SupportedTypes mfront::AbstractBehaviourInterface

Public Types

using ModellingHypothesis = tfel::material::ModellingHypothesis
 a simple alias
using Hypothesis = ModellingHypothesis::Hypothesis
 a simple alias
Public Types inherited from mfront::SupportedTypes
enum  TypeFlag { SCALAR , TVECTOR , STENSOR , TENSOR }
 flag associaed with a variable type
using const_iterator = tfel::utilities::CxxTokenizer::const_iterator
 a simple alias
Public Types inherited from mfront::AbstractBehaviourInterface
typedef tfel::material::ModellingHypothesis ModellingHypothesis
 a simple alias
typedef ModellingHypothesis::Hypothesis Hypothesis
 a simple alias
using CxxTokenizer = tfel::utilities::CxxTokenizer
 a simple alias
using tokens_iterator = CxxTokenizer::TokensContainer::const_iterator
 a simple alias
using DataMap = tfel::utilities::DataMap
 a simple alias

Public Member Functions

 ZMATInterface ()
 constructor
void setOptions (const DataMap &) override
 give options to the interface
std::string getInterfaceName () const override
 the name of the interface is mostly used internally to build
std::string getInterfaceVersion () const override
std::pair< bool, tokens_iterator > treatKeyword (BehaviourDescription &, const std::string &, const std::vector< std::string > &, tokens_iterator, const tokens_iterator) override
 treat a keyword
bool isBehaviourConstructorRequired (const Hypothesis, const BehaviourDescription &) const override
std::set< Hypothesis > getModellingHypothesesToBeTreated (const BehaviourDescription &) const override
std::pair< std::vector< BehaviourMaterialProperty >, SupportedTypes::TypeSize > buildMaterialPropertiesList (const BehaviourDescription &, const Hypothesis) const override
void writeInterfaceSpecificIncludes (std::ostream &, const BehaviourDescription &) const override
void exportMechanicalData (std::ostream &, const Hypothesis, const BehaviourDescription &) const override
void writeBehaviourConstructorHeader (std::ostream &, const BehaviourDescription &, const Hypothesis, const std::string &) const override
 write the behaviour constructor header associated with the interface. This method allow the interface to add a new constructor containing specific arguments and the call specific constructors for the behaviour data and integration data, as build by the writeBehaviourDataConstructor and the writeIntegrationDataConstructor methods respectively. This body of this constructor will be populated by the writeBehaviourConstructorBody method.
void writeBehaviourConstructorBody (std::ostream &, const BehaviourDescription &, const Hypothesis) const override
 complete the body of the behaviour constructor associated with the interface.
void writeBehaviourDataConstructor (std::ostream &, const Hypothesis, const BehaviourDescription &) const override
void writeBehaviourDataMainVariablesSetters (std::ostream &, const BehaviourDescription &) const override
void writeIntegrationDataConstructor (std::ostream &, const Hypothesis, const BehaviourDescription &) const override
void writeIntegrationDataMainVariablesSetters (std::ostream &, const BehaviourDescription &) const override
 write the setters associated with the main variables
void writeBehaviourInitializeFunctions (std::ostream &, const BehaviourDescription &, const Hypothesis) const override
 write the initialize functions
void writeBehaviourPostProcessings (std::ostream &, const BehaviourDescription &, const Hypothesis) const override
 write the post-processings
void endTreatment (const BehaviourDescription &, const FileDescription &) const override
 write output files
void getTargetsDescription (TargetsDescription &, const BehaviourDescription &) override
 ~ZMATInterface () override
 destructor
Public Member Functions inherited from mfront::SupportedTypes
 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
Public Member Functions inherited from mfront::AbstractBehaviourInterface
virtual ~AbstractBehaviourInterface ()
 destructor

Static Public Member Functions

static std::string getName ()
Static Public Member Functions inherited from mfront::SupportedTypes
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)

Protected Member Functions

void checkIfTemperatureIsDefinedAsTheFirstExternalStateVariable (const BehaviourDescription &) const
void writeBehaviourInitialisation (std::ostream &, const BehaviourDescription &, const ZMATInterface::Hypothesis) const
 write behaviour initialisation for the given hypothesis
void writeParametersInitialisation (std::ostream &, const BehaviourDescription &, const ZMATInterface::Hypothesis) const
 write parameters initialisation for the given hypothesis
void writeMaterialPropertiesInitialisation (std::ostream &, const BehaviourDescription &, const ZMATInterface::Hypothesis) const
 write material properties initialisation for the given hypothesis
void writeCallMFrontBehaviour (std::ostream &, const BehaviourDescription &, const ZMATInterface::Hypothesis) const
 write behaviour initialisation for the given hypothesis

Additional Inherited Members

Static Public Attributes inherited from mfront::SupportedTypes
static constexpr int ArraySizeLimit = 10u
 limit for small array support

Detailed Description

This class provides some helper function for behaviours interfaces based on the umat standard

Member Function Documentation

◆ buildMaterialPropertiesList()

std::pair< std::vector< BehaviourMaterialProperty >, SupportedTypes::TypeSize > mfront::ZMATInterface::buildMaterialPropertiesList ( const BehaviourDescription & ,
const Hypothesis  ) const
overridevirtual
Returns
a pair which first member gives the position of the material properties in the values given through the interface and which second member is an offset giving the number of imposed material properties.
Parameters
[in]mbbehaviour description
[in]hmodelling hypothesis

Implements mfront::AbstractBehaviourInterface.

◆ checkIfTemperatureIsDefinedAsTheFirstExternalStateVariable()

void mfront::ZMATInterface::checkIfTemperatureIsDefinedAsTheFirstExternalStateVariable ( const BehaviourDescription & ) const
protected

This method check of the temperature is defined as the first external state variable. If this is not the case, an exception is thrown.

Parameters
[in]bdbehaviour description

◆ endTreatment()

void mfront::ZMATInterface::endTreatment ( const BehaviourDescription & ,
const FileDescription &  ) const
overridevirtual

write output files

Parameters
[in]mb: behaviour description
[in]fd: mfront file description

Implements mfront::AbstractBehaviourInterface.

◆ exportMechanicalData()

void mfront::ZMATInterface::exportMechanicalData ( std::ostream & ,
const Hypothesis ,
const BehaviourDescription &  ) const
overridevirtual

◆ getInterfaceName()

std::string mfront::ZMATInterface::getInterfaceName ( ) const
overridevirtual

the name of the interface is mostly used internally to build

  • the name of the variable passed to the constructors.
  • the headers guards.
  • etc...
    Returns
    the name of the interface

Implements mfront::AbstractBehaviourInterface.

◆ getInterfaceVersion()

std::string mfront::ZMATInterface::getInterfaceVersion ( ) const
overridevirtual
Returns
the version of the interface

Implements mfront::AbstractBehaviourInterface.

◆ getModellingHypothesesToBeTreated()

std::set< Hypothesis > mfront::ZMATInterface::getModellingHypothesesToBeTreated ( const BehaviourDescription & ) const
overridevirtual
Returns
the list of modelling hypotheses treated by the interface
Parameters
[in]mb: behaviour description

Implements mfront::AbstractBehaviourInterface.

◆ getName()

std::string mfront::ZMATInterface::getName ( )
static
Returns
the name of the interface

◆ getTargetsDescription()

void mfront::ZMATInterface::getTargetsDescription ( TargetsDescription & ,
const BehaviourDescription &  )
overridevirtual
Parameters
[out]d: target description
[out]bd: behaviour description

Implements mfront::AbstractBehaviourInterface.

◆ isBehaviourConstructorRequired()

bool mfront::ZMATInterface::isBehaviourConstructorRequired ( const Hypothesis ,
const BehaviourDescription &  ) const
overridevirtual
Returns
true if the interface will create constructors in the behaviour class.
Parameters
[in]h: modelling hypothesis
[in]mb: behaviour description

Implements mfront::AbstractBehaviourInterface.

◆ setOptions()

void mfront::ZMATInterface::setOptions ( const DataMap & )
overridevirtual

give options to the interface

Those options may have been read from a configuration file or from the command line

Parameters
[in]optsoptions

Implements mfront::AbstractBehaviourInterface.

◆ treatKeyword()

std::pair< bool, tokens_iterator > mfront::ZMATInterface::treatKeyword ( BehaviourDescription & ,
const std::string & ,
const std::vector< std::string > & ,
tokens_iterator ,
const tokens_iterator  )
overridevirtual

treat a keyword

Parameters
[in,out]bdbehaviour description
[in]keykeyword to be treated
[in]ilist of interfaces to which the keyword is restricted
[in]pcurrent position in the file
[in]peiterator past the end of the file
Returns
a pair. The first entry is true if the keyword was treated by the interface. The second entry is an iterator after the last token treated.

Implements mfront::AbstractBehaviourInterface.

◆ writeBehaviourConstructorBody()

void mfront::ZMATInterface::writeBehaviourConstructorBody ( std::ostream & ,
const BehaviourDescription & ,
const Hypothesis  ) const
overridevirtual

complete the body of the behaviour constructor associated with the interface.

Parameters
[in]osoutput file
[in]mbbehaviour description
[in]hmodelling hypothesis

Implements mfront::AbstractBehaviourInterface.

◆ writeBehaviourConstructorHeader()

void mfront::ZMATInterface::writeBehaviourConstructorHeader ( std::ostream & ,
const BehaviourDescription & ,
const Hypothesis ,
const std::string &  ) const
overridevirtual

write the behaviour constructor header associated with the interface. This method allow the interface to add a new constructor containing specific arguments and the call specific constructors for the behaviour data and integration data, as build by the writeBehaviourDataConstructor and the writeIntegrationDataConstructor methods respectively. This body of this constructor will be populated by the writeBehaviourConstructorBody method.

Parameters
[in]behaviourFile: output file
[in]mb: behaviour description
[in]h: modelling hypothesis
[in]initStateVarsIncrements: constructor part assigning default value (zero) to state variable increments

Implements mfront::AbstractBehaviourInterface.

◆ writeBehaviourDataConstructor()

void mfront::ZMATInterface::writeBehaviourDataConstructor ( std::ostream & ,
const Hypothesis ,
const BehaviourDescription &  ) const
overridevirtual

◆ writeBehaviourDataMainVariablesSetters()

void mfront::ZMATInterface::writeBehaviourDataMainVariablesSetters ( std::ostream & ,
const BehaviourDescription &  ) const
overridevirtual

write the behaviour constructor associated with the law

Parameters
[in]behaviourFile: output file
[in]mb: behaviour description

Implements mfront::AbstractBehaviourInterface.

◆ writeBehaviourInitialisation()

void mfront::ZMATInterface::writeBehaviourInitialisation ( std::ostream & ,
const BehaviourDescription & ,
const ZMATInterface::Hypothesis  ) const
protected

write behaviour initialisation for the given hypothesis

Parameters
[out]out: output file
[in]mb: mechancial behaviour description
[in]h: modelling hypothesis

◆ writeBehaviourInitializeFunctions()

void mfront::ZMATInterface::writeBehaviourInitializeFunctions ( std::ostream & ,
const BehaviourDescription & ,
const Hypothesis  ) const
overridevirtual

write the initialize functions

Parameters
[in]osoutput stream
[in]bdbehaviour description
[in]hmodelling hypothesis

Implements mfront::AbstractBehaviourInterface.

◆ writeBehaviourPostProcessings()

void mfront::ZMATInterface::writeBehaviourPostProcessings ( std::ostream & ,
const BehaviourDescription & ,
const Hypothesis  ) const
overridevirtual

write the post-processings

Parameters
[in]osoutput stream
[in]bdbehaviour description
[in]hmodelling hypothesis

Implements mfront::AbstractBehaviourInterface.

◆ writeCallMFrontBehaviour()

void mfront::ZMATInterface::writeCallMFrontBehaviour ( std::ostream & ,
const BehaviourDescription & ,
const ZMATInterface::Hypothesis  ) const
protected

write behaviour initialisation for the given hypothesis

Parameters
[out]out: output file
[in]mb: mechancial behaviour description
[in]h: modelling hypothesis

◆ writeIntegrationDataConstructor()

void mfront::ZMATInterface::writeIntegrationDataConstructor ( std::ostream & ,
const Hypothesis ,
const BehaviourDescription &  ) const
overridevirtual

◆ writeIntegrationDataMainVariablesSetters()

void mfront::ZMATInterface::writeIntegrationDataMainVariablesSetters ( std::ostream & ,
const BehaviourDescription &  ) const
overridevirtual

write the setters associated with the main variables

Parameters
[in]behaviourFile: output file
[in]mb: behaviour description

Implements mfront::AbstractBehaviourInterface.

◆ writeInterfaceSpecificIncludes()

void mfront::ZMATInterface::writeInterfaceSpecificIncludes ( std::ostream & ,
const BehaviourDescription &  ) const
overridevirtual

write interface specific includes

Parameters
[in]out: output file
[in]mb: behaviour description

Implements mfront::AbstractBehaviourInterface.

◆ writeMaterialPropertiesInitialisation()

void mfront::ZMATInterface::writeMaterialPropertiesInitialisation ( std::ostream & ,
const BehaviourDescription & ,
const ZMATInterface::Hypothesis  ) const
protected

write material properties initialisation for the given hypothesis

Parameters
[out]out: output file
[in]mb: mechancial behaviour description
[in]h: modelling hypothesis

◆ writeParametersInitialisation()

void mfront::ZMATInterface::writeParametersInitialisation ( std::ostream & ,
const BehaviourDescription & ,
const ZMATInterface::Hypothesis  ) const
protected

write parameters initialisation for the given hypothesis

Parameters
[out]out: output file
[in]mb: mechancial behaviour description
[in]h: modelling hypothesis

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