Expand description
JavaScript interface to the Carapace engine. Binding glue and TypeScript definitions are generated during the wasm build.
Modules§
- input_
v1 CarapaceInputV1— the pysees ↔ Carapace wire format and its decoder, (seedocs/input-format.md). Header/table DTOs, the hand-written per-table decoder into acarapace-coreDomain/Analysis, and the steppedSession/advanceAPI. Every type here derivesserde’sSerialize/Deserializeso../boundary.rscan hand them acrosswasm_bindgenviaserde-wasm-bindgen— but that boundary today accepts plain JS objects/arrays, not the structured-clone-plus- transferable-typed-array shapespostMessagewill eventually carry. That optimization is deferred untilpysees’s compiler exists to actually produceCarapaceInputV1bytes; see each table’s doc comment for the exact correspondence once it does.- material_
probe - Uniaxial material probe: one persistent unit zero-length spring driven by
prescribed displacement (
Analysis::step_prescribed), the equivalent of OpenSees’sp-constrained zeroLength model. Strain is the relative displacementnode2.x - node1.xand stress is the material’s tensile resisting force,Domain::reactionat node 2 (OpenSees’-nodeReaction(1, 1)). Unit area and gauge length are implicit.
Structs§
- Wasm
Material Probe - Opaque handle to a persistent uniaxial material probe (
material_probe). Material state persists acrossapplyStraincalls; cancel between points by simply not calling it again. - Wasm
Session - Opaque handle to a decoded, steppable analysis session — the
Sessionenum itself can’t cross the boundary directly, sincewasm_bindgenrequires an exported type to be a plain struct.
Functions§
- create_
material_ probe - decode_
input - Decodes a
CarapaceInputV1-shaped JS value (seeinput_v1’s table doc comments for the exact field names —#[serde(rename_all = "camelCase")]throughout) into a steppableWasmSession. Rejects with a{ kind: "...", ... }-shaped JS error object on anyinput_v1::DecodeError, the same tagged shape a Rust caller would match on.