fea.boundaryCondition — Create a typed RunMat FEA boundary condition.
fea.boundaryCondition(id, region, kind, Name, Value, ...) creates a typed boundary-condition object for a RunMat FEA model. This API is native to RunMat rather than a MATLAB compatibility builtin.
Syntax
bc = fea.boundaryCondition(id, region, kind, Name, Value, ...)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | StringScalar | Yes | — | Boundary-condition id. |
region | StringScalar | Yes | — | Target region id. |
kind | StringScalar | Yes | — | Boundary-condition kind. |
Name, Value | Any | Variadic | — | Numeric fields required by the selected 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.boundaryCondition works
- The first three inputs select the boundary-condition id, target region id, and boundary kind.
- Numeric fields must be finite real numeric scalars. Logical values, arrays with more than one element, and unknown fields are rejected with
RunMat:fea:InvalidInput. - All eight built-in integer classes are accepted for every numeric field listed below. Each exact integer is converted once to the model's binary64 field using IEEE-754 integer-to-f64 conversion, so sufficiently wide integers can round.
Examples
Prescribe integer-valued rotations
bc = fea.boundaryCondition('rotation', 'tip', 'prescribedRotation', 'rx', int16(0), 'ry', int16(1), 'rz', int16(0));Create a CFD inlet boundary
bc = fea.boundaryCondition('inlet', 'inlet_face', 'cfdInletVelocity', 'velocityMPerS', uint8(12));Using fea.boundaryCondition with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how fea.boundaryCondition changes the result.
Run a small fea.boundaryCondition example, explain the result, then change one input and compare the output.
FAQ
Are integer fields stored as integers?⌄
No. Boundary-condition model fields are binary64 values. RunMat preserves the integer until the explicit constructor boundary and then performs one documented IEEE-754 conversion.
Related Fea functions
fea.compare · fea.domain · fea.field · 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.boundaryCondition is executed, line by line, in Rust.
- View the source for fea.boundaryCondition 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.