MGIS 3.1.0
Loading...
Searching...
No Matches
MechanicalOperations.hxx File Reference

File which declares functions computing mechanical quantities (trace, von Mises stress, hydrostatic pressure, eigen values, Cauchy stress) from the tensorial values of a function and returning the result as a new function. More...

#include <optional>
#include "MGIS/Config.hxx"
#include "MGIS/Function/BasicLinearSpace.hxx"
#include "MGIS/Function/Function.hxx"

Namespaces

namespace  mgis
 the namespace mgis encloses all the MGIS project.

Typedefs

using mgis::function::BasicImmutableFunctionView
 immutable view on a function defined on a BasicLinearSpace whose number of components is only known at run time

Functions

MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeTrace (Context &, const BasicImmutableFunctionView &) MGIS_NOEXCEPT
 compute the trace of the symmetric tensorial values of a function
MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeVonMisesStress (Context &, const BasicImmutableFunctionView &) MGIS_NOEXCEPT
 compute the von Mises stress of the symmetric tensorial values of a function
MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeHydrostraticPressure (Context &, const BasicImmutableFunctionView &) MGIS_NOEXCEPT
 compute the hydrostatic pressure of the symmetric tensorial values of a function
MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeEigenValues (Context &, const BasicImmutableFunctionView &) MGIS_NOEXCEPT
 compute the eigen values of the symmetric tensorial values of a function
MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeCauchyStressFromFirstPiolaKirchhoffStress (Context &, const BasicImmutableFunctionView &, const BasicImmutableFunctionView &) MGIS_NOEXCEPT
 compute the Cauchy stress from the first Piola-Kirchhoff stress and the deformation gradient of a function
MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeCauchyStressHydrostraticPressureFromFirstPiolaKirchhoffStress (Context &, const BasicImmutableFunctionView &, const BasicImmutableFunctionView &) MGIS_NOEXCEPT
 compute the hydrostatic pressure of the Cauchy stress obtained from the first Piola-Kirchhoff stress and the deformation gradient of a function
MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeCauchyStressVonMisesStressFromFirstPiolaKirchhoffStress (Context &, const BasicImmutableFunctionView &, const BasicImmutableFunctionView &) MGIS_NOEXCEPT
 compute the von Mises stress of the Cauchy stress obtained from the first Piola-Kirchhoff stress and the deformation gradient of a function
MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeCauchyStressEigenValuesFromFirstPiolaKirchhoffStress (Context &, const BasicImmutableFunctionView &, const BasicImmutableFunctionView &) MGIS_NOEXCEPT
 compute the eigen values of the Cauchy stress obtained from the first Piola-Kirchhoff stress and the deformation gradient of a function

Detailed Description

File which declares functions computing mechanical quantities (trace, von Mises stress, hydrostatic pressure, eigen values, Cauchy stress) from the tensorial values of a function and returning the result as a new function.

Author
Thomas Helfer
Date
15/11/2025

Typedef Documentation

◆ BasicImmutableFunctionView

typedef FunctionView< BasicLinearSpace, FunctionDataLayoutDescription{}, false > mgis::function::BasicImmutableFunctionView
Initial value:
the simplest implementation of a linear space
Definition BasicLinearSpace.hxx:24
a simple data structure describing how the data of a function is mapped in memory,...
Definition Function.hxx:113
function defined on a space, whose values are stored in an external memory region.
Definition Function.hxx:224

immutable view on a function defined on a BasicLinearSpace whose number of components is only known at run time

This alias shortens the declaration of the functions of this file. The false template argument states that the viewed values cannot be modified.

Function Documentation

◆ computeCauchyStressEigenValuesFromFirstPiolaKirchhoffStress()

MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeCauchyStressEigenValuesFromFirstPiolaKirchhoffStress ( Context & ,
const BasicImmutableFunctionView & ,
const BasicImmutableFunctionView &  )

compute the eigen values of the Cauchy stress obtained from the first Piola-Kirchhoff stress and the deformation gradient of a function

The Cauchy stress is first computed from pk1 and F and its eigen values are then evaluated. Both pk1 and F are interpreted as unsymmetric tensors, which requires 3, 5 or 9 components, corresponding to unsymmetric tensors of dimension 1, 2 or 3; pk1 and F must have the same number of components.

Parameters
[in]ctxexecution context used to report the errors
[in]pk1view on the function whose values are the first Piola-Kirchhoff stresses
[in]Fview on the function whose values are the deformation gradients
Returns
the function holding the eigen values or an empty optional if the number of components of pk1 is not compatible with an unsymmetric tensor, in which case an error is reported through the error handler

◆ computeCauchyStressFromFirstPiolaKirchhoffStress()

MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeCauchyStressFromFirstPiolaKirchhoffStress ( Context & ,
const BasicImmutableFunctionView & ,
const BasicImmutableFunctionView &  )

compute the Cauchy stress from the first Piola-Kirchhoff stress and the deformation gradient of a function

Both pk1 and F are interpreted as unsymmetric tensors, which requires 3, 5 or 9 components, corresponding to unsymmetric tensors of dimension 1, 2 or 3; pk1 and F must have the same number of components.

Parameters
[in]ctxexecution context used to report the errors
[in]pk1view on the function whose values are the first Piola-Kirchhoff stresses
[in]Fview on the function whose values are the deformation gradients
Returns
the function holding the Cauchy stresses or an empty optional if the number of components of pk1 is not compatible with an unsymmetric tensor, in which case an error is reported through the error handler

◆ computeCauchyStressHydrostraticPressureFromFirstPiolaKirchhoffStress()

MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeCauchyStressHydrostraticPressureFromFirstPiolaKirchhoffStress ( Context & ,
const BasicImmutableFunctionView & ,
const BasicImmutableFunctionView &  )

compute the hydrostatic pressure of the Cauchy stress obtained from the first Piola-Kirchhoff stress and the deformation gradient of a function

The Cauchy stress is first computed from pk1 and F and its hydrostatic pressure, defined as trace(s) / 3, is then evaluated. Both pk1 and F are interpreted as unsymmetric tensors, which requires 3, 5 or 9 components, corresponding to unsymmetric tensors of dimension 1, 2 or 3; pk1 and F must have the same number of components.

Parameters
[in]ctxexecution context used to report the errors
[in]pk1view on the function whose values are the first Piola-Kirchhoff stresses
[in]Fview on the function whose values are the deformation gradients
Returns
the function holding the hydrostatic pressures or an empty optional if the number of components of pk1 is not compatible with an unsymmetric tensor, in which case an error is reported through the error handler

◆ computeCauchyStressVonMisesStressFromFirstPiolaKirchhoffStress()

MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeCauchyStressVonMisesStressFromFirstPiolaKirchhoffStress ( Context & ,
const BasicImmutableFunctionView & ,
const BasicImmutableFunctionView &  )

compute the von Mises stress of the Cauchy stress obtained from the first Piola-Kirchhoff stress and the deformation gradient of a function

The Cauchy stress is first computed from pk1 and F and its von Mises stress is then evaluated. Both pk1 and F are interpreted as unsymmetric tensors, which requires 3, 5 or 9 components, corresponding to unsymmetric tensors of dimension 1, 2 or 3; pk1 and F must have the same number of components.

Parameters
[in]ctxexecution context used to report the errors
[in]pk1view on the function whose values are the first Piola-Kirchhoff stresses
[in]Fview on the function whose values are the deformation gradients
Returns
the function holding the von Mises stresses or an empty optional if the number of components of pk1 is not compatible with an unsymmetric tensor, in which case an error is reported through the error handler

◆ computeEigenValues()

MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeEigenValues ( Context & ,
const BasicImmutableFunctionView &  )

compute the eigen values of the symmetric tensorial values of a function

The values of f are interpreted as symmetric tensors, which requires 3, 4 or 6 components, corresponding to symmetric tensors of dimension 1, 2 or 3; the result is a function whose values have as many components as the dimension of the symmetric tensors.

Parameters
[in]ctxexecution context used to report the errors
[in]fview on the function whose symmetric tensorial values are considered
Returns
the function holding the eigen values or an empty optional if the number of components of f is not compatible with a symmetric tensor, in which case an error is reported through the error handler

◆ computeHydrostraticPressure()

MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeHydrostraticPressure ( Context & ,
const BasicImmutableFunctionView &  )

compute the hydrostatic pressure of the symmetric tensorial values of a function

The hydrostatic pressure is defined as trace(s) / 3. The values of f are interpreted as symmetric tensors, which requires 3, 4 or 6 components, corresponding to symmetric tensors of dimension 1, 2 or 3; the result is a scalar valued function.

Parameters
[in]ctxexecution context used to report the errors
[in]fview on the function whose symmetric tensorial values are interpreted as stresses
Returns
the function holding the hydrostatic pressures or an empty optional if the number of components of f is not compatible with a symmetric tensor, in which case an error is reported through the error handler

◆ computeTrace()

MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeTrace ( Context & ,
const BasicImmutableFunctionView &  )

compute the trace of the symmetric tensorial values of a function

The values of f are interpreted as symmetric tensors, which requires 3, 4 or 6 components, corresponding to symmetric tensors of dimension 1, 2 or 3; the result is a scalar valued function.

Parameters
[in]ctxexecution context used to report the errors
[in]fview on the function whose symmetric tensorial values are considered
Returns
the function holding the traces or an empty optional if the number of components of f is not compatible with a symmetric tensor, in which case an error is reported through the error handler

◆ computeVonMisesStress()

MGIS_EXPORT std::optional< Function< BasicLinearSpace > > mgis::function::computeVonMisesStress ( Context & ,
const BasicImmutableFunctionView &  )

compute the von Mises stress of the symmetric tensorial values of a function

The values of f are interpreted as symmetric tensors, which requires 3, 4 or 6 components, corresponding to symmetric tensors of dimension 1, 2 or 3; the result is a scalar valued function.

Parameters
[in]ctxexecution context used to report the errors
[in]fview on the function whose symmetric tensorial values are interpreted as stresses
Returns
the function holding the von Mises stresses or an empty optional if the number of components of f is not compatible with a symmetric tensor, in which case an error is reported through the error handler