tfel
Loading...
Searching...
No Matches
mtest::Behaviour Struct Referenceabstract

a simple wrapper around mechanical behaviours More...

#include </home/runner/work/tfel/tfel/mtest/include/MTest/Behaviour.hxx>

Inheritance diagram for mtest::Behaviour:
mtest::BehaviourWrapperBase mtest::StandardBehaviourBase mtest::AsterLogarithmicStrainBehaviourWrapper mtest::LogarithmicStrain1DBehaviourWrapper mtest::SmallStrainTridimensionalBehaviourWrapper mtest::AbaqusExplicitBehaviour mtest::AbaqusStandardBehaviour mtest::AnsysStandardBehaviour mtest::AsterCohesiveZoneModel mtest::AsterStandardBehaviour mtest::CalculiXStandardBehaviour mtest::CastemCohesiveZoneModel mtest::CastemModel mtest::CastemStandardBehaviour mtest::CyranoBehaviour mtest::DianaFEASmallStrainBehaviour mtest::GenericBehaviour

Public Types

using Parameters = tfel::utilities::Data
 a simple alias
using ParametersMap = tfel::utilities::DataMap
 a simple alias
using ModellingHypothesis = tfel::material::ModellingHypothesis
 a simple alias
using Hypothesis = ModellingHypothesis::Hypothesis
 a simple alias
using BehaviourType
 a simple alias
using Kinematic = tfel::material::MechanicalBehaviourBase::Kinematic
 a simple alias

Public Member Functions

virtual Hypothesis getHypothesis () const =0
virtual std::string getBehaviourName () const =0
virtual BehaviourType getBehaviourType () const =0
virtual Kinematic getBehaviourKinematic () const =0
virtual unsigned short getGradientsSize () const =0
virtual void getGradientsDefaultInitialValues (tfel::math::vector< real > &) const =0
virtual unsigned short getThermodynamicForcesSize () const =0
virtual std::vector< std::string > getStensorComponentsSuffixes () const =0
virtual std::vector< std::string > getVectorComponentsSuffixes () const =0
virtual std::vector< std::string > getTensorComponentsSuffixes () const =0
virtual std::vector< std::string > getGradientsComponents () const =0
virtual std::vector< std::string > getThermodynamicForcesComponents () const =0
virtual unsigned short getGradientComponentPosition (const std::string &) const =0
virtual unsigned short getThermodynamicForceComponentPosition (const std::string &) const =0
virtual size_t getTangentOperatorArraySize () const =0
virtual std::vector< std::pair< std::string, std::string > > getTangentOperatorBlocks () const =0
virtual unsigned short getSymmetryType () const =0
virtual std::vector< std::string > getMaterialPropertiesNames () const =0
virtual size_t getMaterialPropertiesSize () const =0
virtual std::vector< std::string > getOptionalMaterialProperties () const =0
virtual void setOptionalMaterialPropertiesDefaultValues (EvolutionManager &, const EvolutionManager &) const =0
 This method solves two issues:
virtual std::vector< std::string > getInternalStateVariablesNames () const =0
virtual std::vector< std::string > expandInternalStateVariablesNames () const =0
virtual size_t getInternalStateVariablesSize () const =0
virtual std::vector< std::string > getInternalStateVariablesDescriptions () const =0
virtual unsigned short getInternalStateVariableType (const std::string &) const =0
virtual unsigned short getInternalStateVariablePosition (const std::string &) const =0
virtual std::vector< std::string > getExternalStateVariablesNames () const =0
virtual size_t getExternalStateVariablesSize () const =0
virtual std::vector< std::string > expandExternalStateVariablesNames () const =0
virtual unsigned short getExternalStateVariableType (const std::string &) const =0
virtual unsigned short getExternalStateVariablePosition (const std::string &) const =0
virtual std::vector< std::string > getParametersNames () const =0
virtual std::vector< std::string > getIntegerParametersNames () const =0
virtual std::vector< std::string > getUnsignedShortParametersNames () const =0
virtual double getRealParameterDefaultValue (const std::string &) const =0
virtual int getIntegerParameterDefaultValue (const std::string &) const =0
virtual unsigned short getUnsignedShortParameterDefaultValue (const std::string &) const =0
virtual void setOutOfBoundsPolicy (const tfel::material::OutOfBoundsPolicy) const =0
 set the out of bounds policy
virtual bool hasBounds (const std::string &) const =0
virtual bool hasLowerBound (const std::string &) const =0
virtual bool hasUpperBound (const std::string &) const =0
virtual long double getLowerBound (const std::string &) const =0
virtual long double getUpperBound (const std::string &) const =0
virtual bool hasPhysicalBounds (const std::string &) const =0
virtual bool hasLowerPhysicalBound (const std::string &) const =0
virtual bool hasUpperPhysicalBound (const std::string &) const =0
virtual long double getLowerPhysicalBound (const std::string &) const =0
virtual long double getUpperPhysicalBound (const std::string &) const =0
virtual void setParameter (const std::string &, const real) const =0
 set the value of a parameter
virtual void setIntegerParameter (const std::string &, const int) const =0
 set the value of a parameter
virtual void setUnsignedIntegerParameter (const std::string &, const unsigned short) const =0
 set the value of a parameter
virtual void allocateWorkSpace (BehaviourWorkSpace &) const =0
 allocate workspace
virtual void allocateCurrentState (CurrentState &) const =0
 allocate current state
virtual StiffnessMatrixType getDefaultStiffnessMatrixType () const =0
virtual tfel::math::tmatrix< 3u, 3u, real > getRotationMatrix (const tfel::math::vector< real > &, const tfel::math::tmatrix< 3u, 3u, real > &) const =0
 compute the real rotation matrix
virtual bool doPackagingStep (CurrentState &, BehaviourWorkSpace &) const =0
 execute the packaging step. This victious step is done at the beginning of the computation.
virtual std::pair< bool, real > computePredictionOperator (BehaviourWorkSpace &, const CurrentState &, const StiffnessMatrixType) const =0
 compute the prediction operator at the beginning of the time step.
virtual std::pair< bool, real > integrate (CurrentState &, BehaviourWorkSpace &, const real, const StiffnessMatrixType) const =0
 integrate the mechanical behaviour over the time step
virtual ~Behaviour ()
 destructor

Static Public Member Functions

static void setOptionalMaterialPropertyDefaultValue (EvolutionManager &, const EvolutionManager &, const std::string &, const real)
 This function set a material property to its default value if it not already declared.
static std::shared_ptr< Behaviour > getBehaviour (const std::string &, const std::string &, const std::string &, const Parameters &, const Hypothesis)
 build a behaviour

Detailed Description

a simple wrapper around mechanical behaviours

Member Typedef Documentation

◆ BehaviourType

Member Function Documentation

◆ allocateCurrentState()

virtual void mtest::Behaviour::allocateCurrentState ( CurrentState & ) const
pure virtual

allocate current state

Parameters
[out]cs: current state

Implemented in mtest::AsterLogarithmicStrainBehaviourWrapper, mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ allocateWorkSpace()

◆ computePredictionOperator()

virtual std::pair< bool, real > mtest::Behaviour::computePredictionOperator ( BehaviourWorkSpace & ,
const CurrentState & ,
const StiffnessMatrixType  ) const
pure virtual

compute the prediction operator at the beginning of the time step.

Returns
a pair. The first member is true if the integration was successfull, false otherwise. The second member contains a time step scaling factor.
Parameters
[out]wk: behaviour workspace
[in]s: current state
[in]ktype: type of the stiffness matrix

Implemented in mtest::AbaqusExplicitBehaviour, mtest::AbaqusStandardBehaviour, mtest::AnsysStandardBehaviour, mtest::AsterCohesiveZoneModel, mtest::AsterLogarithmicStrainBehaviourWrapper, mtest::AsterStandardBehaviour, mtest::CalculiXStandardBehaviour, mtest::CastemCohesiveZoneModel, mtest::CastemFiniteStrainBehaviour, mtest::CastemModel, mtest::CastemSmallStrainBehaviour, mtest::CyranoBehaviour, mtest::DianaFEASmallStrainBehaviour, mtest::GenericBehaviour, mtest::LogarithmicStrain1DBehaviourWrapper, and mtest::SmallStrainTridimensionalBehaviourWrapper.

◆ doPackagingStep()

virtual bool mtest::Behaviour::doPackagingStep ( CurrentState & ,
BehaviourWorkSpace &  ) const
pure virtual

execute the packaging step. This victious step is done at the beginning of the computation.

Returns
a boolean
Parameters
[out]wk: behaviour workspace
[in]s: current state

Implemented in mtest::AbaqusExplicitBehaviour, mtest::AsterLogarithmicStrainBehaviourWrapper, mtest::LogarithmicStrain1DBehaviourWrapper, mtest::SmallStrainTridimensionalBehaviourWrapper, and mtest::StandardBehaviourBase.

◆ expandExternalStateVariablesNames()

virtual std::vector< std::string > mtest::Behaviour::expandExternalStateVariablesNames ( ) const
pure virtual

◆ expandInternalStateVariablesNames()

virtual std::vector< std::string > mtest::Behaviour::expandInternalStateVariablesNames ( ) const
pure virtual

◆ getBehaviour()

std::shared_ptr< Behaviour > mtest::Behaviour::getBehaviour ( const std::string & ,
const std::string & ,
const std::string & ,
const Parameters & ,
const Hypothesis  )
static

build a behaviour

Parameters
[in]iinterface
[in]llibrary
[in]ffunction
[in]dparameter
[in]hmodelling hypothesis

◆ getBehaviourKinematic()

virtual Kinematic mtest::Behaviour::getBehaviourKinematic ( ) const
pure virtual

◆ getBehaviourName()

virtual std::string mtest::Behaviour::getBehaviourName ( ) const
pure virtual
Returns
the name of the behaviour

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getBehaviourType()

virtual BehaviourType mtest::Behaviour::getBehaviourType ( ) const
pure virtual

◆ getDefaultStiffnessMatrixType()

◆ getExternalStateVariablePosition()

virtual unsigned short mtest::Behaviour::getExternalStateVariablePosition ( const std::string & ) const
pure virtual
Returns
the position of an external variable
Parameters
[in]n: external variable name

Implemented in mtest::AsterLogarithmicStrainBehaviourWrapper, mtest::LogarithmicStrain1DBehaviourWrapper, mtest::SmallStrainTridimensionalBehaviourWrapper, and mtest::StandardBehaviourBase.

◆ getExternalStateVariablesNames()

virtual std::vector< std::string > mtest::Behaviour::getExternalStateVariablesNames ( ) const
pure virtual

◆ getExternalStateVariablesSize()

virtual size_t mtest::Behaviour::getExternalStateVariablesSize ( ) const
pure virtual

◆ getExternalStateVariableType()

virtual unsigned short mtest::Behaviour::getExternalStateVariableType ( const std::string & ) const
pure virtual

◆ getGradientComponentPosition()

virtual unsigned short mtest::Behaviour::getGradientComponentPosition ( const std::string & ) const
pure virtual

◆ getGradientsComponents()

virtual std::vector< std::string > mtest::Behaviour::getGradientsComponents ( ) const
pure virtual

◆ getGradientsDefaultInitialValues()

◆ getGradientsSize()

virtual unsigned short mtest::Behaviour::getGradientsSize ( ) const
pure virtual
Returns
the size of a vector able to contain all the components of the driving variables

Implemented in mtest::AsterLogarithmicStrainBehaviourWrapper, mtest::LogarithmicStrain1DBehaviourWrapper, mtest::SmallStrainTridimensionalBehaviourWrapper, and mtest::StandardBehaviourBase.

◆ getHypothesis()

virtual Hypothesis mtest::Behaviour::getHypothesis ( ) const
pure virtual

◆ getIntegerParameterDefaultValue()

virtual int mtest::Behaviour::getIntegerParameterDefaultValue ( const std::string & ) const
pure virtual
Returns
the default value of an integer parameter
Parameters
[in]pparameter name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getIntegerParametersNames()

virtual std::vector< std::string > mtest::Behaviour::getIntegerParametersNames ( ) const
pure virtual
Returns
the names of integer parameters

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getInternalStateVariablePosition()

virtual unsigned short mtest::Behaviour::getInternalStateVariablePosition ( const std::string & ) const
pure virtual
Returns
the position of an internal variable
Parameters
[in]n: internal variable name

Implemented in mtest::AsterLogarithmicStrainBehaviourWrapper, mtest::LogarithmicStrain1DBehaviourWrapper, mtest::SmallStrainTridimensionalBehaviourWrapper, and mtest::StandardBehaviourBase.

◆ getInternalStateVariablesDescriptions()

virtual std::vector< std::string > mtest::Behaviour::getInternalStateVariablesDescriptions ( ) const
pure virtual

◆ getInternalStateVariablesNames()

virtual std::vector< std::string > mtest::Behaviour::getInternalStateVariablesNames ( ) const
pure virtual

◆ getInternalStateVariablesSize()

virtual size_t mtest::Behaviour::getInternalStateVariablesSize ( ) const
pure virtual

◆ getInternalStateVariableType()

virtual unsigned short mtest::Behaviour::getInternalStateVariableType ( const std::string & ) const
pure virtual

◆ getLowerBound()

virtual long double mtest::Behaviour::getLowerBound ( const std::string & ) const
pure virtual
Returns
the lower bound of the given variable
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getLowerPhysicalBound()

virtual long double mtest::Behaviour::getLowerPhysicalBound ( const std::string & ) const
pure virtual
Returns
the lower bound of the given variable
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getMaterialPropertiesNames()

virtual std::vector< std::string > mtest::Behaviour::getMaterialPropertiesNames ( ) const
pure virtual
Returns
the names of the material properties

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getMaterialPropertiesSize()

virtual size_t mtest::Behaviour::getMaterialPropertiesSize ( ) const
pure virtual
Returns
the number of the material properties

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getOptionalMaterialProperties()

◆ getParametersNames()

virtual std::vector< std::string > mtest::Behaviour::getParametersNames ( ) const
pure virtual
Returns
the names of floating point parameters

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getRealParameterDefaultValue()

virtual double mtest::Behaviour::getRealParameterDefaultValue ( const std::string & ) const
pure virtual
Returns
the default value of a parameter
Parameters
[in]pparameter name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getRotationMatrix()

◆ getStensorComponentsSuffixes()

virtual std::vector< std::string > mtest::Behaviour::getStensorComponentsSuffixes ( ) const
pure virtual

◆ getSymmetryType()

virtual unsigned short mtest::Behaviour::getSymmetryType ( ) const
pure virtual
Returns
the type of the behaviour 0 means that the behaviour is isotropic. 1 means that the behaviour is orthotropic.

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getTangentOperatorArraySize()

virtual size_t mtest::Behaviour::getTangentOperatorArraySize ( ) const
pure virtual

◆ getTangentOperatorBlocks()

virtual std::vector< std::pair< std::string, std::string > > mtest::Behaviour::getTangentOperatorBlocks ( ) const
pure virtual
Returns
the tangent operator blocks defined by the behaviour. Those blocks can be unused by MTest.

Implemented in mtest::AsterLogarithmicStrainBehaviourWrapper, mtest::LogarithmicStrain1DBehaviourWrapper, mtest::SmallStrainTridimensionalBehaviourWrapper, and mtest::StandardBehaviourBase.

◆ getTensorComponentsSuffixes()

virtual std::vector< std::string > mtest::Behaviour::getTensorComponentsSuffixes ( ) const
pure virtual

◆ getThermodynamicForceComponentPosition()

virtual unsigned short mtest::Behaviour::getThermodynamicForceComponentPosition ( const std::string & ) const
pure virtual

◆ getThermodynamicForcesComponents()

virtual std::vector< std::string > mtest::Behaviour::getThermodynamicForcesComponents ( ) const
pure virtual

◆ getThermodynamicForcesSize()

virtual unsigned short mtest::Behaviour::getThermodynamicForcesSize ( ) const
pure virtual
Returns
the size of a vector able to contain all the components of the thermodynamic forces

Implemented in mtest::AsterLogarithmicStrainBehaviourWrapper, mtest::LogarithmicStrain1DBehaviourWrapper, mtest::SmallStrainTridimensionalBehaviourWrapper, and mtest::StandardBehaviourBase.

◆ getUnsignedShortParameterDefaultValue()

virtual unsigned short mtest::Behaviour::getUnsignedShortParameterDefaultValue ( const std::string & ) const
pure virtual
Returns
the default value of an integer parameter
Parameters
[in]pparameter name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getUnsignedShortParametersNames()

virtual std::vector< std::string > mtest::Behaviour::getUnsignedShortParametersNames ( ) const
pure virtual
Returns
the names of unsigned short parameters

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getUpperBound()

virtual long double mtest::Behaviour::getUpperBound ( const std::string & ) const
pure virtual
Returns
the upper bound of the given variable
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getUpperPhysicalBound()

virtual long double mtest::Behaviour::getUpperPhysicalBound ( const std::string & ) const
pure virtual
Returns
the upper bound of the given variable
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ getVectorComponentsSuffixes()

virtual std::vector< std::string > mtest::Behaviour::getVectorComponentsSuffixes ( ) const
pure virtual

◆ hasBounds()

virtual bool mtest::Behaviour::hasBounds ( const std::string & ) const
pure virtual
Returns
true if the given variable has bounds
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ hasLowerBound()

virtual bool mtest::Behaviour::hasLowerBound ( const std::string & ) const
pure virtual
Returns
true if the given variable has a lower bound
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ hasLowerPhysicalBound()

virtual bool mtest::Behaviour::hasLowerPhysicalBound ( const std::string & ) const
pure virtual
Returns
true if the given variable has a lower physical bound
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ hasPhysicalBounds()

virtual bool mtest::Behaviour::hasPhysicalBounds ( const std::string & ) const
pure virtual
Returns
true if the given variable has physical bounds
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ hasUpperBound()

virtual bool mtest::Behaviour::hasUpperBound ( const std::string & ) const
pure virtual
Returns
true if the given variable has an upper bound
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ hasUpperPhysicalBound()

virtual bool mtest::Behaviour::hasUpperPhysicalBound ( const std::string & ) const
pure virtual
Returns
true if the given variable has a upper physical bound
Parameters
[in]vvariable name

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ integrate()

virtual std::pair< bool, real > mtest::Behaviour::integrate ( CurrentState & ,
BehaviourWorkSpace & ,
const real ,
const StiffnessMatrixType  ) const
pure virtual

integrate the mechanical behaviour over the time step

Returns
a pair. The first member is true if the integration was successfull, false otherwise. The second member contains a time step scaling factor.
Parameters
[out/in]s : current state
[out]wk: behaviour workspace
[in]dt: time increment
[in]ktype: type of the stiffness matrix

Implemented in mtest::AbaqusExplicitBehaviour, mtest::AbaqusStandardBehaviour, mtest::AnsysStandardBehaviour, mtest::AsterCohesiveZoneModel, mtest::AsterLogarithmicStrainBehaviourWrapper, mtest::AsterStandardBehaviour, mtest::CalculiXStandardBehaviour, mtest::CastemCohesiveZoneModel, mtest::CastemFiniteStrainBehaviour, mtest::CastemModel, mtest::CastemSmallStrainBehaviour, mtest::CyranoBehaviour, mtest::DianaFEASmallStrainBehaviour, mtest::GenericBehaviour, mtest::LogarithmicStrain1DBehaviourWrapper, and mtest::SmallStrainTridimensionalBehaviourWrapper.

◆ setIntegerParameter()

virtual void mtest::Behaviour::setIntegerParameter ( const std::string & ,
const int  ) const
pure virtual

set the value of a parameter

Parameters
[in]n: name of the parameter
[in]v: value

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ setOptionalMaterialPropertiesDefaultValues()

virtual void mtest::Behaviour::setOptionalMaterialPropertiesDefaultValues ( EvolutionManager & ,
const EvolutionManager &  ) const
pure virtual

This method solves two issues:

  • Some interface requires dummy material properties to be declared. For example, the Cast3M finite element solver requires the mass density and some extra material properties describing orthotropic axes to be declared. This method is meant to automatically declare those if they are not defined by the user.
  • Some interface (mistral) uses an external files which gives the values of some material properties. This method is used to pass thoses values to MTest.
Parameters
[out]mp: evolution manager where
[in]evm: evolution manager

Implemented in mtest::AnsysStandardBehaviour, mtest::AsterCohesiveZoneModel, mtest::BehaviourWrapperBase, mtest::CastemCohesiveZoneModel, mtest::CastemModel, mtest::CastemStandardBehaviour, mtest::CastemUmatFiniteStrainBehaviour, mtest::CastemUmatSmallStrainBehaviour, mtest::DianaFEASmallStrainBehaviour, mtest::GenericBehaviour, mtest::MistralBehaviour, and mtest::StandardBehaviourBase.

◆ setOptionalMaterialPropertyDefaultValue()

void mtest::Behaviour::setOptionalMaterialPropertyDefaultValue ( EvolutionManager & ,
const EvolutionManager & ,
const std::string & ,
const real  )
static

This function set a material property to its default value if it not already declared.

Parameters
[out]mp: evolution manager where
[in]evm: evolution manager
[in]n: material property name
[in]v: default value

◆ setOutOfBoundsPolicy()

virtual void mtest::Behaviour::setOutOfBoundsPolicy ( const tfel::material::OutOfBoundsPolicy ) const
pure virtual

set the out of bounds policy

Parameters
[in]p: policy selected

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ setParameter()

virtual void mtest::Behaviour::setParameter ( const std::string & ,
const real  ) const
pure virtual

set the value of a parameter

Parameters
[in]n: name of the parameter
[in]v: value

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.

◆ setUnsignedIntegerParameter()

virtual void mtest::Behaviour::setUnsignedIntegerParameter ( const std::string & ,
const unsigned short  ) const
pure virtual

set the value of a parameter

Parameters
[in]n: name of the parameter
[in]v: value

Implemented in mtest::BehaviourWrapperBase, and mtest::StandardBehaviourBase.


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