tfel
Loading...
Searching...
No Matches
BrickUtilities.hxx File Reference
#include <array>
#include <string>
#include <memory>
#include <vector>
#include <functional>
#include "TFEL/Utilities/Data.hxx"
#include "TFEL/Glossary/GlossaryEntry.hxx"
#include "MFront/MFrontConfig.hxx"
#include "MFront/AbstractBehaviourDSL.hxx"
#include "MFront/BehaviourDescription.hxx"
#include "MFront/BehaviourBrick/BrickUtilities.ixx"

Namespaces

namespace  mfront
 This namespace contains material used to build the MFront code generator.

Functions

MFRONT_VISIBILITY_EXPORT std::function< std::string(const BehaviourDescription::MaterialPropertyInput &)> mfront::bbrick::getMiddleOfTimeStepModifier (const BehaviourDescription &)
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::checkOptionsNames (const std::map< std::string, tfel::utilities::Data > &, const std::vector< std::string > &, const std::string &)
 check that the options names are in a given set of keys.
MFRONT_VISIBILITY_EXPORT bool mfront::bbrick::areAllConstantMaterialProperties (const std::vector< BehaviourDescription::MaterialProperty > &)
template<std::size_t N>
bool mfront::bbrick::areAllConstantMaterialProperties (const std::array< BehaviourDescription::MaterialProperty, N > &)
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::declareParameterOrLocalVariable (BehaviourDescription &, BehaviourDescription::MaterialProperty &, const std::string &, const std::string &)
 declare a parameter or a local variable used to store the evaluation of the material property.
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::declareParameterOrLocalVariable (BehaviourDescription &, std::vector< BehaviourDescription::MaterialProperty > &, const std::string &, const std::string &)
 declare an array of parameters or an array of local variables used to store the evaluation of an array of material properties.
template<std::size_t N>
void mfront::bbrick::declareParameterOrLocalVariable (BehaviourDescription &, std::array< BehaviourDescription::MaterialProperty, N > &, const std::string &, const std::string &)
 declare an array of parameters or an array of local variables used to store the evaluation of an array of material properties.
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::declareParameterOrLocalVariable (BehaviourDescription &, BehaviourDescription::MaterialProperty &, const std::string &, const std::string &, const std::string &)
 declare a parameter or a local variable used to store the evaluation of the material property.
template<std::size_t N>
void mfront::bbrick::declareParameterOrLocalVariable (BehaviourDescription &, std::array< BehaviourDescription::MaterialProperty, N > &, const std::string &, const std::string &, const std::string &)
 declare an array of parameters or an array of local variables used to store the evaluation of an array of material properties.
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::declareParameterOrLocalVariable (BehaviourDescription &, BehaviourDescription::MaterialProperty &, const std::string &, const std::string &, const tfel::glossary::GlossaryEntry &)
 declare a parameter or a local variable used to store the evaluation of the material property.
template<std::size_t N>
void mfront::bbrick::declareParameterOrLocalVariable (BehaviourDescription &, std::array< BehaviourDescription::MaterialProperty, N > &, const std::string &, const std::string &, const tfel::glossary::GlossaryEntry &)
 declare an array of parameters or an array of local variables used to store the evaluation of an array of material properties.
MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::generateMaterialPropertyInitializationCode (const AbstractBehaviourDSL &, const BehaviourDescription &, const std::string &, const BehaviourDescription::MaterialProperty &)
MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::generateMaterialPropertiesInitializationCode (const AbstractBehaviourDSL &, const BehaviourDescription &, const std::string &, const std::vector< BehaviourDescription::MaterialProperty > &)
template<std::size_t N>
std::string mfront::bbrick::generateMaterialPropertiesInitializationCode (const AbstractBehaviourDSL &, const BehaviourDescription &, const std::string &, const std::array< BehaviourDescription::MaterialProperty, N > &)
MFRONT_VISIBILITY_EXPORT std::array< BehaviourDescription::MaterialProperty, 9u > mfront::bbrick::extractLinearTransformation (AbstractBehaviourDSL &, BehaviourDescription &, const tfel::utilities::DataMap &, const std::string_view, const std::string_view, const std::string_view)
 extract a linear transformation from the given map
MFRONT_VISIBILITY_EXPORT std::array< BehaviourDescription::MaterialProperty, 6u > mfront::bbrick::extractHillTensorCoefficients (AbstractBehaviourDSL &, BehaviourDescription &, const tfel::utilities::DataMap &, const std::string_view, const std::string_view, const std::string_view)
 extract the coefficients describing a Hill tensor from the given map
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addMaterialPropertyIfNotDefined (BehaviourDescription &, const std::string &, const std::string &, const tfel::glossary::GlossaryEntry &, const unsigned short=1u)
 add a new material property
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addMaterialPropertyIfNotDefined (BehaviourDescription &, const std::string &, const std::string &, const std::string &, const unsigned short=1u)
 add a new material property
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariable (BehaviourDescription &, const std::string &, const std::string &, const unsigned short=1u)
 add a new state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariable (BehaviourDescription &, const std::string &, const std::string &, const tfel::glossary::GlossaryEntry &, const unsigned short=1u)
 add a new state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariable (BehaviourDescription &, const std::string &, const std::string &, const std::string &, const unsigned short=1u)
 add a new state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariableIfNotDefined (BehaviourDescription &, const std::string &, const std::string &, const tfel::glossary::GlossaryEntry &, const unsigned short=1u, const bool bo=false)
 add a new state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariableIfNotDefined (BehaviourDescription &, const std::string &, const std::string &, const std::string &, const unsigned short=1u, const bool bo=false)
 add a new state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::checkNoNormalisationFactor (const BehaviourDescription &, const std::string &)
 check that no normalisation factor has been given to an integration variable handled by a brick: the code generated by the bricks uses the increment of this variable without normalisation.
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::checkNoImplicitEquationNormalisationFactor (const BehaviourDescription &, const AbstractBehaviourDSL &, const BehaviourDescription::Hypothesis, const std::string &)
 check that no normalisation factor has been given to the implicit equation associated with an integration variable, when a brick computes some jacobian blocks of this equation: the code generated by the implicit DSLs only scales the jacobian blocks used in the @Integrator code block of the user (and the diagonal blocks when the jacobian is reset to the identity at each iteration). Nothing is checked if the jacobian is not computed analytically.
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::checkNoImplicitEquationNormalisationFactor (const BehaviourDescription &, const AbstractBehaviourDSL &, const std::string &)
 same as the previous function, for all the modelling hypotheses.
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addAuxiliaryStateVariableIfNotDefined (BehaviourDescription &, const std::string &, const std::string &, const tfel::glossary::GlossaryEntry &, const unsigned short=1u, const bool bo=false)
 add a new auxiliary state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addAuxiliaryStateVariableIfNotDefined (BehaviourDescription &, const std::string &, const std::string &, const std::string &, const unsigned short=1u, const bool bo=false)
 add a new auxiliary state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addExternalStateVariable (BehaviourDescription &, const std::string &, const std::string &, const unsigned short=1u)
 add a new external state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addExternalStateVariable (BehaviourDescription &, const std::string &, const std::string &, const tfel::glossary::GlossaryEntry &, const unsigned short=1u)
 add a new external state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addExternalStateVariable (BehaviourDescription &, const std::string &, const std::string &, const std::string &, const unsigned short=1u)
 add a new external state variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addLocalVariable (BehaviourDescription &, const std::string &, const std::string &, const unsigned short=1u)
 add a new local variable
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter (BehaviourDescription &, const std::string &, const tfel::glossary::GlossaryEntry &e, const double)
 add a new material property
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter (BehaviourDescription &, const std::string &, const tfel::glossary::GlossaryEntry &, const unsigned short, const double)
 add a new material property
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter (BehaviourDescription &, const std::string &, const tfel::glossary::GlossaryEntry &, const unsigned short, const std::vector< double > &)
 add a new material property
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter (BehaviourDescription &, const std::string &, const std::string &, const double)
 add a new material property
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter (BehaviourDescription &, const std::string &, const std::string &, const unsigned short, const double)
 add a new material property
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter (BehaviourDescription &, const std::string &, const std::string &, const unsigned short, const std::vector< double > &)
 add a new material property
MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::computeElasticLimitInitialValue (const BehaviourDescription &, const std::vector< std::shared_ptr< IsotropicHardeningRule > > &, const std::string &)
 generate the code that evaluates the initial elastic limit.
MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::computeElasticLimit (const BehaviourDescription &, const std::vector< std::shared_ptr< IsotropicHardeningRule > > &, const std::string &, const std::string &="this->theta")
 generate the code that evaluates the elastic limit.
MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::computeElasticLimitAndDerivative (const BehaviourDescription &, const std::vector< std::shared_ptr< IsotropicHardeningRule > > &, const std::string &, const std::string &="this->theta")
 generate the code that evaluates the elastic limit and its derivative with respect to the equivalent strain.
MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::handleEigenSolverOption (const std::string &)
 return a string representation of the eigen solver enum associated with this string according to the following map:
MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::getBrokenTest (const BehaviourDescription &, const bool)
MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addBrokenStateSupportToComputeStress (std::string &, const BehaviourDescription &, const bool)
 if a variable with the glossary name Broken has been defined, this function includes the given piece of code evaluating the stress tensor in a conditional block. If the material is broken, the stress tensor is set to zero. If the material is not broken, the original code is called. The given code is not modified if no variable with glossary name Broken is defined.
MFRONT_VISIBILITY_EXPORT std::vector< BehaviourDescription::MaterialProperty > mfront::bbrick::getArrayOfBehaviourDescriptionMaterialProperties (AbstractBehaviourDSL &, const std::string_view, const tfel::utilities::Data &)
template<std::size_t N>
std::array< BehaviourDescription::MaterialProperty, N > mfront::bbrick::getArrayOfBehaviourDescriptionMaterialProperties (AbstractBehaviourDSL &, const std::string_view, const tfel::utilities::Data &)

Detailed Description

Author
Thomas Helfer
Date
20/03/2018

Function Documentation

◆ addAuxiliaryStateVariableIfNotDefined() [1/2]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addAuxiliaryStateVariableIfNotDefined ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const std::string & ,
const unsigned short = 1u,
const bool bo = false )

add a new auxiliary state variable

Parameters
[in]bdbehaviour description
[in]ttype of the state variable
[in]nname of the variable
[in]eentry name
[in]sarray size
[in]boallow name shadowing. If true, allows that a state variable with the given entry name but a different name has already been defined.

◆ addAuxiliaryStateVariableIfNotDefined() [2/2]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addAuxiliaryStateVariableIfNotDefined ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const tfel::glossary::GlossaryEntry & ,
const unsigned short = 1u,
const bool bo = false )

add a new auxiliary state variable

Parameters
[in]bdbehaviour description
[in]ttype of the state variable
[in]nname of the variable
[in]gglossary name
[in]sarray size
[in]boallow name shadowing. If true, allows that a state variable with the given glossary name but a different name has already been defined.

◆ addBrokenStateSupportToComputeStress()

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addBrokenStateSupportToComputeStress ( std::string & ,
const BehaviourDescription & ,
const bool  )

if a variable with the glossary name Broken has been defined, this function includes the given piece of code evaluating the stress tensor in a conditional block. If the material is broken, the stress tensor is set to zero. If the material is not broken, the original code is called. The given code is not modified if no variable with glossary name Broken is defined.

Parameters
[in,out]coriginal code on input, modified code on output.
[in]bdbehaviour description.
[in]bboolean stating if the broken must be evaluated at the end of the time step (true) or at the middle of the time step (false).

◆ addExternalStateVariable() [1/3]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addExternalStateVariable ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const std::string & ,
const unsigned short = 1u )

add a new external state variable

Parameters
[in]bdbehaviour description
[in]ttype of the material property
[in]nname of the variable
[in]eentry name
[in]sarray size

◆ addExternalStateVariable() [2/3]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addExternalStateVariable ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const tfel::glossary::GlossaryEntry & ,
const unsigned short = 1u )

add a new external state variable

Parameters
[in]bdbehaviour description
[in]ttype of the material property
[in]nname of the variable
[in]gglossary entry
[in]sarray size

◆ addExternalStateVariable() [3/3]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addExternalStateVariable ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const unsigned short = 1u )

add a new external state variable

Parameters
[in]bdbehaviour description
[in]ttype of the material property
[in]nname of the variable
[in]sarray size

◆ addLocalVariable()

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addLocalVariable ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const unsigned short = 1u )

add a new local variable

Parameters
[in]bdbehaviour description
[in]ttype of the material property
[in]nname of the variable
[in]sarray size

◆ addMaterialPropertyIfNotDefined() [1/2]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addMaterialPropertyIfNotDefined ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const std::string & ,
const unsigned short = 1u )

add a new material property

Parameters
[in]bdbehaviour description
[in]ttype of the material property
[in]nname of the variable
[in]eentry name
[in]sarray size

◆ addMaterialPropertyIfNotDefined() [2/2]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addMaterialPropertyIfNotDefined ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const tfel::glossary::GlossaryEntry & ,
const unsigned short = 1u )

add a new material property

Parameters
[in]bdbehaviour description
[in]ttype of the material property
[in]nname of the variable
[in]gglossary name
[in]sarray size

◆ addParameter() [1/6]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const double  )

add a new material property

Parameters
[in]bdbehaviour description
[in]nname of the variable
[in]eentry name
[in]pparameter default value

◆ addParameter() [2/6]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const unsigned short ,
const double  )

add a new material property

Parameters
[in]bdbehaviour description
[in]nname of the variable
[in]eentry name
[in]sarray size
[in]pparameter default value

◆ addParameter() [3/6]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const unsigned short ,
const std::vector< double > &  )

add a new material property

Parameters
[in]bdbehaviour description
[in]nname of the variable
[in]eentry name
[in]sarray size
[in]pparameter default values

◆ addParameter() [4/6]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter ( BehaviourDescription & ,
const std::string & ,
const tfel::glossary::GlossaryEntry & ,
const unsigned short ,
const double  )

add a new material property

Parameters
[in]bdbehaviour description
[in]nname of the variable
[in]eentry name
[in]sarray size
[in]pparameter default value

◆ addParameter() [5/6]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter ( BehaviourDescription & ,
const std::string & ,
const tfel::glossary::GlossaryEntry & ,
const unsigned short ,
const std::vector< double > &  )

add a new material property

Parameters
[in]bdbehaviour description
[in]nname of the variable
[in]eentry name
[in]sarray size
[in]pparameter default values

◆ addParameter() [6/6]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addParameter ( BehaviourDescription & ,
const std::string & ,
const tfel::glossary::GlossaryEntry & e,
const double  )

add a new material property

Parameters
[in]bdbehaviour description
[in]nname of the variable
[in]eentry name
[in]pparameter default value

◆ addStateVariable() [1/3]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariable ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const std::string & ,
const unsigned short = 1u )

add a new state variable

Parameters
[in]bdbehaviour description
[in]ttype of the material property
[in]nname of the variable
[in]eentry name
[in]sarray size

◆ addStateVariable() [2/3]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariable ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const tfel::glossary::GlossaryEntry & ,
const unsigned short = 1u )

add a new state variable

Parameters
[in]bdbehaviour description
[in]ttype of the material property
[in]nname of the variable
[in]gglossary entry
[in]sarray size

◆ addStateVariable() [3/3]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariable ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const unsigned short = 1u )

add a new state variable

Parameters
[in]bdbehaviour description
[in]ttype of the material property
[in]nname of the variable
[in]sarray size

◆ addStateVariableIfNotDefined() [1/2]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariableIfNotDefined ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const std::string & ,
const unsigned short = 1u,
const bool bo = false )

add a new state variable

Parameters
[in]bdbehaviour description
[in]ttype of the state variable
[in]nname of the variable
[in]eentry name
[in]sarray size
[in]boallow name shadowing. If true, allows that a state variable with the given entry name but a different name has already been defined.

◆ addStateVariableIfNotDefined() [2/2]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::addStateVariableIfNotDefined ( BehaviourDescription & ,
const std::string & ,
const std::string & ,
const tfel::glossary::GlossaryEntry & ,
const unsigned short = 1u,
const bool bo = false )

add a new state variable

Parameters
[in]bdbehaviour description
[in]ttype of the state variable
[in]nname of the variable
[in]gglossary name
[in]sarray size
[in]boallow name shadowing. If true, allows that a state variable with the given glossary name but a different name has already been defined.

◆ areAllConstantMaterialProperties() [1/2]

template<std::size_t N>
bool mfront::bbrick::areAllConstantMaterialProperties ( const std::array< BehaviourDescription::MaterialProperty, N > & mps)
Returns
true if all the elements of the array is constant.
Template Parameters
Nsize of the array of material properties
Parameters
[in]mpsarray of material properties

◆ areAllConstantMaterialProperties() [2/2]

MFRONT_VISIBILITY_EXPORT bool mfront::bbrick::areAllConstantMaterialProperties ( const std::vector< BehaviourDescription::MaterialProperty > & )
Returns
true if all the elements of the array is constant.
Parameters
[in]mpsarray of material properties

◆ checkNoImplicitEquationNormalisationFactor() [1/2]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::checkNoImplicitEquationNormalisationFactor ( const BehaviourDescription & ,
const AbstractBehaviourDSL & ,
const BehaviourDescription::Hypothesis ,
const std::string &  )

check that no normalisation factor has been given to the implicit equation associated with an integration variable, when a brick computes some jacobian blocks of this equation: the code generated by the implicit DSLs only scales the jacobian blocks used in the @Integrator code block of the user (and the diagonal blocks when the jacobian is reset to the identity at each iteration). Nothing is checked if the jacobian is not computed analytically.

Parameters
[in]bdbehaviour description
[in]dslbehaviour DSL
[in]hmodelling hypothesis
[in]nname of the integration variable

◆ checkNoImplicitEquationNormalisationFactor() [2/2]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::checkNoImplicitEquationNormalisationFactor ( const BehaviourDescription & ,
const AbstractBehaviourDSL & ,
const std::string &  )

same as the previous function, for all the modelling hypotheses.

Parameters
[in]bdbehaviour description
[in]dslbehaviour DSL
[in]nname of the integration variable

◆ checkNoNormalisationFactor()

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::checkNoNormalisationFactor ( const BehaviourDescription & ,
const std::string &  )

check that no normalisation factor has been given to an integration variable handled by a brick: the code generated by the bricks uses the increment of this variable without normalisation.

Parameters
[in]bdbehaviour description
[in]nname of the integration variable

◆ checkOptionsNames()

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::checkOptionsNames ( const std::map< std::string, tfel::utilities::Data > & ,
const std::vector< std::string > & ,
const std::string &  )

check that the options names are in a given set of keys.

Parameters
[in]doptions
[in]ksupported keys
[in]bcalling brick name

◆ computeElasticLimit()

MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::computeElasticLimit ( const BehaviourDescription & ,
const std::vector< std::shared_ptr< IsotropicHardeningRule > > & ,
const std::string & ,
const std::string & = "this->theta" )

generate the code that evaluates the elastic limit.

Parameters
[in]bdbehaviour description
[in]ihrslist of isotropic hardening rules.
[in]fidflow id
[in]thetaexpression of the value of the \(\theta\) parameter used to evaluate the equivalent plastic strain at the middle of the time step

◆ computeElasticLimitAndDerivative()

MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::computeElasticLimitAndDerivative ( const BehaviourDescription & ,
const std::vector< std::shared_ptr< IsotropicHardeningRule > > & ,
const std::string & ,
const std::string & = "this->theta" )

generate the code that evaluates the elastic limit and its derivative with respect to the equivalent strain.

Parameters
[in]bdbehaviour description
[in]ihrslist of isotropic hardening rules.
[in]fidflow id
[in]thetaexpression of the value of the \(\theta\) parameter used to evaluate the equivalent plastic strain at the middle of the time step

◆ computeElasticLimitInitialValue()

MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::computeElasticLimitInitialValue ( const BehaviourDescription & ,
const std::vector< std::shared_ptr< IsotropicHardeningRule > > & ,
const std::string &  )

generate the code that evaluates the initial elastic limit.

Parameters
[in]bdbehaviour description
[in]ihrslist of isotropic hardening rules.
[in]fidflow id

◆ declareParameterOrLocalVariable() [1/7]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::declareParameterOrLocalVariable ( BehaviourDescription & ,
BehaviourDescription::MaterialProperty & ,
const std::string & ,
const std::string &  )

declare a parameter or a local variable used to store the evaluation of the material property.

Parameters
[out]bdbehaviour description
[in,out]mpmaterial property
[in]tvariable type
[in]nvariable name

◆ declareParameterOrLocalVariable() [2/7]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::declareParameterOrLocalVariable ( BehaviourDescription & ,
BehaviourDescription::MaterialProperty & ,
const std::string & ,
const std::string & ,
const std::string &  )

declare a parameter or a local variable used to store the evaluation of the material property.

Parameters
[out]bdbehaviour description
[in,out]mpmaterial property
[in]tvariable type
[in]nvariable name
[in]enexternal name

◆ declareParameterOrLocalVariable() [3/7]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::declareParameterOrLocalVariable ( BehaviourDescription & ,
BehaviourDescription::MaterialProperty & ,
const std::string & ,
const std::string & ,
const tfel::glossary::GlossaryEntry &  )

declare a parameter or a local variable used to store the evaluation of the material property.

Parameters
[out]bdbehaviour description
[in,out]mpmaterial property
[in]tvariable type
[in]nvariable name
[in]gglossary entry

◆ declareParameterOrLocalVariable() [4/7]

template<std::size_t N>
void mfront::bbrick::declareParameterOrLocalVariable ( BehaviourDescription & bd,
std::array< BehaviourDescription::MaterialProperty, N > & mps,
const std::string & t,
const std::string & n )

declare an array of parameters or an array of local variables used to store the evaluation of an array of material properties.

Template Parameters
Nsize of the array of material properties
Parameters
[out]bdbehaviour description
[in,out]mpsarray of material property
[in]tvariable type
[in]nvariable name

◆ declareParameterOrLocalVariable() [5/7]

template<std::size_t N>
void mfront::bbrick::declareParameterOrLocalVariable ( BehaviourDescription & bd,
std::array< BehaviourDescription::MaterialProperty, N > & mps,
const std::string & t,
const std::string & n,
const std::string & en )

declare an array of parameters or an array of local variables used to store the evaluation of an array of material properties.

Template Parameters
Nsize of the array of material properties
Parameters
[out]bdbehaviour description
[in,out]mpsarray of material property
[in]tvariable type
[in]nvariable name
[in]enexternal name

◆ declareParameterOrLocalVariable() [6/7]

template<std::size_t N>
void mfront::bbrick::declareParameterOrLocalVariable ( BehaviourDescription & bd,
std::array< BehaviourDescription::MaterialProperty, N > & mps,
const std::string & t,
const std::string & n,
const tfel::glossary::GlossaryEntry & g )

declare an array of parameters or an array of local variables used to store the evaluation of an array of material properties.

Template Parameters
Nsize of the array of material properties
Parameters
[out]bdbehaviour description
[in,out]mpsarray of material property
[in]tvariable type
[in]nvariable name
[in]gglossary entry

◆ declareParameterOrLocalVariable() [7/7]

MFRONT_VISIBILITY_EXPORT void mfront::bbrick::declareParameterOrLocalVariable ( BehaviourDescription & ,
std::vector< BehaviourDescription::MaterialProperty > & ,
const std::string & ,
const std::string &  )

declare an array of parameters or an array of local variables used to store the evaluation of an array of material properties.

Parameters
[out]bdbehaviour description
[in,out]mpsarray of material property
[in]tvariable type
[in]nvariable name

◆ extractHillTensorCoefficients()

MFRONT_VISIBILITY_EXPORT std::array< BehaviourDescription::MaterialProperty, 6u > mfront::bbrick::extractHillTensorCoefficients ( AbstractBehaviourDSL & ,
BehaviourDescription & ,
const tfel::utilities::DataMap & ,
const std::string_view ,
const std::string_view ,
const std::string_view  )

extract the coefficients describing a Hill tensor from the given map

Parameters
[in]dslabstract behaviour dsl.
[in]bdbehaviour description
[in]ddata map
[in]oname of option containing the linear transformation
[in]nname of the variable associated with the linear transformation
[in]enexternal name of the variable associated with the linear transformation

◆ extractLinearTransformation()

MFRONT_VISIBILITY_EXPORT std::array< BehaviourDescription::MaterialProperty, 9u > mfront::bbrick::extractLinearTransformation ( AbstractBehaviourDSL & ,
BehaviourDescription & ,
const tfel::utilities::DataMap & ,
const std::string_view ,
const std::string_view ,
const std::string_view  )

extract a linear transformation from the given map

Parameters
[in]dslabstract behaviour dsl.
[in]bdbehaviour description
[in]ddata map
[in]oname of option containing the linear transformation
[in]nname of the variable associated with the linear transformation
[in]enexternal name of the variable associated with the linear transformation

◆ generateMaterialPropertiesInitializationCode() [1/2]

template<std::size_t N>
std::string mfront::bbrick::generateMaterialPropertiesInitializationCode ( const AbstractBehaviourDSL & dsl,
const BehaviourDescription & bd,
const std::string & n,
const std::array< BehaviourDescription::MaterialProperty, N > & mps )
Returns
the code initializing the arrays of variables containing the material properties' values at (t+\theta\,dt).
Note
If all the material properties are constant, an empty string is returned, as those material properties are assumed to be associated with an array of parameters.
Parameters
[in]dslabstract behaviour dsl.
[in]bdbehaviour description
[in]nname of the variable storing the material property value.
[in]mpsarray of material property description.

◆ generateMaterialPropertiesInitializationCode() [2/2]

MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::generateMaterialPropertiesInitializationCode ( const AbstractBehaviourDSL & ,
const BehaviourDescription & ,
const std::string & ,
const std::vector< BehaviourDescription::MaterialProperty > &  )
Returns
the code initializing the arrays of variables containing the material properties' values at (t+\theta\,dt).
Note
If all the material properties are constant, an empty string is returned, as those material properties are assumed to be associated with an array of parameters.
Parameters
[in]dslabstract behaviour dsl.
[in]bdbehaviour description
[in]nname of the variable storing the material property value.
[in]mpsarray of material property description.

◆ generateMaterialPropertyInitializationCode()

MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::generateMaterialPropertyInitializationCode ( const AbstractBehaviourDSL & ,
const BehaviourDescription & ,
const std::string & ,
const BehaviourDescription::MaterialProperty &  )
Returns
the code initializing the variable containing the material property value at (t+\theta\,dt).
Note
If the material property is constant, an empty string is returned, as this material property is assumed to be associated with a parameter.
Parameters
[in]dslabstract behaviour dsl.
[in]bdbehaviour description
[in]nname of the variable storing the material property value.
[in]mpmaterial property description.

◆ getArrayOfBehaviourDescriptionMaterialProperties() [1/2]

MFRONT_VISIBILITY_EXPORT std::vector< BehaviourDescription::MaterialProperty > mfront::bbrick::getArrayOfBehaviourDescriptionMaterialProperties ( AbstractBehaviourDSL & ,
const std::string_view ,
const tfel::utilities::Data &  )
Returns
an array of material properties from the data read in an input file.
Parameters
[in]bsldomain specific language
[in]nname of the material properties
[in]ddata in which the material properties are stored.

◆ getArrayOfBehaviourDescriptionMaterialProperties() [2/2]

template<std::size_t N>
std::array< BehaviourDescription::MaterialProperty, N > mfront::bbrick::getArrayOfBehaviourDescriptionMaterialProperties ( AbstractBehaviourDSL & dsl,
const std::string_view n,
const tfel::utilities::Data & d )
Returns
a fixed-sized array of material properties from the data read in an input file.
Template Parameters
Nnumber of material properties to be read
Parameters
[in]bsldomain specific language
[in]nname of the material properties
[in]ddata in which the material properties are stored.

◆ getBrokenTest()

MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::getBrokenTest ( const BehaviourDescription & ,
const bool  )
Returns
a piece of code testing if the current integration point is broken if a variable with the glossary name Broken as been defined. If no such variable has been declared, an empty string is returned.
Parameters
[in]bdbehaviour description
[in]bboolean stating if the broken must be evaluated at the end of the time step (true) or at the middle of the time step (false).

◆ getMiddleOfTimeStepModifier()

MFRONT_VISIBILITY_EXPORT std::function< std::string(const BehaviourDescription::MaterialPropertyInput &)> mfront::bbrick::getMiddleOfTimeStepModifier ( const BehaviourDescription & )
Returns
a modifier suitable for evaluating a material property at (t+\theta\,dt).
Parameters
[in]bdbehaviour description

◆ handleEigenSolverOption()

MFRONT_VISIBILITY_EXPORT std::string mfront::bbrick::handleEigenSolverOption ( const std::string & )

return a string representation of the eigen solver enum associated with this string according to the following map: