Results and recovery
Result containers, nodal/element accessors, and exact internal force and displacement recovery along members.
Asap.LinearResults — Type
LinearResults{T}Results of a linear static solve — displacements, reactions, element end forces, and compliance. Results live HERE, not on nodes/elements: this keeps definition objects pure and lets the result scalar type differ from the model's (e.g. dual numbers flowing through the AD path).
Access through the functions below rather than raw fields where possible — they handle global-DOF bookkeeping for you.
Fields
u::Vector{T}: global displacement vector, full DOF space (fixed and inactive slots are zero) [length, rad]reactions::Vector{T}: support reactions, full DOF space (nonzero only at fixed DOFs) [force, force·length]element_forces::Vector{Vector{T}}: per element, the LOCAL end-force 12-vector[N₁, Vy₁, Vz₁, T₁, My₁, Mz₁, N₂, Vy₂, Vz₂, T₂, My₂, Mz₂]— forces the element exerts on its ends, in element local coordinatescompliance::T: external workuᵀF— the standard stiffness objective
Accessors
displacement(res, node) -> SVector{6}reaction(res, node) -> SVector{6}element_forces(res, el) -> Vector{T}axial_force(res, el) -> T
Asap.axial_force — Method
axial_force(res::LinearResults, el) -> TThe element's axial force, tension-positive [force]. Uniform across element types (slot 7 of the local end-force vector — the axial action at the end node, which equals the member force for a two-node element). For a VariableElement, the axial force of its LAST segment (constant along the member absent axial element loads).
Asap.displacement — Method
displacement(res::LinearResults, node) -> SVector{6}The node's displacements (ux, uy, uz, θx, θy, θz) in global coordinates.
Asap.element_forces — Method
element_forces(res::LinearResults, el) -> Vector{T}The element's local end-force vector (see LinearResults for the component ordering). Requires the element's index (assigned by process!).
Asap.element_forces — Method
element_forces(res::LinearResults, el::VariableElement, s::Int) -> Vector{T}Local end-force 12-vector of segment s of a super-element (the stored vector concatenates one 12-block per segment, start → end).
Asap.reaction — Method
reaction(res::LinearResults, node) -> SVector{6}Support reactions (Fx, Fy, Fz, Mx, My, Mz) at the node in global coordinates. Zero at unsupported nodes.
Asap.ElementForceState — Type
ElementForceState{T}Everything needed to evaluate a member's internal forces and local displacements at any fraction of its length, in closed form and without allocation: the local end actions and displacements at the start node, the member's rigidities, and its merged LoadTrace.
Build with internal_forces; evaluate with axial_force, shear_y/shear_z, moment_y/moment_z, torsion, and local_displacements; sample densely with InternalForces.
Asap.InternalForces — Type
InternalForces{T}Densely sampled internal-force diagrams of one member, for plotting. Stations include every load breakpoint and BOTH sides of each point action (offset by ~√eps relative), so shear/moment discontinuities render as true jumps instead of aliased slopes.
Fields
x::Vector{T}: stations along the member [length]N: axial force (tension +)Vy,Mz: shear and moment of the local x–y bending planeVz,My: shear and moment of the local x–z bending planeMx: torsion
(NOTE for AsapToolkit migrants: names are axis-correct here — the legacy Toolkit .My corresponds to Mz, .Mz to My, .P to N.)
Asap.InternalForces — Method
InternalForces(model, el; resolution = 20) -> InternalForces
InternalForces(state::ElementForceState; resolution = 20)Sample a member's internal forces at resolution evenly spaced stations plus all load breakpoints and both sides of point actions. For a VariableElement, segments are sampled in turn with globally increasing stations.
Asap.LoadTrace — Type
LoadTrace{T}The merged LOCAL loading of one prismatic member (or segment of a super-element): everything needed to evaluate internal forces at any station by closed form.
Fields
L::T: member lengthxb::Vector{T}: breakpoint stations0 = xb[1] < … < xb[end] = L(union of all distributed-load breakpoints)w::Matrix{T}:3 × nlocal distributed intensity components (wx, wy, wz) at each breakpoint, piecewise linear between [force/length]W0::Matrix{T}: cumulative∫₀^xb w dsper component (zeroth moment)W1::Matrix{T}: cumulative∫₀^xb w·s dsper component (first moment) — together these make∫₀ˣ w(s)(x−s) ds = x·W0(x) − W1(x)a closed formpstation::Vector{T}: point-action stationspforce::Matrix{T}:3 × nplocal point force componentspmoment::Matrix{T}:3 × nplocal point moment components
Asap.axial_force — Method
axial_force(state::ElementForceState, t) -> TInternal axial force at fraction t [force], tension-positive.
Asap.internal_forces — Method
internal_forces(model, el) -> ElementForceState
internal_forces(model, el::VariableElement) -> Vector{ElementForceState}Build the closed-form internal-force state of an element from a solved model (requires solve! to have run). For a VariableElement, one state per segment; use locate_segment or the fraction-based evaluators below, which handle the mapping for you:
axial_force(model, el, t), shear_y(model, el, t), moment_z(model, el, t), …Asap.local_displacements — Method
local_displacements(state::ElementForceState, t) -> SVector{3}Local displacements (u, v, w) at fraction t: axial extension plus transverse deflections in the local y and z directions [length].
Recovered exactly by double integration of the exact internal-force fields — v(x) = v₀ + ∫θz, θz(x) = θz₀ + ∫Mz/EIx (and the x–z analogue with the sign flip θy = −w′), axial u(x) = u₀ + ∫N/EA. The integrands are piecewise polynomials of degree ≤ 3, so per-interval 3-point Gauss evaluates the integrals exactly.
Asap.moment_y — Method
moment_y(state::ElementForceState, t) -> TInternal bending moment about local y at fraction t [force·length] — paired with Vz (bending in the local x–z plane); dMy/dx = −Vz.
Asap.moment_z — Method
moment_z(state::ElementForceState, t) -> TInternal bending moment about local z at fraction t [force·length] — the moment paired with Vy (bending in the local x–y plane), sagging-positive for +y loading.
Asap.shear_y — Method
shear_y(state::ElementForceState, t) -> TInternal shear in the local y direction at fraction t [force]. Satisfies dMz/dx = Vy.
Asap.shear_z — Method
shear_z(state::ElementForceState, t) -> TInternal shear in the local z direction at fraction t [force].
Asap.torsion — Method
torsion(state::ElementForceState, t) -> TInternal torsional (twisting) moment at fraction t [force·length].