engine: parameter schemas for every command

cmd/forms.rs describes each command's parameters: model definitions (sets,
materials with elasticity, plasticity, hyperelasticity, damage, thermal and fluid
options, sections, reference points, couplings, masses, springs, boundary
conditions, loads, fluid domains, steps including nonlinear and explicit),
meshers, solvers, deck export, files and results. Tests check that every command
has a form and that a form's defaults are accepted or refused only for the
required fields left empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-14 13:20:04 -04:00
1 parent 5c5516aae0
commit 8848ef9e7c
16 files changed
+1071 -73

No files matched your search

+7 -7
View File
@@ -12,7 +12,7 @@ pub const DEFORMED: CommandSpec = CommandSpec {
id: "results.deformed",
label: "Deformed Shape",
params: r#"{"step": "Load", "show": true, "scale": "auto"} — shows a solved step's deformed shape (`show: false` the undeformed mesh); `scale` is a factor (0 draws the undeformed shape, so a sequence from 0 swings it out) or "auto" (the largest displacement drawn a tenth of the model's size); `step` defaults to the step shown or the first solved one"#,
form: None,
form: Some(super::forms::DEFORMED),
kind: CommandKind::Session,
run: deformed,
};
@@ -21,7 +21,7 @@ pub const CONTOUR: CommandSpec = CommandSpec {
id: "results.contour",
label: "Contours",
params: r#"{"step": "Load", "field": "von_mises", "bands": 12} — contours of a nodal field: displacement, displacement_x/y/z, von_mises, max/mid/min_principal, stress_xx/yy/zz/xy/xz/yz (stresses for static steps); "none" turns them off; 2 to 24 bands"#,
form: None,
form: Some(super::forms::CONTOUR),
kind: CommandKind::Session,
run: contour,
};
@@ -30,7 +30,7 @@ pub const MODES: CommandSpec = CommandSpec {
id: "results.modes",
label: "Mode Shapes",
params: r#"{"step": "Modes", "mode": 1} — shows a mode shape of a solved frequency step (from 1) and lists every mode's frequency"#,
form: None,
form: Some(super::forms::MODES),
kind: CommandKind::Session,
run: modes,
};
@@ -39,7 +39,7 @@ pub const ANIMATE: CommandSpec = CommandSpec {
id: "results.animate",
label: "Animate",
params: r#"{"on": true} — animates the deformed shape: a mode swings through its positive and negative shape, a static step grows from undeformed to deformed"#,
form: None,
form: Some(super::forms::ANIMATE),
kind: CommandKind::Session,
run: animate,
};
@@ -48,7 +48,7 @@ pub const FRAME: CommandSpec = CommandSpec {
id: "results.frame",
label: "Field Frame",
params: r#"{"step": "Impact", "frame": 3, "time": 0.002} — shows a field frame of a solved explicit step, by index from 0 or the frame nearest a time (neither: the last), or of a nonlinear static step (one per converged increment, `time` its load factor; the deformed shape follows it, its contours show the final state); the deformed shape and contours follow it"#,
form: None,
form: Some(super::forms::FRAME),
kind: CommandKind::Session,
run: frame,
};
@@ -57,7 +57,7 @@ pub const REACTIONS: CommandSpec = CommandSpec {
id: "results.reactions",
label: "Reaction Sums",
params: r#"{"step": "Load", "sets": ["root"], "about": [0, 0, 0]} — reaction force and moment (about the point) summed over each node set, and over the whole model; `sets` defaults to the sets the step's boundary conditions hold"#,
form: None,
form: Some(super::forms::REACTIONS),
kind: CommandKind::Session,
run: reactions,
};
@@ -66,7 +66,7 @@ pub const CLEAR: CommandSpec = CommandSpec {
id: "results.clear",
label: "Hide Results",
params: "{} — back to the model: hides the deformed shape, contours and modes",
form: None,
form: Some(&[]),
kind: CommandKind::Session,
run: clear,
};