Skip to content
Symi Docs
WASM / JavaScript

Signatures in the WASM / JavaScript view are TypeScript. Where the JavaScript facade wraps an operation its form is listed first; the other calling forms are the raw wasm-bindgen exports.

On this page

Vector calculus

Coordinates are passed as a list of variable names; vector fields as a list of component expressions in the same order. Empty variable lists and component/variable count mismatches raise.

gradient#

Raw WebAssembly: Default context

gradient(scalar_field: Expression, variables: string[]): Expression[]
Calling forms

Raw WebAssembly: Explicit context: Context.gradient

gradient(scalar_field: Expression, variables: string[]): Expression[]

∇f\nabla f: the partial derivatives in the order of variables.

divergence#

Raw WebAssembly: Default context

divergence(
    vector_components: Expression[],
    variables: string[],
): Expression
Calling forms

Raw WebAssembly: Explicit context: Context.divergence

divergence(
    vector_components: Expression[],
    variables: string[],
): Expression

∇⋅F=∑i∂Fi/∂xi\nabla\cdot F = \sum_i \partial F_i/\partial x_i; component and variable counts must match.

curl#

Raw WebAssembly: Default context

curl(vector_components: Expression[], variables: string[]): Expression[]
Calling forms

Raw WebAssembly: Explicit context: Context.curl

curl(vector_components: Expression[], variables: string[]): Expression[]

∇×F\nabla\times F. Requires exactly three components and three variables; other dimensions raise.

laplacian#

Raw WebAssembly: Default context

laplacian(scalar_field: Expression, variables: string[]): Expression
Calling forms

Raw WebAssembly: Explicit context: Context.laplacian

laplacian(scalar_field: Expression, variables: string[]): Expression

Δf=∇⋅∇f\Delta f = \nabla\cdot\nabla f.

jacobian#

Raw WebAssembly: Default context

jacobian(vector_components: Expression[], variables: string[]): Matrix
Calling forms

Raw WebAssembly: Explicit context: Context.jacobian

jacobian(vector_components: Expression[], variables: string[]): Matrix

The matrix with entry (i,j)=∂Fi/∂xj(i, j) = \partial F_i/\partial x_j (rows index components, columns index variables). Returned as a Matrix so the result composes with the matrix methods.

hessian#

Raw WebAssembly: Default context

hessian(scalar_field: Expression, variables: string[]): Matrix
Calling forms

Raw WebAssembly: Explicit context: Context.hessian

hessian(scalar_field: Expression, variables: string[]): Matrix

The n×nn\times n matrix of second partials, computed as the Jacobian of the gradient; structurally symmetric on smooth input.

Example#

This family is not part of the recommended JavaScript facade in this release. Call it through the generated symi.raw layer, whose entries are listed with their wasm-bindgen signatures above, and read Migration for the ownership rules that apply there.

Symi documentation · WASM / JavaScript