1import type { MethodDefinition, PlateResult } from "@plate-lab/core";
3/** What the method idealizes in general, and what this particular run approximated. */
4export function ValidityNotes({ method, result }: { method: MethodDefinition; result?: PlateResult | null }) {
5 return (
6 <div className="pl-small">
7 <ul style={{ margin: "4px 0", paddingLeft: 18 }}>
8 {method.validity.map((v, i) => (
9 <li key={i}>{v}</li>
10 ))}
11 </ul>
12 {result && result.info.notes.length > 0 && (
13 <>
14 <div className="pl-muted" style={{ marginTop: 6 }}>
15 This run:
16 </div>
17 <ul style={{ margin: "4px 0", paddingLeft: 18 }}>
18 {result.info.notes.map((n, i) => (
19 <li key={i}>{n}</li>
20 ))}
21 </ul>
22 </>
23 )}
24 {result?.modes?.truncated && <div className="pl-note">The modal sum was truncated at max_modes; raise it to check convergence of the stress.</div>}
25 </div>
26 );
27}