/** * SimulationRun — Immutable record of a simulation execution. * * Captures everything needed to reproduce a simulation run: * solver config, mesh description, material properties, BCs, * convergence settings, result summary, and provenance metadata. * * Combined with the solver code at the recorded commit hash, * this record should be sufficient for exact reproduction. */ import { type SimulationMetadata } from '../export/MetadataSchema'; export interface SimulationRunConfig { /** Solver type identifier */ solverType: 'thermal' | 'structural' | 'hydraulic' | 'coupled'; /** Complete solver configuration (JSON-serializable) */ solverConfig: Record; /** Mesh/grid description */ mesh: { type: 'regular_grid' | 'tetrahedral' | 'pipe_network'; dimensions: Record; }; /** Material names and their resolved properties */ materials: { name: string; properties: Record; source?: string; }[]; /** Primary result field name */ resultFieldName: string; } export interface SimulationRunResult { /** Whether the solver converged */ converged: boolean; /** Number of iterations (for iterative solvers) */ iterations: number; /** Final residual norm */ finalResidual: number; /** Summary statistics of the primary field */ min: number; max: number; avg: number; /** Wall-clock time in milliseconds */ wallTimeMs: number; } export interface SimulationRun { /** Full metadata record (includes runId, timestamp, software version) */ metadata: SimulationMetadata; /** Raw result data (optional — can be large) */ resultData?: Float32Array; } /** * Create an immutable SimulationRun record from config and results. * * @param config Solver configuration and mesh description * @param result Solver output summary * @param softwareVersion HoloScript version string * @param commitHash Git commit hash (optional) */ export declare function createSimulationRun(config: SimulationRunConfig, result: SimulationRunResult, softwareVersion: string, commitHash?: string): SimulationRun; export interface RunComparison { /** Whether the configurations are identical */ configMatch: boolean; /** List of configuration differences */ configDiffs: string[]; /** Whether the results are within tolerance */ resultMatch: boolean; /** Relative differences in result summary fields */ resultDiffs: { field: string; run1: number; run2: number; relDiff: number; }[]; } /** * Compare two simulation runs to identify differences. * * @param run1 First simulation run * @param run2 Second simulation run * @param tolerance Relative tolerance for result comparison (default 1e-6) */ export declare function compareRuns(run1: SimulationRun, run2: SimulationRun, tolerance?: number): RunComparison; //# sourceMappingURL=SimulationRun.d.ts.map