Engine: the setup checklist (Session::progress), returned by model.check

The analysis stages in order (geometry, seeds & partitions, mesh, material, section, sets,
boundary conditions, loads, step, solve, results), each done, next, todo, blocked or optional,
with the command that does it. Built on the command requirements; Solve also reads the model
check's first error.

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 21:46:33 -04:00
1 parent fc85550534
commit fe557054ef
3 files changed
+248

No files matched your search

+3
View File
@@ -57,11 +57,14 @@ fn units(s: &mut Session, p: &Value) -> Result<Value> {
fn check(s: &mut Session, _: &Value) -> Result<Value> {
let diagnostics = s.model.check();
let errors = diagnostics.iter().filter(|d| d.severity == Severity::Error).count();
let first_error = diagnostics.iter().find(|d| d.severity == Severity::Error).map(ToString::to_string);
let progress = crate::progress::to_json(&s.progress_given(first_error));
Ok(json!({
"ready": errors == 0,
"errors": errors,
"warnings": diagnostics.len() - errors,
"diagnostics": diagnostics,
"progress": progress,
}))
}