You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7c3ebab
Browse filesBrowse the repository at this point in the historyBrowse files
Simplify the wording of the FEAScriptModel API page
Shorter sentences, lists for the geometry forms and the two times a
boundary condition is checked. No change of meaning.
Signed-off-by: Nikos Chamakos <nikoscham@gmail.com>
Sets the domain and names its boundaries: `{ line: length }`, `{ rectangle: [width, height] }` or
88
-
`{ shape, holes, points }`, a polygon with holes whose boundaries are named, written as a path `{ start, boundaries: [{ name, to }] }`. See [Mesh](../fundamentals/mesh.md#geometry) for the forms and the boundary names. The geometry is
89
-
checked at once: a polygon that is not simple, a hole outside the shape or inside another hole, or a point
90
-
outside the domain throws a `FEAScriptError` of code `"INVALID_INPUT"` listing every problem.
87
+
Sets the domain and names its boundaries. The geometry has one of these forms:
88
+
89
+
-`{ line: length }`;
90
+
-`{ rectangle: [width, height] }`;
91
+
-`{ shape, holes, points }`: a polygon with holes and named boundaries, written as a path
92
+
`{ start, boundaries: [{ name, to }] }`.
93
+
94
+
For the forms and the boundary names, see [Mesh](../fundamentals/mesh.md#geometry).
95
+
96
+
FEAScript checks the geometry immediately. A polygon that is not simple, a hole outside the shape or inside
97
+
another hole, or a point outside the domain throws a `FEAScriptError` with the code `INVALID_INPUT`. The error
98
+
lists every problem.
91
99
92
100
### `setMeshConfig(meshConfig)`
93
101
94
-
Sets how the geometry is meshed. The mesh is generated at the first solve (or by `getMesh()`).
102
+
Sets how to mesh the geometry. FEAScript generates the mesh at the first solve, or at the first call to
@@ -126,18 +135,21 @@ Adds a boundary condition, or replaces the condition of a boundary that already
126
135
|`boundaryKey`|`string`| The name of a boundary of the geometry or the mesh (for example `"top"`, see [Boundary names](../fundamentals/mesh.md#boundary-names)), or the node number for the Euler–Bernoulli beam |
127
136
|`condition`|`object`| The condition type and its named parameters, for example `{ type: "convection", h: 1, ambientTemperature: 20 }`; for the Euler–Bernoulli beam, one such object or a list of them |
128
137
129
-
See [Boundary conditions](../fundamentals/boundary-conditions.md) for the condition types of each model. A
130
-
condition object with no or an unknown type, or with a missing or unknown parameter, throws a `FEAScriptError`
131
-
with the code `INVALID_INPUT` when it is added; the other problems (a type that the selected model does not
132
-
have, a value that is not a number, a boundary that is not in the mesh) are reported when `solve()` runs (see
133
-
[Checks](../fundamentals/boundary-conditions.md#checks)). The array form of FEAScript 0.3, for example
134
-
`["convection", 1, 20]`, still works, with a warning.
138
+
For the condition types of each model, see [Boundary conditions](../fundamentals/boundary-conditions.md).
139
+
FEAScript checks a condition at two times (see [Checks](../fundamentals/boundary-conditions.md#checks)):
140
+
141
+
- When the condition is added: a condition object with no type or an unknown type, or with a missing or unknown
142
+
parameter, throws a `FEAScriptError` with the code `INVALID_INPUT`.
143
+
- When `solve()` runs: the other problems are reported, such as a type that the selected model does not have, a
144
+
value that is not a number, or a boundary that is not in the mesh.
145
+
146
+
The array form of FEAScript 0.3, for example `["convection", 1, 20]`, still works, with a warning.
135
147
136
148
### `setSolverMethod(solverMethod)`
137
149
138
-
Deprecated: use the `solver` option of `setModelConfig`, for example
150
+
Deprecated. Use the `solver` option of `setModelConfig` instead, for example
139
151
`setModelConfig("heatConduction", { solver: { method: "jacobi" } })`. `setSolverMethod` still selects the
140
-
linear system solver, with a warning, and will be removed in a future version.
152
+
linear system solver, with a warning. It will be removed in a future version.
141
153
142
154
### `solve(options)`
143
155
@@ -159,12 +171,14 @@ Returns an object with:
159
171
|`info`|`object`| The run report (see below) |
160
172
161
173
For scalar models (heat conduction, general-form PDE, front propagation), `solutionVector` has one value per
162
-
node, in the order of `nodesCoordinates`, and there is no `fields` property. The
163
-
[creeping flow](../models/creeping-flow.md#results) (`velocityMagnitude`, `u`, `v`, `p`) and
174
+
node, in the order of `nodesCoordinates`. These models have no `fields` property.
175
+
176
+
The [creeping flow](../models/creeping-flow.md#results) (`velocityMagnitude`, `u`, `v`, `p`) and
164
177
[Euler–Bernoulli beam](../models/euler-bernoulli-beam.md#results) (`w`, `theta`) models have more unknowns per
165
-
node: `fields` holds each of them as a `Float64Array` with one value per node, ready to plot or post-process.
178
+
node. For these models, `fields` holds each named field as a `Float64Array` with one value per node, ready to
179
+
plot or post-process.
166
180
167
-
`info` reports how the solve went, with the same properties for every model and solver method:
181
+
`info` reports the result of the solve. It has the same properties for every model and solver method:
|`computeEngine`|`object`|Optional. An initialized WebGPU compute engine to reuse across solves. Whenomitted or `null`, FEAScript creates one for the solve and terminates it afterwards; a provided engine is left running |
216
+
|`computeEngine`|`object`|Optional. An initialized WebGPU compute engine to reuse across solves. If it is omitted or `null`, FEAScript creates an engine for the solve and terminates it after the solve. Anengine that you provide stays running |
0 commit comments