fea.run — Execute a RunMat FEA study or sweep.
fea.run(studyOrSweepOrPath) resolves and executes one typed study, a sequential sweep, or a .fea document.
Syntax
run = fea.run(studyOrSweepOrPath)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
study | Any | Yes | — | A .fea path, fea.Study object, or fea.Sweep object. |
Returns
| Name | Type | Description |
|---|---|---|
result | Any | FEA object or operation result. |
Errors
| Identifier | When | Message |
|---|---|---|
RunMat:fea:LoadFailed | A .fea document cannot be read, parsed, or resolved. | fea: failed to load FEA document |
RunMat:fea:InvalidInput | A builtin receives an unsupported argument pattern or object type. | fea: invalid input |
RunMat:fea:OperationFailed | A validation, planning, run, result-query, comparison, or trend operation fails. | fea: operation failed |
RunMat:fea:Internal | An FEA object or operation result cannot be converted to a RunMat value. | fea: internal error |
How fea.run works
- Exactly one
.feapath,fea.Study, orfea.Sweepinput is required. Direct numeric inputs have no role and reject before document resolution or solver execution. - A single study returns a
fea.RunResultwith its run id, status, quality gates, provenance, selected operation, and evidence path. A sweep returns aggregate study/success/failure counts, per-study run entries, and exact one-based failure indexes. - Discrete provenance, option, prep, sweep, count, and index fields remain exact typed integers. Solver measurements, tolerances, rates, ratios, and physical quantities remain binary64.
- The selected study backend may execute through the configured CPU or GPU solver. Argument decoding and result-object serialization are host-side and do not gather resident arguments.
- Running an already resolved study or non-CAD document does not intrinsically require native OCCT. Resolving a path that imports topology-bearing CAD may require the configured OCCT geometry backend before solving.
Example
Run a typed study
run = fea.run(study);
results = fea.results(run);Using fea.run with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how fea.run changes the result.
Run a small fea.run example, explain the result, then change one input and compare the output.
FAQ
Does fea.run always use the CPU?⌄
No. It executes the backend selected by the study; only input decoding and public object construction are host-side.
Related Fea functions
fea.boundaryCondition · fea.compare · fea.domain · fea.field · fea.interface · fea.loadCase · fea.material · fea.materialAssignment · fea.model · fea.plan · fea.plot · fea.results · fea.runOptions · fea.step · fea.study · fea.sweep · fea.trends · fea.validate
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how fea.run is executed, line by line, in Rust.
- View the source for fea.run in Rust on GitHub
- Learn how the RunMat runtime works
- Found a bug? Open an issue with a minimal reproduction.
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.