import type { MethodId } from "../spec/types"; import type { MethodDefinition } from "./types"; import { RR_METHOD } from "./rr"; import { FEM_METHOD } from "./fem"; export const METHODS: MethodDefinition[] = [RR_METHOD, FEM_METHOD]; export function methodById(id: MethodId): MethodDefinition { const m = METHODS.find((x) => x.id === id); if (!m) throw new Error(`unknown method ${id}`); return m; }