Skip to main content

Module testkit

Module testkit 

Source
Expand description

Shared helpers for driving a DisplacementControl cyclic protocol on a single controlled DOF — used by tests/analysis/cyclic_protocol.rs and examples/cyclic_material.rs (the openseespy comparison harness in comparison/).

Functions§

leg
One DisplacementControl leg via Analysis::set_integrator (no rebuild) targeting an absolute displacement — the increment passed to DisplacementControl is computed fresh from wherever the controlled DOF actually is right now, not assumed from the previous leg’s target.
ramp_to
Walks the controlled DOF from wherever it is to target in steps no larger than step, via repeated leg calls. Calls on_point after every leg with (displacement, load_factor) so callers can record a full trace, not just the endpoint.
run_cyclic_protocol
Runs a reverse-cyclic protocol: for each (amplitude, cycles) tier, in order, ramps 0 -> +amplitude -> -amplitude, cycles times, then back to 0 before the next tier. Calls on_point after every leg — this is the full recorded trace a stress-strain (or force-displacement) plot is built from.