pub enum Hypothesis {
AxisymmetricalGeneralisedPlaneStrain,
AxisymmetricalGeneralisedPlaneStress,
Axisymmetrical,
PlaneStress,
PlaneStrain,
GeneralisedPlaneStrain,
Tridimensional,
}Expand description
A modelling hypothesis of MFront.
A behaviour is compiled for a list of hypotheses, and one integration function is generated for each of them.
use rustfront::Hypothesis;
let h: Hypothesis = "PlaneStrain".parse()?;
assert_eq!(h, Hypothesis::PlaneStrain);
assert_eq!(h.to_string(), "PlaneStrain");
assert_eq!(h.space_dimension(), 2);Variants§
AxisymmetricalGeneralisedPlaneStrain
1D: axisymmetrical generalised plane strain. Symmetric tensors have
the components rr, zz, θθ.
AxisymmetricalGeneralisedPlaneStress
1D: axisymmetrical generalised plane stress.
Axisymmetrical
2D: axisymmetrical, in the meridian plane. Symmetric tensors have the
components rr, zz, θθ, rz.
PlaneStress
2D: plane stress.
PlaneStrain
2D: plane strain.
GeneralisedPlaneStrain
2D: generalised plane strain.
Tridimensional
3D. Symmetric tensors have the components xx, yy, zz, xy, xz,
yz.
Implementations§
Source§impl Hypothesis
impl Hypothesis
Sourcepub const ALL: [Hypothesis; 7]
pub const ALL: [Hypothesis; 7]
Every hypothesis.
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The name MFront gives the hypothesis, the one found in symbol names
such as Norton_Tridimensional.
use rustfront::Hypothesis;
assert_eq!(Hypothesis::Axisymmetrical.name(), "Axisymmetrical");Sourcepub const fn space_dimension(self) -> usize
pub const fn space_dimension(self) -> usize
The space dimension: 1, 2 or 3. With it, a vector has dimension
components, a symmetric tensor 3, 4 or 6, a tensor 3, 5 or 9.
use rustfront::Hypothesis;
assert_eq!(Hypothesis::AxisymmetricalGeneralisedPlaneStrain.space_dimension(), 1);
assert_eq!(Hypothesis::Tridimensional.space_dimension(), 3);Trait Implementations§
Source§impl Clone for Hypothesis
impl Clone for Hypothesis
impl Copy for Hypothesis
Source§impl Debug for Hypothesis
impl Debug for Hypothesis
Source§impl Display for Hypothesis
impl Display for Hypothesis
impl Eq for Hypothesis
Source§impl FromStr for Hypothesis
Parses the name MFront gives the hypothesis, see Hypothesis::name.
impl FromStr for Hypothesis
Parses the name MFront gives the hypothesis, see Hypothesis::name.
use rustfront::{Error, Hypothesis};
assert!(matches!("3D".parse::<Hypothesis>(), Err(Error::UnknownHypothesis(_))));