1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Python wrappers for the behaviour operator in [`crate::ops::behavior`].
//!
//! Free function that integrates the constitutive law of a model (Cast3m
//! `COMP`). Kept here — mirroring `src/ops/behavior.rs` — per the `py/ops/`
//! convention (its identity is the *operation*, not the `ElementField` it
//! returns). The deformation input is built separately by
//! `gradient` / `deformation` (see [`crate::py::ops::field`]).
use cratePyElementField;
use cratePyModel;
use *;
/// Integrate the constitutive law of `model` (Cast3m `COMP`), stepping A → B.
///
/// `deformation` is the **end-of-step** behaviour input ε(B) (from
/// `gradient(field, fespace)` or `deformation(u, fespace)`); `prev` is the
/// **converged output of the previous step** (the state at A — stress,
/// internal variables and start-of-step strain), or `None` on the first step;
/// `materials` supplies the per-zone material data; `dt` is the time increment
/// (`None` if the law is rate-independent). Returns the material-state field at
/// B (dual flux/stress + updated internal variables) of every behaviour-bearing
/// sub-model — feed it back as `prev` at the next step.
///
/// For a linear law the result is consistent with the assembled stiffness
/// (`∫ Bᵀ·flux = K·u`); a non-linear law is the exact response.