MGIS
Loading...
Searching...
No Matches
Behaviour.hxx File Reference
#include <map>
#include <span>
#include <iosfwd>
#include <vector>
#include <optional>
#include "MGIS/Config.hxx"
#include "MGIS/Behaviour/Hypothesis.hxx"
#include "MGIS/Behaviour/Variable.hxx"
#include "MGIS/Behaviour/RotationMatrix.hxx"
#include "MGIS/Behaviour/FiniteStrainBehaviourOptions.hxx"
#include "MGIS/Behaviour/BehaviourFctPtr.hxx"
#include "MGIS/Behaviour/BehaviourDescription.hxx"

Classes

struct  mgis::behaviour::BehaviourInitializeFunction
 structure describing an initialize function of a behaviour More...
 
struct  mgis::behaviour::BehaviourPostProcessing
 structure describing a post-processing of a behaviour More...
 
struct  mgis::behaviour::Behaviour
 structure describing a behaviour More...
 
struct  mgis::behaviour::LoadFromDatabaseOptions
 options passed to the loadFromDatabase function More...
 

Namespaces

namespace  mgis
 the namespace mgis encloses all the MGIS project.
 

Functions

MGIS_EXPORT std::optional< Behaviourmgis::behaviour::load (Context &, const std::string &, const std::string &, const Hypothesis) noexcept
 load the description of a behaviour from a library
 
MGIS_EXPORT std::optional< Behaviourmgis::behaviour::load (Context &, const FiniteStrainBehaviourOptions &, const std::string &, const std::string &, const Hypothesis) noexcept
 load the description of a finite strain behaviour from a library
 
MGIS_EXPORT Behaviour mgis::behaviour::load (const std::string &, const std::string &, const Hypothesis)
 load the description of a behaviour from a library
 
MGIS_EXPORT Behaviour mgis::behaviour::load (const FiniteStrainBehaviourOptions &, const std::string &, const std::string &, const Hypothesis)
 load the description of a finite strain behaviour from a library
 
MGIS_EXPORT std::optional< Behaviourmgis::behaviour::loadFromDatabase (Context &, const LoadFromDatabaseOptions &) noexcept
 load a behaviour from the database
 
MGIS_EXPORT std::optional< Behaviourmgis::behaviour::loadFromDatabase (Context &, const FiniteStrainBehaviourOptions &, const LoadFromDatabaseOptions &) noexcept
 load a finite strain behaviour from the database
 
MGIS_EXPORT Behaviour mgis::behaviour::loadFromDatabase (const LoadFromDatabaseOptions &)
 load the description of a behaviour from the database
 
MGIS_EXPORT Behaviour mgis::behaviour::loadFromDatabase (const FiniteStrainBehaviourOptions &, const LoadFromDatabaseOptions &)
 load the description of a finite strain behaviour from the database
 
MGIS_EXPORT void mgis::behaviour::rotateGradients (std::span< real >, const Behaviour &, const std::span< const real > &)
 rotate an array of gradients from the global frame to the material frame.
 
MGIS_EXPORT void mgis::behaviour::rotateGradients (std::span< real >, const Behaviour &, const std::span< const real > &, const std::span< const real > &)
 rotate an array of gradients from the global frame to the material frame.
 
MGIS_EXPORT void mgis::behaviour::rotateGradients (std::span< real >, const Behaviour &, const RotationMatrix2D &)
 rotate an array of gradients from the global frame to the material frame.
 
MGIS_EXPORT void mgis::behaviour::rotateGradients (std::span< real >, const Behaviour &, const std::span< const real > &, const RotationMatrix2D &)
 rotate an array of gradients from the global frame to the material frame.
 
MGIS_EXPORT void mgis::behaviour::rotateGradients (std::span< real >, const Behaviour &, const RotationMatrix3D &)
 rotate an array of gradients from the global frame to the material frame.
 
MGIS_EXPORT void mgis::behaviour::rotateGradients (std::span< real >, const Behaviour &, const std::span< const real > &, const RotationMatrix3D &)
 rotate an array of gradients from the global frame to the material frame.
 
MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces (std::span< real >, const Behaviour &, const std::span< const real > &)
 rotate an array of thermodynamics forces from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces (std::span< real >, const Behaviour &, const RotationMatrix2D &)
 rotate an array of thermodynamics forces from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces (std::span< real >, const Behaviour &, const RotationMatrix3D &)
 rotate an array of thermodynamics forces from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces (std::span< real >, const Behaviour &, const std::span< const real > &, const std::span< const real > &)
 rotate an array of thermodynamics forces from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces (std::span< real >, const Behaviour &, const std::span< const real > &, const RotationMatrix2D &)
 rotate an array of thermodynamics forces from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces (std::span< real >, const Behaviour &, const std::span< const real > &, const RotationMatrix3D &)
 rotate an array of thermodynamics forces from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks (std::span< real >, const Behaviour &, const std::span< const real > &)
 rotate an array of tangent operator blocks from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks (std::span< real >, const Behaviour &, const RotationMatrix2D &)
 rotate an array of tangent operator blocks from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks (std::span< real >, const Behaviour &, const RotationMatrix3D &)
 rotate an array of tangent operator blocks from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks (std::span< real >, const Behaviour &, const std::span< const real > &, const std::span< const real > &)
 rotate an array of tangent operator blocks from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks (std::span< real >, const Behaviour &, const std::span< const real > &, const RotationMatrix2D &)
 rotate an array of tangent operator blocks from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks (std::span< real >, const Behaviour &, const std::span< const real > &, const RotationMatrix3D &)
 rotate an array of tangent operator blocks from the material frame to the global frame.
 
MGIS_EXPORT void mgis::behaviour::setParameter (const Behaviour &, const std::string &, const double)
 set the value of a parameter
 
MGIS_EXPORT void mgis::behaviour::setParameter (const Behaviour &, const std::string &, const int)
 set the value of a parameter
 
MGIS_EXPORT void mgis::behaviour::setParameter (const Behaviour &, const std::string &, const unsigned short)
 set the value of a parameter
 
MGIS_EXPORT size_type mgis::behaviour::getInitializeFunctionVariablesArraySize (const Behaviour &, const std::string_view)
 
MGIS_EXPORT std::vector< mgis::realmgis::behaviour::allocateInitializeFunctionVariables (const Behaviour &, const std::string_view)
 
MGIS_EXPORT size_type mgis::behaviour::getPostProcessingVariablesArraySize (const Behaviour &, const std::string_view)
 
MGIS_EXPORT std::vector< mgis::realmgis::behaviour::allocatePostProcessingVariables (const Behaviour &, const std::string_view)
 

Detailed Description

Author
Thomas Helfer
Date
19/06/2018

Function Documentation

◆ allocateInitializeFunctionVariables()

MGIS_EXPORT std::vector< mgis::real > mgis::behaviour::allocateInitializeFunctionVariables ( const Behaviour ,
const std::string_view   
)
Returns
an array containing the inputs of an initialize function.
Parameters
[in]bbehaviour
[in]nname of the initialize function

◆ allocatePostProcessingVariables()

MGIS_EXPORT std::vector< mgis::real > mgis::behaviour::allocatePostProcessingVariables ( const Behaviour ,
const std::string_view   
)
Returns
an array containing the results of a post-processing.
Parameters
[in]bbehaviour
[in]nname of the post-processing

◆ getInitializeFunctionVariablesArraySize()

MGIS_EXPORT size_type mgis::behaviour::getInitializeFunctionVariablesArraySize ( const Behaviour ,
const std::string_view   
)
Returns
the size of an array able to contain the inputs of an initialize function.
Parameters
[in]bbehaviour
[in]nname of the post-processing

◆ getPostProcessingVariablesArraySize()

MGIS_EXPORT size_type mgis::behaviour::getPostProcessingVariablesArraySize ( const Behaviour ,
const std::string_view   
)
Returns
the size of an array able to contain the outputs of a post-processing.
Parameters
[in]bbehaviour
[in]nname of the post-processing

◆ load() [1/4]

MGIS_EXPORT Behaviour mgis::behaviour::load ( const FiniteStrainBehaviourOptions ,
const std::string &  ,
const std::string &  ,
const Hypothesis   
)

load the description of a finite strain behaviour from a library

Note
This method can also be used to load a finite strain behaviour. In this case, the default options are used (the stress measure is Cauchy, the tangent operator is the derivative of the Cauchy stress with respect to the deformation gradient).
Parameters
[in]ooptions
[in]llibrary name
[in]bbehaviour name
[in]hmodelling hypothesis
Returns
the behaviour description
Note
: use of std::string rather than mgis::string_view is meaningful here

◆ load() [2/4]

MGIS_EXPORT Behaviour mgis::behaviour::load ( const std::string &  ,
const std::string &  ,
const Hypothesis   
)

load the description of a behaviour from a library

Parameters
[in]llibrary name
[in]bbehaviour name
[in]hmodelling hypothesis
Returns
the behaviour description

◆ load() [3/4]

MGIS_EXPORT std::optional< Behaviour > mgis::behaviour::load ( Context ,
const FiniteStrainBehaviourOptions ,
const std::string &  ,
const std::string &  ,
const Hypothesis   
)
noexcept

load the description of a finite strain behaviour from a library

Note
This method can also be used to load a finite strain behaviour. In this case, the default options are used (the stress measure is Cauchy, the tangent operator is the derivative of the Cauchy stress with respect to the deformation gradient).
Parameters
[in]ctxexecution context
[in]ooptions
[in]llibrary name
[in]bbehaviour name
[in]hmodelling hypothesis
Returns
the behaviour description
Note
: use of std::string rather than mgis::string_view is meaningful here

◆ load() [4/4]

MGIS_EXPORT std::optional< Behaviour > mgis::behaviour::load ( Context ,
const std::string &  ,
const std::string &  ,
const Hypothesis   
)
noexcept

load the description of a behaviour from a library

Parameters
[in]ctxexecution context
[in]llibrary name
[in]bbehaviour name
[in]hmodelling hypothesis
Returns
the behaviour description

◆ loadFromDatabase() [1/4]

MGIS_EXPORT Behaviour mgis::behaviour::loadFromDatabase ( const FiniteStrainBehaviourOptions ,
const LoadFromDatabaseOptions  
)

load the description of a finite strain behaviour from the database

Parameters
[in]ooptions
[in]optsoptions to select the behaviour
Returns
the behaviour description

◆ loadFromDatabase() [2/4]

MGIS_EXPORT Behaviour mgis::behaviour::loadFromDatabase ( const LoadFromDatabaseOptions )

load the description of a behaviour from the database

Parameters
[in]optsoptions to select the behaviour
Returns
the behaviour description

◆ loadFromDatabase() [3/4]

MGIS_EXPORT std::optional< Behaviour > mgis::behaviour::loadFromDatabase ( Context ,
const FiniteStrainBehaviourOptions ,
const LoadFromDatabaseOptions  
)
noexcept

load a finite strain behaviour from the database

Parameters
[in]ctxexecution context
[in]ofinite strain options
[in]optsoptions to select the behaviour
Returns
the behaviour description

◆ loadFromDatabase() [4/4]

MGIS_EXPORT std::optional< Behaviour > mgis::behaviour::loadFromDatabase ( Context ,
const LoadFromDatabaseOptions  
)
noexcept

load a behaviour from the database

Parameters
[in]ctxexecution context
[in]optsoptions to select the behaviour
Returns
the behaviour description

◆ rotateGradients() [1/6]

MGIS_EXPORT void mgis::behaviour::rotateGradients ( std::span< real ,
const Behaviour ,
const RotationMatrix2D  
)

rotate an array of gradients from the global frame to the material frame.

Parameters
[in,out]ggradients
[in]bbehaviour description
[in]rrotation matrix from the global frame to the material frame.

◆ rotateGradients() [2/6]

MGIS_EXPORT void mgis::behaviour::rotateGradients ( std::span< real ,
const Behaviour ,
const RotationMatrix3D  
)

rotate an array of gradients from the global frame to the material frame.

Parameters
[in,out]ggradients
[in]bbehaviour description
[in]rrotation matrix from the global frame to the material frame.

◆ rotateGradients() [3/6]

MGIS_EXPORT void mgis::behaviour::rotateGradients ( std::span< real ,
const Behaviour ,
const std::span< const real > &   
)

rotate an array of gradients from the global frame to the material frame.

Parameters
[in,out]ggradients
[in]bbehaviour description
[in]rrotation matrix from the global frame to the material frame.
Note
the rotation matrix argument can be given as a:
  • an array of size 9 which is interpreted as a 3x3 rotation matrix.
  • an array of size 9*n where n is the number of integration points which is interpreted as a field of 3x3 rotation matrix.

◆ rotateGradients() [4/6]

MGIS_EXPORT void mgis::behaviour::rotateGradients ( std::span< real ,
const Behaviour ,
const std::span< const real > &  ,
const RotationMatrix2D  
)

rotate an array of gradients from the global frame to the material frame.

Parameters
[out]mgarray of gradients in the material frame
[in]bbehaviour description
[out]ggarray of gradients in the global frame
[in]rrotation matrix from the global frame to the material frame.

◆ rotateGradients() [5/6]

MGIS_EXPORT void mgis::behaviour::rotateGradients ( std::span< real ,
const Behaviour ,
const std::span< const real > &  ,
const RotationMatrix3D  
)

rotate an array of gradients from the global frame to the material frame.

Parameters
[out]mgarray of gradients in the material frame
[in]bbehaviour description
[out]ggarray of gradients in the global frame
[in]rrotation matrix from the global frame to the material frame.

◆ rotateGradients() [6/6]

MGIS_EXPORT void mgis::behaviour::rotateGradients ( std::span< real ,
const Behaviour ,
const std::span< const real > &  ,
const std::span< const real > &   
)

rotate an array of gradients from the global frame to the material frame.

Parameters
[out]mgarray of gradients in the material frame
[in]bbehaviour description
[out]ggarray of gradients in the global frame
[in]rrotation matrix from the global frame to the material frame.
Note
the rotation matrix argument can be given as a:
  • an array of size 9 which is interpreted as a 3x3 rotation matrix.
  • an array of size 9*n where n is the number of integration points which is interpreted as a field of 3x3 rotation matrix.

◆ rotateTangentOperatorBlocks() [1/6]

MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks ( std::span< real ,
const Behaviour ,
const RotationMatrix2D  
)

rotate an array of tangent operator blocks from the material frame to the global frame.

Parameters
[in,out]Ktangent operator blocks
[in]bbehaviour description
[in]rrotation matrix from the global frame to the material frame.

◆ rotateTangentOperatorBlocks() [2/6]

MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks ( std::span< real ,
const Behaviour ,
const RotationMatrix3D  
)

rotate an array of tangent operator blocks from the material frame to the global frame.

Parameters
[in,out]Ktangent operator blocks
[in]bbehaviour description
[in]rrotation matrix from the global frame to the material frame.

◆ rotateTangentOperatorBlocks() [3/6]

MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks ( std::span< real ,
const Behaviour ,
const std::span< const real > &   
)

rotate an array of tangent operator blocks from the material frame to the global frame.

Parameters
[in,out]Ktangent operator blocks
[in]bbehaviour description
[in]rrotation matrix from the global frame to the material frame.

◆ rotateTangentOperatorBlocks() [4/6]

MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks ( std::span< real ,
const Behaviour ,
const std::span< const real > &  ,
const RotationMatrix2D  
)

rotate an array of tangent operator blocks from the material frame to the global frame.

Parameters
[out]gKtangent operator blocks in the global frame
[in]bbehaviour description
[in]mKtangent operator blocks in the material frame
[in]rrotation matrix from the global frame to the material frame.

◆ rotateTangentOperatorBlocks() [5/6]

MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks ( std::span< real ,
const Behaviour ,
const std::span< const real > &  ,
const RotationMatrix3D  
)

rotate an array of tangent operator blocks from the material frame to the global frame.

Parameters
[out]gKtangent operator blocks in the global frame
[in]bbehaviour description
[in]mKtangent operator blocks in the material frame
[in]rrotation matrix from the global frame to the material frame.

◆ rotateTangentOperatorBlocks() [6/6]

MGIS_EXPORT void mgis::behaviour::rotateTangentOperatorBlocks ( std::span< real ,
const Behaviour ,
const std::span< const real > &  ,
const std::span< const real > &   
)

rotate an array of tangent operator blocks from the material frame to the global frame.

Parameters
[out]gKtangent operator blocks in the global frame
[in]bbehaviour description
[in]mKtangent operator blocks in the material frame
[in]rrotation matrix from the global frame to the material frame.

◆ rotateThermodynamicForces() [1/6]

MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces ( std::span< real ,
const Behaviour ,
const RotationMatrix2D  
)

rotate an array of thermodynamics forces from the material frame to the global frame.

Parameters
[in,out]tfthermodynamics forces
[in]bbehaviour description
[in]rrotation matrix from the global frame to the material frame.

◆ rotateThermodynamicForces() [2/6]

MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces ( std::span< real ,
const Behaviour ,
const RotationMatrix3D  
)

rotate an array of thermodynamics forces from the material frame to the global frame.

Parameters
[in,out]tfthermodynamics forces
[in]bbehaviour description
[in]rrotation matrix from the global frame to the material frame.

◆ rotateThermodynamicForces() [3/6]

MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces ( std::span< real ,
const Behaviour ,
const std::span< const real > &   
)

rotate an array of thermodynamics forces from the material frame to the global frame.

Parameters
[in,out]tfthermodynamics forces
[in]bbehaviour description
[in]rrotation matrix from the global frame to the material frame.

◆ rotateThermodynamicForces() [4/6]

MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces ( std::span< real ,
const Behaviour ,
const std::span< const real > &  ,
const RotationMatrix2D  
)

rotate an array of thermodynamics forces from the material frame to the global frame.

Parameters
[out]gtfthermodynamics forces in the global frame
[in]bbehaviour description
[in]mtfthermodynamics forces in the material frame
[in]rrotation matrix from the global frame to the material frame.

◆ rotateThermodynamicForces() [5/6]

MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces ( std::span< real ,
const Behaviour ,
const std::span< const real > &  ,
const RotationMatrix3D  
)

rotate an array of thermodynamics forces from the material frame to the global frame.

Parameters
[out]gtfthermodynamics forces in the global frame
[in]bbehaviour description
[in]mtfthermodynamics forces in the material frame
[in]rrotation matrix from the global frame to the material frame.

◆ rotateThermodynamicForces() [6/6]

MGIS_EXPORT void mgis::behaviour::rotateThermodynamicForces ( std::span< real ,
const Behaviour ,
const std::span< const real > &  ,
const std::span< const real > &   
)

rotate an array of thermodynamics forces from the material frame to the global frame.

Parameters
[out]gtfthermodynamics forces in the global frame
[in]bbehaviour description
[in]mtfthermodynamics forces in the material frame
[in]rrotation matrix from the global frame to the material frame.

◆ setParameter() [1/3]

MGIS_EXPORT void mgis::behaviour::setParameter ( const Behaviour ,
const std::string &  ,
const double   
)

set the value of a parameter

Parameters
[in]bbehaviour description
[in]nparameter name
[in]vparameter value

◆ setParameter() [2/3]

MGIS_EXPORT void mgis::behaviour::setParameter ( const Behaviour ,
const std::string &  ,
const int   
)

set the value of a parameter

Parameters
[in]bbehaviour description
[in]nparameter name
[in]vparameter value

◆ setParameter() [3/3]

MGIS_EXPORT void mgis::behaviour::setParameter ( const Behaviour ,
const std::string &  ,
const unsigned short   
)

set the value of a parameter

Parameters
[in]bbehaviour description
[in]nparameter name
[in]vparameter value