Skip to content

Commit e42d968

Browse files
committed
Update the docs for FEAScript-core 0.4.1
The current docs are labeled 0.4.1, and the jsDelivr example, the version examples and llms.txt name 0.4.1. The heat conduction caution, the error table and llms.txt say that zero flux on every boundary now throws SINGULAR_MATRIX. The versioning note in the README says that a function added in a patch release is marked with its version. Signed-off-by: Nikos Chamakos <nikoscham@gmail.com>
1 parent c67c5e4 commit e42d968

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ npx -y -p node@20 -c "npm run build && npm run serve"
3535
- Verification: `python3 scripts/generate-verification-figures.py`, which reads the Gmsh meshes from `../FEAScript-core/tests/meshes`.
3636
- Examples: `node scripts/export-example-results.mjs` runs the Node.js examples of `../FEAScript-core` (built with `npm run build`) unchanged and records their meshes and solutions; then `python3 scripts/generate-example-figures.py` draws the geometries, meshes and results.
3737
- Log-log plots (convergence, comparison with Elmer, solver times): `python3 scripts/generate-plot-figures.py`. Their values are those of the tables next to each plot; update both together.
38-
- `docs/` always holds the docs of the current FEAScript-core version ("0.4.0" in the version dropdown).
38+
- `docs/` always holds the docs of the current FEAScript-core version ("0.4.1" in the version dropdown).
3939
- `static/llms.txt` (served at `docs.feascript.com/llms.txt`) is a hand-written, single-file API summary for AI assistants. Update it whenever the API changes: new models, options, boundary conditions or solvers.
4040

4141
## Appearance
@@ -46,7 +46,7 @@ The navbar's GitHub pill matches the website and fetches the FEAScript-core star
4646

4747
## Versioning
4848

49-
The docs keep one version per **minor** release of FEAScript-core (`MAJOR.MINOR`), labeled with its latest patch release. Patch releases do not change the API, so they get no docs version of their own.
49+
The docs keep one version per **minor** release of FEAScript-core (`MAJOR.MINOR`), labeled with its latest patch release. Patch releases make no breaking changes, so they get no docs version of their own. A function or option added in a patch release is marked in the docs with the version that added it (for example "Added in FEAScript 0.4.1").
5050

5151
- `docs/` holds the docs of the latest minor version and is served at the unversioned URLs (`lastVersion: "current"` in `docusaurus.config.js`). Its label in the version dropdown is set in `docusaurus.config.js`.
5252
- Older minor versions are snapshots in `versioned_docs/version-x.y.z/`, served at `docs.feascript.com/x.y.z/...`, with their sidebars in `versioned_sidebars/` and their names in `versions.json`.

‎docs/api/feascript-model.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ An input that FEAScript cannot use, or a solve that would return an empty or a w
217217
| `UNSUPPORTED_MESH` | A mesh the model or the Gmsh reader cannot use yet, for example creeping flow on linear elements or a Gmsh mesh that mixes element shapes |
218218
| `UNSUPPORTED_SOLVER` | The model does not support the solver method, or `solveAsync()` cannot run the model |
219219
| `NOT_CONVERGED` | A Jacobi solve, a front propagation or a nonlinear general-form PDE did not converge |
220-
| `SINGULAR_MATRIX` | The system has no unique solution, for example with a zero conductivity |
220+
| `SINGULAR_MATRIX` | The system has no unique solution, for example with a zero conductivity or zero heat flux on every boundary |
221221
| `NON_FINITE_VALUES` | A NaN or infinite value in the assembled system or in the solution, for example from a coefficient function that returns NaN somewhere |
222222
| `MESH_TOO_FINE` | The triangle mesh generator passed its `maxNodes` limit ([mesh generators](./mesh-generators.md)) |
223223
| `INTERNAL_ERROR` | A step of the frontal solver failed |

‎docs/api/utilities.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ at every level.
3131
```javascript
3232
import { version } from "feascript";
3333

34-
console.log("FEAScript version:", version); // "0.4.0"
34+
console.log("FEAScript version:", version); // "0.4.1"
3535
```
3636

37-
A string constant with the version of the library, as in its npm package (`"0.4.0"`; a release candidate reads
37+
A string constant with the version of the library, as in its npm package (`"0.4.1"`; a release candidate reads
3838
`"0.4.0-rc.1"`).
3939

4040
`printVersion`, the name used up to FEAScript 0.3, is still exported but deprecated; use `version`. It will be

‎docs/getting-started/installation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Both URLs above always serve the latest FEAScript release, so your page updates
2727

2828
```html
2929
<script type="module">
30-
import { FEAScriptModel } from "https://cdn.jsdelivr.net/gh/FEAScript/FEAScript-core@0.4.0/dist/feascript.esm.js";
30+
import { FEAScriptModel } from "https://cdn.jsdelivr.net/gh/FEAScript/FEAScript-core@0.4.1/dist/feascript.esm.js";
3131
</script>
3232
```
3333
:::

‎docs/models/heat-conduction.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ exactly like `"symmetry"`.
118118
:::caution
119119
Give at least one boundary a `"constantTemperature"` or `"convection"` condition. With zero heat flux on every
120120
boundary, the temperature is determined only up to a constant, and with a heat source there is no steady
121-
solution at all. FEAScript does not detect this case yet: the solve returns meaningless values instead of
122-
throwing an error.
121+
solution at all. Since 0.4.1 the solve throws a `FEAScriptError` with the code `SINGULAR_MATRIX` in this case
122+
(0.4.0 returned meaningless values instead).
123123
::: The type `"constantTemp"`, renamed `"constantTemperature"` in 0.3.0, was removed in
124124
0.4.0.
125125

‎docusaurus.config.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const config = {
5050
// "current" holds the docs of the latest minor version; older minor versions are snapshots (see README)
5151
lastVersion: "current",
5252
versions: {
53-
current: { label: "0.4.0" },
53+
current: { label: "0.4.1" },
5454
"0.3.1": { label: "0.3.1" },
5555
"0.2.0": { label: "0.2.0", banner: "unmaintained" },
5656
},

‎static/llms.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FEAScript
22

3-
> FEAScript is a finite element simulation library written in JavaScript (ES modules). It runs in the browser and in Node.js. This file is a compact, exact reference of the FEAScript 0.4.0 API for AI assistants. Use only the functions, options and string values listed here: anything not listed is not supported.
3+
> FEAScript is a finite element simulation library written in JavaScript (ES modules). It runs in the browser and in Node.js. This file is a compact, exact reference of the FEAScript 0.4.1 API for AI assistants. Use only the functions, options and string values listed here: anything not listed is not supported.
44

55
Full documentation: https://docs.feascript.com
66
Source code: https://github.com/FEAScript/FEAScript-core
@@ -23,7 +23,7 @@ import { FEAScriptModel } from "feascript";
2323
</script>
2424
```
2525

26-
Exports: `FEAScriptModel`, `FEAScriptWorker`, `FEAScriptError`, `importGmshMesh`, `generateTriangleMesh`, `generateQuadrilateralMesh`, `logSystem`, `version` (a string constant, e.g. `"0.4.0"`), `plotSolution`, `plotInterpolatedSolution`, `plotSolutionVtk`, `plotInterpolatedSolutionVtk`, `createColorScale`, `createContourLineOptions`, `transformSolverOutputToVtkData`, `transformSolverOutputToVTP`, `transformSolverOutputToMLBuffers`, and from 0.4.1 `evaluateSolution`.
26+
Exports: `FEAScriptModel`, `FEAScriptWorker`, `FEAScriptError`, `importGmshMesh`, `generateTriangleMesh`, `generateQuadrilateralMesh`, `logSystem`, `version` (a string constant, e.g. `"0.4.1"`), `plotSolution`, `plotInterpolatedSolution`, `plotSolutionVtk`, `plotInterpolatedSolutionVtk`, `createColorScale`, `createContourLineOptions`, `transformSolverOutputToVtkData`, `transformSolverOutputToVTP`, `transformSolverOutputToMLBuffers`, and from 0.4.1 `evaluateSolution`.
2727

2828
## Workflow
2929

@@ -103,7 +103,7 @@ import type { Geometry, MeshConfig, BoundaryCondition, SolveResult, RunReport }
103103
- `{ type: "constantTemperature", temperature }`: Dirichlet, T = temperature.
104104
- `{ type: "convection", h, ambientTemperature }`: Robin, −k ∂T/∂n = h (T − T∞). `h` and `ambientTemperature` are numbers.
105105
- `{ type: "symmetry" }`: zero heat flux (also the condition of a boundary without one).
106-
- Give at least one boundary a `"constantTemperature"` or `"convection"` condition. With zero flux on every boundary the temperature is not determined: the solve does not throw, but returns meaningless values.
106+
- Give at least one boundary a `"constantTemperature"` or `"convection"` condition. With zero flux on every boundary the temperature is not determined, and the solve throws `"SINGULAR_MATRIX"` (0.4.0 returned meaningless values instead).
107107
- Solvers: `"lusolve"`, `"jacobi"`, `"frontal"`, and `"jacobi-gpu"` (with `await model.solveAsync()` only).
108108
- Result: one temperature per node in `solutionVector`.
109109

@@ -342,7 +342,7 @@ try {
342342
| `UNSUPPORTED_MESH` | A mesh the model cannot use, e.g. creeping flow on linear elements, a 2D general form PDE, a beam not on a linear 1D mesh |
343343
| `UNSUPPORTED_SOLVER` | A solver method the model does not support, a `solveAsync()` it cannot run, or `"jacobi-gpu"` without WebGPU |
344344
| `NOT_CONVERGED` | Jacobi, front propagation or the nonlinear general form PDE did not converge |
345-
| `SINGULAR_MATRIX` | No unique solution, e.g. a zero conductivity |
345+
| `SINGULAR_MATRIX` | No unique solution, e.g. a zero conductivity or zero flux on every boundary |
346346
| `NON_FINITE_VALUES` | NaN or infinity in the system or the solution, e.g. a coefficient function that returns NaN |
347347
| `MESH_TOO_FINE` | The triangle mesh passed `maxNodes` |
348348
| `INTERNAL_ERROR` | A step of the frontal solver failed |

0 commit comments

Comments
 (0)