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

base class for the interfaces to: More...

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

Inheritance diagram for mfront::AbaqusInterfaceBase:
mfront::UMATInterfaceBase mfront::BehaviourInterfaceBase mfront::AbstractBehaviourInterface mfront::SupportedTypes mfront::AbaqusExplicitInterface mfront::AbaqusInterface

Public Member Functions

 ~AbaqusInterfaceBase () override
 destructor
Public Member Functions inherited from mfront::UMATInterfaceBase
 UMATInterfaceBase ()
 constructor
void exportMechanicalData (std::ostream &, const Hypothesis, const BehaviourDescription &) const override
void checkIfTemperatureIsDefinedAsTheFirstExternalStateVariable (const BehaviourDescription &) const
virtual void writeVariableInitializersInBehaviourDataConstructorI (std::ostream &, bool &, const VariableDescriptionContainer &, const std::string &, const std::string &, const std::string &) const
virtual void writeVariableInitializersInBehaviourDataConstructorI (std::ostream &, bool &, const VariableDescriptionContainer::const_iterator &, const VariableDescriptionContainer::const_iterator &, const std::string &, const std::string &, const std::string &) const
virtual void writeVariableInitializersInBehaviourDataConstructorII (std::ostream &, const BehaviourDescription &, const VariableDescriptionContainer &, const std::string &, const std::string &, const std::string &) const
virtual void writeVariableInitializersInBehaviourDataConstructorII (std::ostream &, const BehaviourDescription &, const VariableDescriptionContainer::const_iterator &, const VariableDescriptionContainer::const_iterator &, const std::string &, const std::string &, const std::string &) const
virtual void exportResults (std::ostream &, const BehaviourDescription &, const VariableDescriptionContainer &, const std::string &) const
virtual void writeResultsArrayResize (std::ostream &, const std::string &, const VariableDescriptionContainer &) const
virtual void writeResultsArrayResize (std::ostream &, const std::string &, const SupportedTypes::TypeSize &) const
virtual void exportThermodynamicForce (std::ostream &, const std::string &, const ThermodynamicForce &, const SupportedTypes::TypeSize) const
 write the instruction of exporting a thermodynamic force in an array
virtual std::vector< std::pair< std::string, std::string > > getBehaviourConstructorsAdditionalVariables () const
virtual std::vector< std::pair< std::string, std::string > > getBehaviourDataConstructorAdditionalVariables () const
virtual std::vector< std::pair< std::string, std::string > > getIntegrationDataConstructorAdditionalVariables () const
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
virtual void completeBehaviourDataConstructor (std::ostream &, const Hypothesis, const BehaviourDescription &) const
 add interface specific lines at the end of the behaviour data constructor
void writeBehaviourDataMainVariablesSetters (std::ostream &, const BehaviourDescription &) const override
virtual void writeBehaviourDataGradientSetter (std::ostream &, const Gradient &, const SupportedTypes::TypeSize) const
 write the initialisation of a driving variables
virtual void writeBehaviourDataThermodynamicForceSetter (std::ostream &, const ThermodynamicForce &, const SupportedTypes::TypeSize) const
 write the initialisation of a thermodynamic force
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
virtual void writeIntegrationDataGradientSetter (std::ostream &, const Gradient &, const SupportedTypes::TypeSize) const
 write the initialisation of a driving variables
 ~UMATInterfaceBase () override
 destructor
Public Member Functions inherited from mfront::BehaviourInterfaceBase
 BehaviourInterfaceBase ()
 constructor
void setOptions (const DataMap &) override
 give options to the interface
std::string getInterfaceVersion () const override
bool isBehaviourConstructorRequired (const Hypothesis, const BehaviourDescription &) const override
std::pair< std::vector< BehaviourMaterialProperty >, SupportedTypes::TypeSize > buildMaterialPropertiesList (const BehaviourDescription &, const Hypothesis) const override
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
virtual std::string getHeaderGuard (const BehaviourDescription &) const
virtual void writeVisibilityDefines (std::ostream &) const
 include the appropriate headers and write the definition of the MFRONT_SHAREDOBJ macro which is used to define the visibility of the generated functions.
virtual void writeSetOutOfBoundsPolicyFunctionDeclaration (std::ostream &, const std::string &) const
virtual void writeGetOutOfBoundsPolicyFunctionImplementation (std::ostream &, const BehaviourDescription &, const std::string &) const
virtual void writeSetOutOfBoundsPolicyFunctionImplementation (std::ostream &, const BehaviourDescription &, const std::string &) const
virtual void writeSetParametersFunctionsDeclarations (std::ostream &, const BehaviourDescription &, const std::string &) const
virtual void writeSetParametersFunctionsImplementations (std::ostream &, const BehaviourDescription &, const std::string &) const
 generate the implementations of the functions allowing to modify the parameters of a behaviour.
virtual void setGenerateMTestFileOnFailureAttribute (BehaviourDescription &, const bool) const
 set an attribute stating that a MTest file shall be generated on integration failure.
virtual bool shallGenerateMTestFileOnFailure (const BehaviourDescription &) const
virtual std::pair< bool, SupportedTypes::TypeSize > checkIfAxialStrainIsDefinedAndGetItsOffset (const BehaviourDescription &, const Hypothesis) const
virtual std::pair< bool, SupportedTypes::TypeSize > checkIfAxialDeformationGradientIsDefinedAndGetItsOffset (const BehaviourDescription &, const Hypothesis) const
virtual bool readBooleanValue (const std::string &, tokens_iterator &, const tokens_iterator) const
 extract a boolean value from the current token
 ~BehaviourInterfaceBase () override
 destructor
Public Member Functions inherited from mfront::AbstractBehaviourInterface
virtual std::string getInterfaceName () const =0
 the name of the interface is mostly used internally to build
virtual std::pair< bool, tokens_iterator > treatKeyword (BehaviourDescription &, const std::string &, const std::vector< std::string > &, tokens_iterator, const tokens_iterator)=0
 treat a keyword
virtual void writeInterfaceSpecificIncludes (std::ostream &, const BehaviourDescription &) const =0
virtual void endTreatment (const BehaviourDescription &, const FileDescription &) const =0
 write output files
virtual void getTargetsDescription (TargetsDescription &, const BehaviourDescription &)=0
virtual ~AbstractBehaviourInterface ()
 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

Static Public Member Functions

static std::string getFiniteStrainStrategyAttributeName (const std::string &)
static std::string getOrthotropyManagementPolicyAttributeName (const std::string &)
static void checkFiniteStrainStrategyDefinitionConsistency (const BehaviourDescription &, const std::string &)
static void checkFiniteStrainStrategyDefinitionConsistency (const std::string &, const BehaviourDescription &)
static bool hasFiniteStrainStrategy (const std::string &, const BehaviourDescription &)
 check if the behaviour has been associated to a strain measure or if a finite strain strategy has been defined.
static std::string getFiniteStrainStrategy (const std::string &, const BehaviourDescription &)
 check if the behaviour has been associated to a strain measure or if a finite strain strategy has been defined.
static void checkOrthotropyManagementPolicyConsistency (const std::string &, const BehaviourDescription &)
 check if the orthotropy management policy defined is consistent with the behaviour.
static bool hasOrthotropyManagementPolicy (const std::string &, const BehaviourDescription &)
static std::string getOrthotropyManagementPolicy (const std::string &, const BehaviourDescription &)
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 writeMTestFileGeneratorSetModellingHypothesis (std::ostream &) const override
std::string getLibraryName (const BehaviourDescription &) const override
std::string getFunctionNameBasis (const std::string &) const override
virtual unsigned short getStateVariablesOffset (const BehaviourDescription &, const Hypothesis) const
 return the state variable offset used for variables used internally by the abaqus interface
virtual std::vector< std::string > getCommonKeywords () const
virtual std::pair< bool, tokens_iterator > treatCommonKeywords (BehaviourDescription &, const std::string &, tokens_iterator, const tokens_iterator)
virtual void writeAbaqusBehaviourTraits (std::ostream &, const BehaviourDescription &, const Hypothesis) const
 write a specialisation of the AbaqusTraits class
virtual std::string getFunctionNameForHypothesis (const std::string &, const Hypothesis) const
std::set< Hypothesis > getModellingHypothesesToBeTreated (const BehaviourDescription &) const override
virtual void writeInputFileExample (const BehaviourDescription &, const FileDescription &, const bool) const
virtual void writeDepvar (std::ostream &, int &, const Hypothesis &, const VariableDescription &, const std::string &) const
Protected Member Functions inherited from mfront::UMATInterfaceBase
virtual void writeMaterialPropertiesInitializersInBehaviourDataConstructorI (std::ostream &, bool &first, const Hypothesis, const BehaviourDescription &, const std::vector< BehaviourMaterialProperty > &, const SupportedTypes::TypeSize, const std::string &, const std::string &, const std::string &) const
virtual void writeMaterialPropertiesInitializersInBehaviourDataConstructorII (std::ostream &, const Hypothesis, const BehaviourDescription &, const std::vector< BehaviourMaterialProperty > &, const SupportedTypes::TypeSize, const std::string &, const std::string &, const std::string &) const
virtual void getExtraSrcIncludes (std::ostream &, const BehaviourDescription &) const
virtual void generateMTestFile1 (std::ostream &, const BehaviourDescription &) const
 write the first part of the code used to generate a MTest file
virtual void generateMTestFile2 (std::ostream &, const BehaviourDescription &, const BehaviourDescription::BehaviourType, const std::string &, const std::string &) const
 write the second part of the code used to generate a MTest file. This method shall be called when only one function is generated for all modelling hypotheses. This methods calls the gatherModellingHypothesesAndTests to make an appropriate dispatch among hypotheses. For each hypothesis, the generateMTestFileForHypothesis is called.
virtual void generateMTestFileForHypothesis (std::ostream &, const BehaviourDescription &, const BehaviourDescription::BehaviourType, const std::string &, const std::string &, const Hypothesis) const
 write the code used to generate a MTest file for a given hypotesis
virtual void writeMTestFileGeneratorSetRotationMatrix (std::ostream &, const BehaviourDescription &) const
virtual void writeMTestFileGeneratorSetStrainAndStressTensors (std::ostream &, const Hypothesis) const
 write the code giving the strain at the beginning of the time step, the strain increment and the stress at the beginning of the time step of a strain based behaviour to the generator of MTest files. The generator expects the components in the order of the symmetric tensors of TFEL. The default implementation gives the arrays STRAN, DSTRAN and mg_STRESS unchanged.
virtual std::map< Hypothesis, std::string > gatherModellingHypothesesAndTests (const BehaviourDescription &) const
 When the interface only provide one entry point (i.e. does not provide an entry point by modelling hypothesis), the generation of MTest files, provided by the generateMTestFile2 method, must have access to tests to distinguish modelling hypotheses.
virtual std::string getModellingHypothesisTest (const Hypothesis) const
virtual bool areExternalStateVariablesSupported () const
virtual bool isTemperatureIncrementSupported () const

Additional Inherited Members

Public Types inherited from mfront::BehaviourInterfaceBase
using ModellingHypothesis = tfel::material::ModellingHypothesis
 a simple alias
using Hypothesis = ModellingHypothesis::Hypothesis
 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 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
Static Public Attributes inherited from mfront::BehaviourInterfaceBase
static const char *const generateMTestFileAttribute
 attribute used to store if an MTest file shall be generated
Static Public Attributes inherited from mfront::SupportedTypes
static constexpr int ArraySizeLimit = 10u
 limit for small array support

Detailed Description

base class for the interfaces to:

Member Function Documentation

◆ checkFiniteStrainStrategyDefinitionConsistency() [1/2]

void mfront::AbaqusInterfaceBase::checkFiniteStrainStrategyDefinitionConsistency ( const BehaviourDescription & ,
const std::string &  )
static
Parameters
[in]bdbehaviour description
[in]fsfinite strain strategy

This method is used to see if the given finite strain strategy can be used with this behaviour:

  • the behaviour must be strain based.
  • if a strain measure is defined, the finite strain strategy must match this choice.

◆ checkFiniteStrainStrategyDefinitionConsistency() [2/2]

void mfront::AbaqusInterfaceBase::checkFiniteStrainStrategyDefinitionConsistency ( const std::string & ,
const BehaviourDescription &  )
static
Parameters
[in]iname of the interface
[in]bdbehaviour description.

If a strain measure and a finite strain strategy are defined, this method checks they are compatible.

◆ checkOrthotropyManagementPolicyConsistency()

void mfront::AbaqusInterfaceBase::checkOrthotropyManagementPolicyConsistency ( const std::string & ,
const BehaviourDescription &  )
static

check if the orthotropy management policy defined is consistent with the behaviour.

Parameters
[in]iname of the interface
[in]bdbehaviour description.

◆ getCommonKeywords()

virtual std::vector< std::string > mfront::AbaqusInterfaceBase::getCommonKeywords ( ) const
nodiscardprotectedvirtual
Returns
the list of supported keywords

◆ getFiniteStrainStrategy()

std::string mfront::AbaqusInterfaceBase::getFiniteStrainStrategy ( const std::string & ,
const BehaviourDescription &  )
staticnodiscard

check if the behaviour has been associated to a strain measure or if a finite strain strategy has been defined.

Parameters
[in]iname of the interface
[in]bdbehaviour description.

◆ getFiniteStrainStrategyAttributeName()

std::string mfront::AbaqusInterfaceBase::getFiniteStrainStrategyAttributeName ( const std::string & )
staticnodiscard
Returns
the name of the attribute storing the finite strain strategy selected for the given interface
Parameters
[in]iname of the interface, as returned by getInterfaceName
Note
the abaqus and abaqusexplicit interfaces may be used in the same call to mfront: each interface stores its own options.

◆ getFunctionNameBasis()

std::string mfront::AbaqusInterfaceBase::getFunctionNameBasis ( const std::string & ) const
nodiscardoverrideprotectedvirtual
Returns
the basis for the function(s)' names implementing the behaviour generated by the interface. This can be different from the name of the behaviour to comply with the targeted code restrictions. For example, the Abaqus interfaces require the function name to be upper-cased.
Note
Some interfaces generate one function per behaviour. The name of this function shall be the one returned by this method. The other interfaces generate one function per hypothesis: the function to be called the appends a suffix associated with the modelling hypothesis to the name returned by this method. In any case, the UMAT++ symbols' names are build using the name returned by this method.
Parameters
[in]n: name of the behaviour as defined by interface (generally taking into account the material and the behaviour name)

Implements mfront::BehaviourInterfaceBase.

◆ getFunctionNameForHypothesis()

virtual std::string mfront::AbaqusInterfaceBase::getFunctionNameForHypothesis ( const std::string & ,
const Hypothesis  ) const
nodiscardprotectedvirtual
Returns
the name of the function generated by the interface
Parameters
[in]nname of the behaviour as defined by interface (generally taking into account the material and the behaviour name)
[in]hmodelling hypothesis

◆ getLibraryName()

std::string mfront::AbaqusInterfaceBase::getLibraryName ( const BehaviourDescription & ) const
nodiscardoverrideprotectedvirtual
Returns
the name of the generated library
Parameters
[in]mb: behaviour description

Implements mfront::UMATInterfaceBase.

◆ getModellingHypothesesToBeTreated()

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

Implements mfront::AbstractBehaviourInterface.

◆ getOrthotropyManagementPolicy()

std::string mfront::AbaqusInterfaceBase::getOrthotropyManagementPolicy ( const std::string & ,
const BehaviourDescription &  )
staticnodiscard
Parameters
[in]iname of the interface
[in]bdbehaviour description.

◆ getOrthotropyManagementPolicyAttributeName()

std::string mfront::AbaqusInterfaceBase::getOrthotropyManagementPolicyAttributeName ( const std::string & )
staticnodiscard
Returns
the name of the attribute storing the orthotropy management policy selected for the given interface
Parameters
[in]iname of the interface, as returned by getInterfaceName

◆ getStateVariablesOffset()

virtual unsigned short mfront::AbaqusInterfaceBase::getStateVariablesOffset ( const BehaviourDescription & ,
const Hypothesis  ) const
nodiscardprotectedvirtual

return the state variable offset used for variables used internally by the abaqus interface

Parameters
[in]mbbehaviour description
[in]hmodelling hypothesis

◆ hasFiniteStrainStrategy()

bool mfront::AbaqusInterfaceBase::hasFiniteStrainStrategy ( const std::string & ,
const BehaviourDescription &  )
staticnodiscard

check if the behaviour has been associated to a strain measure or if a finite strain strategy has been defined.

Parameters
[in]iname of the interface
[in]bdbehaviour description.

◆ hasOrthotropyManagementPolicy()

bool mfront::AbaqusInterfaceBase::hasOrthotropyManagementPolicy ( const std::string & ,
const BehaviourDescription &  )
staticnodiscard
Parameters
[in]iname of the interface
[in]bdbehaviour description.

◆ treatCommonKeywords()

virtual std::pair< bool, tokens_iterator > mfront::AbaqusInterfaceBase::treatCommonKeywords ( BehaviourDescription & ,
const std::string & ,
tokens_iterator ,
const tokens_iterator  )
nodiscardprotectedvirtual
Parameters
[in,out]bdbehaviour description
[in]k: keyword treated
[in]p: iterator to the current token
[in]pe: iterator 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.

◆ writeAbaqusBehaviourTraits()

virtual void mfront::AbaqusInterfaceBase::writeAbaqusBehaviourTraits ( std::ostream & ,
const BehaviourDescription & ,
const Hypothesis  ) const
protectedvirtual

write a specialisation of the AbaqusTraits class

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

◆ writeInputFileExample()

virtual void mfront::AbaqusInterfaceBase::writeInputFileExample ( const BehaviourDescription & ,
const FileDescription & ,
const bool  ) const
protectedvirtual
Returns
the input file example
Parameters
[in]mbbehaviour description
[in]fdfile description
[in]bif true, write the example for Abaqus-Standard. If false, write the example for Abaqus-Explicit

◆ writeMTestFileGeneratorSetModellingHypothesis()

void mfront::AbaqusInterfaceBase::writeMTestFileGeneratorSetModellingHypothesis ( std::ostream & ) const
overrideprotectedvirtual
Parameters
[in]out: output file

Implements mfront::UMATInterfaceBase.


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