fea.field — Extract one field from RunMat FEA results.
fea.field(resultsOrRun, fieldId) resolves one named field from a RunMat FEA result object and returns a typed fea.Field object.
Syntax
field = fea.field(resultsOrRun, fieldId)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
resultsOrRun | Any | Yes | — | fea.Results, fea.RunResult, or persisted run id. |
fieldId | StringScalar | Yes | — | Exact field id or unique dotted suffix. |
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.field works
- Exactly one result or run object and one text field identifier are required.
- An exact field id wins; a unique dotted-name suffix is also accepted, while absent or ambiguous fields fail.
- Host field values are exposed as binary64 tensors. A device field reference remains provider metadata and is not silently gathered.
- Shape, component-count, element-count, and size metadata are structural integer outputs and remain integer typed; they are not physical field values.
- Integer input arrays have no role and are rejected before result lookup.
Example
Extract stress results
stress = fea.field(results, "structural.von_mises");Using fea.field with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how fea.field changes the result.
Run a small fea.field example, explain the result, then change one input and compare the output.
FAQ
Are shape and element count field data?⌄
No. They are exact structural metadata; the values property contains the binary64 physical field data.
Related Fea functions
fea.boundaryCondition · fea.compare · fea.domain · fea.interface · fea.loadCase · fea.material · fea.materialAssignment · fea.model · fea.plan · fea.plot · fea.results · fea.run · 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.field is executed, line by line, in Rust.
- View the source for fea.field 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.