rustfront 0.5.0

Evaluate MFront material behaviours (constitutive laws) at a material point, in pure Rust, without MGIS or any C++ build dependency
Documentation
//! Evaluate [MFront] material behaviours (constitutive laws) at a material
//! point, from Rust.
//!
//! MFront compiles material behaviours (elasticity, plasticity, creep, …) into
//! shared libraries. For behaviours generated with MFront's `generic`
//! interface (`mfront --obuild --interface=generic Norton.mfront`), this crate
//! loads the library, reads the description the behaviour exports (gradients,
//! material properties, internal state variables, …) and integrates it at one
//! material point. It talks to the library directly, in pure Rust: no [MGIS],
//! no C or C++ build dependency.
//!
//! The arrays of a material point are **borrowed** from the caller, who can
//! keep the values of all its points in contiguous storage: see
//! [`InitialState`] and [`FinalState`]. Symmetric tensors are stored in
//! TFEL's convention: `xx`, `yy`, `zz`, `√2·xy`, `√2·xz`, `√2·yz`; the
//! [`voigt`] module converts them, and the tangent operator, to and from the
//! standard Voigt notation.
//!
//! Only loading is `unsafe`, because opening a library runs its code: once
//! [`Behaviour::load`] has checked what the library declares, integrating is
//! safe. Loading is also when the parameters and the out of bounds policy,
//! static variables of the library, are set: see [`Settings`].
//!
//! Point-wise models (`@DSL DefaultModel`, …) are loaded and integrated like
//! behaviours, as [`Behaviour`]: they have no gradient, their outputs are
//! internal state variables and their inputs external state variables. The
//! material properties (`@DSL MaterialLaw`) are evaluated by
//! [`MaterialProperty`].
//!
//! Finite strain behaviours (`@DSL DefaultFiniteStrain`, or a strain measure
//! such as `@StrainMeasure Hencky`) take the deformation gradient, an
//! unsymmetric tensor, and compute the stress measure and the tangent operator
//! [`Settings`] chooses: [`StressMeasure`], [`FiniteStrainTangentOperator`].
//!
//! An orthotropic behaviour integrates in its material frame: its gradients
//! are rotated to it, its thermodynamic forces and tangent operator back to
//! the global frame, by [`Behaviour::rotate`], with a [`Rotation`].
//!
//! **Status:** small strain, finite strain and general behaviours, isotropic
//! or orthotropic, point-wise models and material properties, generated by
//! TFEL 5.1.0 or later.
//!
//! [MFront]: https://thelfer.github.io/tfel/web/index.html
//! [MGIS]: https://github.com/thelfer/MFrontGenericInterfaceSupport

mod behaviour;
mod error;
mod ffi;
mod hypothesis;
mod material_property;
mod rotation;
mod symbols;
pub mod voigt;

pub use behaviour::{
    Behaviour, Description, FinalState, FiniteStrainTangentOperator, InitialState, Integration,
    OutOfBoundsPolicy, Parameter, ParameterValue, Settings, StressMeasure, Symmetry,
    TangentOperator, TimeStep, Variable, VariableType, Variables,
};
pub use error::Error;
pub use hypothesis::Hypothesis;
pub use material_property::{Evaluation, MaterialProperty, MaterialPropertyDescription};
pub use rotation::{Frame, Rotated, Rotation};