/** * SimulationSerializer — Serialize/deserialize complete simulation configs. * * Enables shareable simulations: mesh + config + results in a single JSON * that can be embedded in URLs, stored in databases, or shared as files. */ export interface SerializedSimulation { /** Format version */ v: 1; /** Solver type identifier */ solverType: string; /** Solver configuration */ config: Record; /** Mesh data (compressed as regular arrays) */ mesh?: { vertices: number[]; tetrahedra?: number[]; triangles?: number[]; nodesPerElement?: number; }; /** Simulation results (if solved) */ results?: { scalarFields: Record; stats: Record; insights?: { severity: string; message: string; }[]; }; /** Metadata */ metadata: { createdAt: string; solveTimeMs?: number; description?: string; }; } /** * Serialize a simulation setup (and optionally results) to a portable JSON object. */ export declare function serializeSimulation(opts: { solverType: string; config: Record; vertices?: Float64Array | Float32Array; tetrahedra?: Uint32Array; triangles?: Uint32Array; nodesPerElement?: number; scalarFields?: Record; stats?: Record; description?: string; }): SerializedSimulation; /** * Deserialize a simulation back into typed arrays. */ export declare function deserializeSimulation(data: SerializedSimulation): { solverType: string; config: Record; vertices?: Float64Array; tetrahedra?: Uint32Array; scalarFields: Record; stats: Record; }; /** * Compress a serialized simulation to a base64url string for URL embedding. * Uses JSON → UTF-8 encoding. For browser, pair with CompressionStream for deflate. */ export declare function simulationToBase64(sim: SerializedSimulation): string; /** * Decompress a base64url string back to a SerializedSimulation. */ export declare function base64ToSimulation(encoded: string): SerializedSimulation; /** * Estimate the URL size of a serialized simulation (bytes when base64-encoded). */ export declare function estimateURLSize(sim: SerializedSimulation): number; //# sourceMappingURL=SimulationSerializer.d.ts.map