tfel
Loading...
Searching...
No Matches
mtest::BehaviourWrapperBase Struct Reference

a simple helper class to build wrapper around mechanical behaviours. More...

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

Inheritance diagram for mtest::BehaviourWrapperBase:
mtest::Behaviour mtest::AsterLogarithmicStrainBehaviourWrapper mtest::LogarithmicStrain1DBehaviourWrapper mtest::SmallStrainTridimensionalBehaviourWrapper

Public Member Functions

 BehaviourWrapperBase (const std::shared_ptr< Behaviour > &)
 constructor
void allocateCurrentState (CurrentState &) const override
 allocate current state
std::string getBehaviourName () const override
unsigned short getSymmetryType () const override
StiffnessMatrixType getDefaultStiffnessMatrixType () const override
std::vector< std::string > getMaterialPropertiesNames () const override
size_t getMaterialPropertiesSize () const override
std::vector< std::string > getOptionalMaterialProperties () const override
void setOptionalMaterialPropertiesDefaultValues (EvolutionManager &, const EvolutionManager &) const override
 This method solves two issues:
std::vector< std::string > getParametersNames () const override
std::vector< std::string > getIntegerParametersNames () const override
std::vector< std::string > getUnsignedShortParametersNames () const override
double getRealParameterDefaultValue (const std::string &) const override
int getIntegerParameterDefaultValue (const std::string &) const override
unsigned short getUnsignedShortParameterDefaultValue (const std::string &) const override
void setOutOfBoundsPolicy (const tfel::material::OutOfBoundsPolicy) const override
 set the out of bounds policy
bool hasBounds (const std::string &) const override
bool hasLowerBound (const std::string &) const override
bool hasUpperBound (const std::string &) const override
long double getLowerBound (const std::string &) const override
long double getUpperBound (const std::string &) const override
bool hasPhysicalBounds (const std::string &) const override
bool hasLowerPhysicalBound (const std::string &) const override
bool hasUpperPhysicalBound (const std::string &) const override
long double getLowerPhysicalBound (const std::string &) const override
long double getUpperPhysicalBound (const std::string &) const override
void setParameter (const std::string &, const real) const override
 set the value of a parameter
void setIntegerParameter (const std::string &, const int) const override
 set the value of a parameter
void setUnsignedIntegerParameter (const std::string &, const unsigned short) const override
 set the value of a parameter
 ~BehaviourWrapperBase () override
 destructor
Public Member Functions inherited from mtest::Behaviour
virtual Hypothesis getHypothesis () 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 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 void allocateWorkSpace (BehaviourWorkSpace &) const =0
 allocate workspace
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

Protected Attributes

std::shared_ptr< Behaviour > b
 wrapped behaviour

Additional Inherited Members

Public Types inherited from mtest::Behaviour
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
Static Public Member Functions inherited from mtest::Behaviour
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 helper class to build wrapper around mechanical behaviours.

Following the facade design pattern, the wrapper forwards the calls to the wrapped behaviour.

Constructor & Destructor Documentation

◆ BehaviourWrapperBase()

mtest::BehaviourWrapperBase::BehaviourWrapperBase ( const std::shared_ptr< Behaviour > & )
explicit

constructor

Parameters
[in]wb: wrapped behaviour

Member Function Documentation

◆ allocateCurrentState()

void mtest::BehaviourWrapperBase::allocateCurrentState ( CurrentState & ) const
overridevirtual

allocate current state

Parameters
[out]cs: current state

Implements mtest::Behaviour.

◆ getBehaviourName()

std::string mtest::BehaviourWrapperBase::getBehaviourName ( ) const
overridevirtual
Returns
the name of the behaviour

Implements mtest::Behaviour.

◆ getDefaultStiffnessMatrixType()

StiffnessMatrixType mtest::BehaviourWrapperBase::getDefaultStiffnessMatrixType ( ) const
overridevirtual
Returns
the default type of stiffness matrix used by the behaviour

Implements mtest::Behaviour.

◆ getIntegerParameterDefaultValue()

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

Implements mtest::Behaviour.

◆ getIntegerParametersNames()

std::vector< std::string > mtest::BehaviourWrapperBase::getIntegerParametersNames ( ) const
overridevirtual
Returns
the names of integer parameters

Implements mtest::Behaviour.

◆ getLowerBound()

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

Implements mtest::Behaviour.

◆ getLowerPhysicalBound()

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

Implements mtest::Behaviour.

◆ getMaterialPropertiesNames()

std::vector< std::string > mtest::BehaviourWrapperBase::getMaterialPropertiesNames ( ) const
overridevirtual
Returns
the names of the material properties

Implements mtest::Behaviour.

◆ getMaterialPropertiesSize()

size_t mtest::BehaviourWrapperBase::getMaterialPropertiesSize ( ) const
overridevirtual
Returns
the number of the material properties

Implements mtest::Behaviour.

◆ getOptionalMaterialProperties()

std::vector< std::string > mtest::BehaviourWrapperBase::getOptionalMaterialProperties ( ) const
overridevirtual
Returns
the list of optional material properties

Implements mtest::Behaviour.

◆ getParametersNames()

std::vector< std::string > mtest::BehaviourWrapperBase::getParametersNames ( ) const
overridevirtual
Returns
the names of floating point parameters

Implements mtest::Behaviour.

◆ getRealParameterDefaultValue()

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

Implements mtest::Behaviour.

◆ getSymmetryType()

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

Implements mtest::Behaviour.

◆ getUnsignedShortParameterDefaultValue()

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

Implements mtest::Behaviour.

◆ getUnsignedShortParametersNames()

std::vector< std::string > mtest::BehaviourWrapperBase::getUnsignedShortParametersNames ( ) const
overridevirtual
Returns
the names of unsigned short parameters

Implements mtest::Behaviour.

◆ getUpperBound()

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

Implements mtest::Behaviour.

◆ getUpperPhysicalBound()

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

Implements mtest::Behaviour.

◆ hasBounds()

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

Implements mtest::Behaviour.

◆ hasLowerBound()

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

Implements mtest::Behaviour.

◆ hasLowerPhysicalBound()

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

Implements mtest::Behaviour.

◆ hasPhysicalBounds()

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

Implements mtest::Behaviour.

◆ hasUpperBound()

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

Implements mtest::Behaviour.

◆ hasUpperPhysicalBound()

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

Implements mtest::Behaviour.

◆ setIntegerParameter()

void mtest::BehaviourWrapperBase::setIntegerParameter ( const std::string & ,
const int  ) const
overridevirtual

set the value of a parameter

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

Implements mtest::Behaviour.

◆ setOptionalMaterialPropertiesDefaultValues()

void mtest::BehaviourWrapperBase::setOptionalMaterialPropertiesDefaultValues ( EvolutionManager & ,
const EvolutionManager &  ) const
overridevirtual

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

Implements mtest::Behaviour.

◆ setOutOfBoundsPolicy()

void mtest::BehaviourWrapperBase::setOutOfBoundsPolicy ( const tfel::material::OutOfBoundsPolicy ) const
overridevirtual

set the out of bounds policy

Parameters
[in]p: policy selected

Implements mtest::Behaviour.

◆ setParameter()

void mtest::BehaviourWrapperBase::setParameter ( const std::string & ,
const real  ) const
overridevirtual

set the value of a parameter

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

Implements mtest::Behaviour.

◆ setUnsignedIntegerParameter()

void mtest::BehaviourWrapperBase::setUnsignedIntegerParameter ( const std::string & ,
const unsigned short  ) const
overridevirtual

set the value of a parameter

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

Implements mtest::Behaviour.


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