2004981Plate dynamics lab 2: a hammer on a hung plate by Rayleigh-Ritz and by Mindlin-Reissner finite elementsJeremy Magland 1import type { BackendInfo, RunRequest, RunResult, Runner } from "./types";
2import { executeBundle, numblVersion } from "./execute";
4/**
5 * Runs numbl in the current Node process. Used by tests and scripts; cannot
6 * cancel.
7 */
8export class NodeRunner implements Runner {
9 private readonly info: BackendInfo = {
10 engine: "numbl",
11 version: numblVersion(),
12 optimization: "1",
13 host: "node",
14 };
15 readonly backend = Promise.resolve(this.info);
17 run(req: RunRequest, onOutput?: (text: string) => void): Promise<RunResult> {
18 return Promise.resolve(executeBundle(req, this.info, onOutput));
19 }
20 cancel(): void {
21 /* synchronous host: nothing in flight between awaits */
22 }
23 dispose(): void {
24 /* nothing to release */
25 }
26}