fea.loadCase — Create a typed RunMat FEA load or source.
fea.loadCase(id, region, kind, Name, Value, ...) creates a force, moment, pressure, body-force, current-density, coil-current, or heat-source load.
Syntax
load = fea.loadCase(id, region, kind, Name, Value, ...)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | StringScalar | Yes | — | Load-case id. |
region | StringScalar | Yes | — | Geometry region selector. |
kind | StringScalar | Yes | — | Load kind. |
Name, Value | Any | Variadic | — | Numeric fields required by the selected load kind. |
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.loadCase works
- Load id, region selector, and kind are exact text values.
torqueis accepted as an alias for the canonicalmomentkind. - Required vectors contain exactly three finite real numeric values; scalar fields must be finite real numeric scalars.
- All eight built-in integer classes are accepted for numeric fields and remain exact until one host-only binary64 model-storage conversion, so sufficiently wide integers can round.
- Kind-specific fields and vector shape are validated before the typed load object is created; resident numeric fields are rejected.
Example
Create an integer-valued force
load = fea.loadCase("tip_force", "name:Tip_Load", "force", "Vector", int32([0 -1000 0]));Using fea.loadCase with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how fea.loadCase changes the result.
Run a small fea.loadCase example, explain the result, then change one input and compare the output.
FAQ
When is a moment rejected for a solid region?⌄
The constructor validates load syntax first. Model validation or assembly later rejects direct moments on regions without rotational degrees of freedom.
Related Fea functions
fea.boundaryCondition · fea.compare · fea.domain · fea.field · fea.interface · 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.loadCase is executed, line by line, in Rust.
- View the source for fea.loadCase 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.