Skip to main content
Version: 0.3.1

Installation

In the browser​

Import the ES module build from the hosted build or from a CDN:

<script type="module">
import { FEAScriptModel } from "https://core.feascript.com/dist/feascript.esm.js";
</script>
<script type="module">
import { FEAScriptModel } from "https://cdn.jsdelivr.net/gh/FEAScript/FEAScript-core/dist/feascript.esm.js";
</script>

You can also download a release from GitHub Releases and import it locally.

With Node.js​

npm install feascript
import { FEAScriptModel } from "feascript";

FEAScript is built as an ES module. In a new project, set "type": "module" in your package.json.

Optional dependencies​

FEAScript itself needs no extra setup to solve a model. The plotting functions use two optional libraries:

LibraryUsed byBrowsernpm
PlotlyplotSolution, plotInterpolatedSolutionLoad plotly.min.js with a <script> tag (global Plotly)npm install plotly.js
vtk.jsplotSolutionVtk, plotInterpolatedSolutionVtk, VTK exportMap @kitware/vtk.js/ with an import mapnpm install @kitware/vtk.js

See Visualization for the details.

Environments​

FeatureBrowserNode.js
Models, meshes, solve()✓✓
importGmshMesh✓✓ (pass an object with a text() method)
Plotting with Plotly or vtk.js✓
FEAScriptWorker✓
"jacobi-gpu" with solveAsync()✓ (WebGPU required)