Back to Finite Element (MFEM)
mfem.linalg.SparseMatrix.fromPointer
Creates a SparseMatrix from an existing WASM pointer.
Syntax
mfem.linalg.SparseMatrix.fromPointer(ptr, ownsMemory?)
Description
Creates a SparseMatrix from an existing WASM pointer. Use with caution - the caller is responsible for pointer validity.
Parameters
| Name | Description |
|---|---|
| ptr | - WASM pointer to an existing MFEM SparseMatrix |
| ownsMemory(optional) | - If true, destroy() will free the memory; if false, it won't |
Returns
Promise<SparseMatrix>