Finite Element (MFEM)
Finite element library powered by MFEM compiled to WebAssembly. Provides mesh generation, finite element spaces, bilinear/linear forms, coefficients, and iterative solvers.
mfem.bilinearForms.addBoundaryMassIntegrator
Add a boundary mass integrator to the bilinear form.
mfem.bilinearForms.addBoundaryMassIntegrator(blf, coeff?)
mfem.bilinearForms.addConvectionIntegrator
Add a convection integrator (v · ∇u) to the bilinear form.
mfem.bilinearForms.addConvectionIntegrator(blf, velocity, alpha?)
mfem.bilinearForms.addCurlCurlIntegrator
Add a curl-curl integrator (∇×u · ∇×v) to the bilinear form.
mfem.bilinearForms.addCurlCurlIntegrator(blf, coeff?)
mfem.bilinearForms.addDGDiffusionIntegrator
Add DG diffusion integrator for interior penalty method.
mfem.bilinearForms.addDGDiffusionIntegrator(blf, coeff, sigma, kappa)
mfem.bilinearForms.addDGElasticityIntegrator
Add a discontinuous Galerkin (DG) elasticity integrator.
mfem.bilinearForms.addDGElasticityIntegrator(blf, lambda, mu, alpha?, kappa?)
mfem.bilinearForms.addDGTraceIntegrator
Add DG trace integrator for face terms.
mfem.bilinearForms.addDGTraceIntegrator(blf, coeff?, alpha?, beta?)
mfem.bilinearForms.addDiffusionIntegrator
Add a diffusion integrator (∇u · ∇v) to the bilinear form.
mfem.bilinearForms.addDiffusionIntegrator(blf, coeff?)
mfem.bilinearForms.addDivDivIntegrator
Add a div-div integrator (∇·u)(∇·v) to the bilinear form.
mfem.bilinearForms.addDivDivIntegrator(blf, coeff?)
mfem.bilinearForms.addElasticityIntegrator
Add a linear elasticity integrator to the bilinear form.
mfem.bilinearForms.addElasticityIntegrator(blf, lambda, mu)
mfem.bilinearForms.addGradientIntegrator
Add a gradient integrator to the bilinear form.
mfem.bilinearForms.addGradientIntegrator(blf)
mfem.bilinearForms.addMassIntegrator
Add a mass integrator (u, v) to the bilinear form.
mfem.bilinearForms.addMassIntegrator(blf, coeff?)
mfem.bilinearForms.addVectorDiffusionIntegrator
Add a vector diffusion integrator to the bilinear form.
mfem.bilinearForms.addVectorDiffusionIntegrator(blf, coeff?)
mfem.bilinearForms.addVectorMassIntegrator
Add a vector mass integrator (u · v) to the bilinear form.
mfem.bilinearForms.addVectorMassIntegrator(blf, coeff?)
mfem.bilinearForms.assemble
Assemble bilinear form into sparse matrix.
mfem.bilinearForms.assemble(blf, skipZeros?)
mfem.bilinearForms.assemblePartial
Partial assembly for matrix-free operations.
mfem.bilinearForms.assemblePartial(blf)
mfem.bilinearForms.create
Create a bilinear form on a finite element space.
mfem.bilinearForms.create(fespace)
mfem.bilinearForms.eliminateEssentialBC
Eliminate essential BCs from system.
mfem.bilinearForms.eliminateEssentialBC(blf, essentialDofs, sol, rhs)
mfem.bilinearForms.formSystemMatrix
Form system matrix with essential BC elimination.
mfem.bilinearForms.formSystemMatrix(blf, essentialDofs)
mfem.bilinearForms.getMatrix
Get assembled sparse matrix from a bilinear form.
mfem.bilinearForms.getMatrix(blf)
mfem.bilinearForms.createMixed
Create a mixed bilinear form on trial and test spaces.
mfem.bilinearForms.createMixed(trialFES, testFES)
mfem.bilinearForms.BilinearForm.create
Creates a new bilinear form on the specified finite element space.
mfem.bilinearForms.BilinearForm.create(fespace)
mfem.bilinearForms.MixedBilinearForm.create
Creates a new mixed bilinear form.
mfem.bilinearForms.MixedBilinearForm.create(trialFespace, testFespace)
mfem.block.BlockMatrix.createSquare
Create a square BlockMatrix with the same offsets for rows and columns.
mfem.block.BlockMatrix.createSquare(offsets)
mfem.block.BlockMatrix.create
Create a rectangular BlockMatrix with different row and column offsets.
mfem.block.BlockMatrix.create(rowOffsets, colOffsets)
mfem.block.BlockMatrix.fromPointer
Creates a BlockMatrix from an existing WASM pointer.
mfem.block.BlockMatrix.fromPointer(ptr)
mfem.block.BlockOperator.createSquare
Create a square BlockOperator with the same offsets for rows and columns.
mfem.block.BlockOperator.createSquare(offsets)
mfem.block.BlockOperator.create
Create a rectangular BlockOperator with different row and column offsets.
mfem.block.BlockOperator.create(rowOffsets, colOffsets)
mfem.block.BlockOperator.fromPointer
Creates a BlockOperator from an existing WASM pointer.
mfem.block.BlockOperator.fromPointer(ptr)
mfem.block.BlockVector.create
Create a new BlockVector with the specified block offsets.
mfem.block.BlockVector.create(offsets)
mfem.block.BlockVector.fromPointer
Creates a BlockVector from an existing WASM pointer.
mfem.block.BlockVector.fromPointer(ptr, offsets)
mfem.boundaryConditions.addBoundaryRobinIntegrator
Add Robin boundary condition integrator (legacy name)
mfem.boundaryConditions.addBoundaryRobinIntegrator(blf, lf, alpha, g, bdrAttrs)
mfem.boundaryConditions.addRobinBC
Add Robin boundary condition: alpha*u + du/dn = g
mfem.boundaryConditions.addRobinBC(bf, lf, alpha, g, bdrAttrs)
mfem.boundaryConditions.applyEssentialBC
Apply essential boundary conditions to a linear system.
mfem.boundaryConditions.applyEssentialBC(blf, essentialDofs, x, b)
mfem.boundaryConditions.createBdrMarkerArray
Create a boundary marker array from a mesh and list of boundary attributes.
mfem.boundaryConditions.createBdrMarkerArray(mesh, bdrAttrs)
mfem.boundaryConditions.eliminateEssentialBC
Eliminate essential boundary conditions from a bilinear form.
mfem.boundaryConditions.eliminateEssentialBC(blf, essentialDofs, diagPolicy?)
mfem.boundaryConditions.getEssentialTrueDofs
Get essential true DOF indices for given boundary attributes.
mfem.boundaryConditions.getEssentialTrueDofs(fespace, bdrAttrs)
mfem.boundaryConditions.getPeriodicDofMapping
Get periodic DOF correspondence for a finite element space.
mfem.boundaryConditions.getPeriodicDofMapping(fespace, options)
mfem.boundaryConditions.createPeriodicMesh
Create a periodic mesh from translation vectors.
mfem.boundaryConditions.createPeriodicMesh(mesh, translations, tol?)
mfem.boundaryConditions.makePeriodic
Create periodic finite element space (legacy name).
mfem.boundaryConditions.makePeriodic(_fespace, _mesh)
mfem.boundaryConditions.createPeriodicVertexMapping
Create periodic vertex mapping from translation vectors.
mfem.boundaryConditions.createPeriodicVertexMapping(mesh, translations, tol?)
mfem.boundaryConditions.makePeriodicVertices
Set periodic vertex mapping on mesh (legacy name).
mfem.boundaryConditions.makePeriodicVertices(_mesh, _v2v)
mfem.coefficients.constant
Create a constant scalar coefficient.
mfem.coefficients.constant(value)
mfem.coefficients.crossProduct
Create a cross product coefficient from two vector coefficients.
mfem.coefficients.crossProduct(v1, v2)
mfem.coefficients.curl
Create a curl vector coefficient from a vector GridFunction.
mfem.coefficients.curl(gf)
mfem.coefficients.delta
Create a Dirac delta coefficient (point source).
mfem.coefficients.delta(center, weight?)
mfem.coefficients.diagonal
Create a diagonal matrix coefficient from an array of values.
mfem.coefficients.diagonal(values)
mfem.coefficients.divergence
Create a divergence scalar coefficient from a vector GridFunction.
mfem.coefficients.divergence(gf)
mfem.coefficients.functionCoefficient
Create a coefficient from a JavaScript function.
mfem.coefficients.functionCoefficient(fn)
mfem.coefficients.gradient
Create a gradient vector coefficient from a scalar GridFunction.
mfem.coefficients.gradient(gf)
mfem.coefficients.gridFunctionCoefficient
Create a coefficient from a GridFunction.
mfem.coefficients.gridFunctionCoefficient(gf, component?)
mfem.coefficients.identity
Create an identity matrix coefficient.
mfem.coefficients.identity(dim)
mfem.coefficients.innerProduct
Create an inner product coefficient from two vector coefficients.
mfem.coefficients.innerProduct(v1, v2)
mfem.coefficients.inverse
Create an inverse of a matrix coefficient.
mfem.coefficients.inverse(m)
mfem.coefficients.matrixConstant
Create a constant matrix coefficient.
mfem.coefficients.matrixConstant(values)
mfem.coefficients.matrixFunction
Create a matrix coefficient from a JavaScript function.
mfem.coefficients.matrixFunction(fn, height, width?)
mfem.coefficients.matrixProduct
Create a matrix product coefficient from two matrix coefficients.
mfem.coefficients.matrixProduct(a, b)
mfem.coefficients.normalizedVector
Create a normalized vector coefficient from a vector coefficient.
mfem.coefficients.normalizedVector(v)
mfem.coefficients.outerProduct
Create an outer product coefficient from two vector coefficients.
mfem.coefficients.outerProduct(a, b)
mfem.coefficients.piecewiseConstant
Create a piecewise constant coefficient by element attribute.
mfem.coefficients.piecewiseConstant(values)
mfem.coefficients.position
Create a position vector coefficient that returns the spatial position x.
mfem.coefficients.position(dim?)
mfem.coefficients.power
Create a power of a coefficient.
mfem.coefficients.power(c, exponent)
mfem.coefficients.product
Create a product of two coefficients.
mfem.coefficients.product(c1, c2)
mfem.coefficients.quadratureFunctionCoefficient
Create a coefficient from a scalar quadrature function.
mfem.coefficients.quadratureFunctionCoefficient(qf)
mfem.coefficients.vectorQuadratureFunctionCoefficient
Create a vector coefficient from a quadrature function.
mfem.coefficients.vectorQuadratureFunctionCoefficient(qf)
mfem.coefficients.restricted
Create a restricted coefficient from a base coefficient.
mfem.coefficients.restricted(baseCoeff, attributes)
mfem.coefficients.scalarVectorProduct
Create a scalar-vector product coefficient.
mfem.coefficients.scalarVectorProduct(s, v)
mfem.coefficients.sum
Create a sum of two coefficients.
mfem.coefficients.sum(c1, c2, alpha?, beta?)
mfem.coefficients.symmetric
Create a symmetric matrix coefficient from a JavaScript function.
mfem.coefficients.symmetric(fn, dim)
mfem.coefficients.transformed
Create a transformed coefficient that applies a function to another coefficient.
mfem.coefficients.transformed(coeff, fn)
mfem.coefficients.transpose
Create a transpose of a matrix coefficient.
mfem.coefficients.transpose(m)
mfem.coefficients.vectorArray
Create a vector coefficient from an array of scalar coefficients.
mfem.coefficients.vectorArray(coeffs)
mfem.coefficients.vectorConstant
Create a constant vector coefficient.
mfem.coefficients.vectorConstant(values)
mfem.coefficients.vectorDelta
Create a vector Dirac delta coefficient (directional point source).
mfem.coefficients.vectorDelta(center, direction)
mfem.coefficients.vectorFunction
Create a vector coefficient from a JavaScript function.
mfem.coefficients.vectorFunction(fn, dim?)
mfem.coefficients.vectorRotProduct
Create a 2D cross product (rotation product) of two vector coefficients.
mfem.coefficients.vectorRotProduct(a, b)
mfem.coefficients.ConstantCoefficient.create
Creates a new constant coefficient with the specified value.
mfem.coefficients.ConstantCoefficient.create(value)
mfem.coefficients.CurlCoefficient.create
Creates a new curl coefficient from a vector GridFunction.
mfem.coefficients.CurlCoefficient.create(gf)
mfem.coefficients.DeltaCoefficient.create
Creates a new delta coefficient (point source).
mfem.coefficients.DeltaCoefficient.create(center, weight?)
mfem.coefficients.DiagonalMatrixCoefficient.create
Creates a new diagonal matrix coefficient.
mfem.coefficients.DiagonalMatrixCoefficient.create(values)
mfem.coefficients.DivergenceCoefficient.create
Creates a new divergence coefficient from a vector GridFunction.
mfem.coefficients.DivergenceCoefficient.create(gf)
mfem.coefficients.FunctionCoefficient.create
Creates a new function coefficient with the specified evaluation function.
mfem.coefficients.FunctionCoefficient.create(fn)
mfem.coefficients.GradientCoefficient.create
Creates a new gradient coefficient from a scalar GridFunction.
mfem.coefficients.GradientCoefficient.create(gf)
mfem.coefficients.GridFunctionCoefficient.create
Creates a new GridFunction coefficient.
mfem.coefficients.GridFunctionCoefficient.create(gf, component?)
mfem.coefficients.MatrixConstantCoefficient.create
Creates a new constant matrix coefficient with the specified values.
mfem.coefficients.MatrixConstantCoefficient.create(values, height?, width?)
mfem.coefficients.MatrixFunctionCoefficient.create
Creates a new matrix function coefficient.
mfem.coefficients.MatrixFunctionCoefficient.create(fn, height, width?)
mfem.coefficients.MatrixProductCoefficient.create
Creates a new matrix product coefficient: A * B
mfem.coefficients.MatrixProductCoefficient.create(a, b)
mfem.coefficients.NormalizedVectorCoefficient.create
Creates a new normalized vector coefficient: v / ||v||
mfem.coefficients.NormalizedVectorCoefficient.create(v)
mfem.coefficients.PWConstCoefficient.create
Creates a new piecewise constant coefficient.
mfem.coefficients.PWConstCoefficient.create(values)
mfem.coefficients.PWConstCoefficient.createFromMap
Creates a new piecewise constant coefficient from a Map.
mfem.coefficients.PWConstCoefficient.createFromMap(attrValues)
mfem.coefficients.PositionVectorCoefficient.create
Creates a new position vector coefficient.
mfem.coefficients.PositionVectorCoefficient.create(dim?)
mfem.coefficients.PowerCoefficient.create
Creates a new power coefficient: c^p
mfem.coefficients.PowerCoefficient.create(c, exponent)
mfem.coefficients.ProductCoefficient.create
Creates a new product coefficient: c1 * c2
mfem.coefficients.ProductCoefficient.create(c1, c2)
mfem.coefficients.QuadratureFunctionCoefficient.create
Creates a new coefficient from a scalar quadrature function.
mfem.coefficients.QuadratureFunctionCoefficient.create(qf)
mfem.coefficients.VectorQuadratureFunctionCoefficient.create
Creates a new vector coefficient from a quadrature function.
mfem.coefficients.VectorQuadratureFunctionCoefficient.create(qf)
mfem.coefficients.RestrictedCoefficient.create
Creates a new restricted coefficient.
mfem.coefficients.RestrictedCoefficient.create(baseCoeff, attributes)
mfem.coefficients.ScalarVectorProductCoefficient.create
Creates a new scalar-vector product coefficient: s * v
mfem.coefficients.ScalarVectorProductCoefficient.create(s, v)
mfem.coefficients.SumCoefficient.create
Creates a new sum coefficient: alpha * c1 + beta * c2
mfem.coefficients.SumCoefficient.create(c1, c2, alpha?, beta?)
mfem.coefficients.SymmetricMatrixCoefficient.create
Creates a new symmetric matrix function coefficient.
mfem.coefficients.SymmetricMatrixCoefficient.create(fn, dim)
mfem.coefficients.TransformedCoefficient.create
Creates a new transformed coefficient: F(Q)
mfem.coefficients.TransformedCoefficient.create(coeff, fn)
mfem.coefficients.VectorArrayCoefficient.create
Creates a new vector array coefficient of the specified dimension.
mfem.coefficients.VectorArrayCoefficient.create(dim)
mfem.coefficients.VectorConstantCoefficient.create
Creates a new constant vector coefficient with the specified values.
mfem.coefficients.VectorConstantCoefficient.create(values)
mfem.coefficients.VectorDeltaCoefficient.create
Creates a new vector delta coefficient (directional point source).
mfem.coefficients.VectorDeltaCoefficient.create(center, direction)
mfem.coefficients.VectorFunctionCoefficient.create
Creates a new vector function coefficient.
mfem.coefficients.VectorFunctionCoefficient.create(fn, dim)
mfem.coefficients.VectorRotProductCoefficient.create
Creates a new VectorRotProductCoefficient: A_x * B_y - A_y * B_x
mfem.coefficients.VectorRotProductCoefficient.create(a, b)
mfem.eigenvalue.getEigenvalues
Get computed eigenvalues after solve.
mfem.eigenvalue.getEigenvalues(solver, numEigs?)
mfem.eigenvalue.getEigenvectors
getEigenvectors
mfem.eigenvalue.getEigenvectors(eigenvectorMatrix)
mfem.eigenvalue.setNumModes
Set the number of eigenvalues/eigenvectors to compute.
mfem.eigenvalue.setNumModes(solver, numModes)
mfem.eigenvalue.setOperators
Set A and B operators for generalized eigenvalue problem Ax = λBx.
mfem.eigenvalue.setOperators(solver, A, B?)
mfem.eigenvalue.solve
Solve the eigenvalue problem using LOBPCG.
mfem.eigenvalue.solve(solver, eigenvectors)
mfem.eigenvalue.DenseMatrix.create
Creates a new dense matrix of specified dimensions.
mfem.eigenvalue.DenseMatrix.create(height, width)
mfem.eigenvalue.DenseMatrix.zeros
Creates a zero matrix of specified dimensions.
mfem.eigenvalue.DenseMatrix.zeros(height, width)
mfem.eigenvalue.DenseMatrix.identity
Creates an identity matrix of size n x n.
mfem.eigenvalue.DenseMatrix.identity(n)
mfem.eigenvalue.DenseMatrix.fromArray
Creates a DenseMatrix from a 2D array.
mfem.eigenvalue.DenseMatrix.fromArray(data)
mfem.eigenvalue.DenseMatrix.fromPointer
Creates a DenseMatrix from an existing WASM pointer.
mfem.eigenvalue.DenseMatrix.fromPointer(ptr, ownsMemory?)
mfem.eigenvalue.LOBPCGSolver.create
Creates a new LOBPCG solver.
mfem.eigenvalue.LOBPCGSolver.create()
mfem.fespace.createDG
Creates a Discontinuous Galerkin (DG) finite element space.
mfem.fespace.createDG(mesh, order, vdim?)
mfem.fespace.createH1
Creates an H1 (continuous Lagrange) finite element space.
mfem.fespace.createH1(mesh, order, vdim?)
mfem.fespace.createH1Positive
Creates an H1 finite element space with positive (Bernstein) basis.
mfem.fespace.createH1Positive(mesh, order, vdim?)
mfem.fespace.createHcurl
Creates an H(curl) (Nedelec) finite element space.
mfem.fespace.createHcurl(mesh, order)
mfem.fespace.createHdiv
Creates an H(div) (Raviart-Thomas) finite element space.
mfem.fespace.createHdiv(mesh, order)
mfem.fespace.createL2
Creates an L2 (discontinuous) finite element space.
mfem.fespace.createL2(mesh, order, vdim?)
mfem.fespace.createND
Creates a Nedelec (ND) finite element space.
mfem.fespace.createND(mesh, order)
mfem.fespace.createNURBS
Creates a NURBS finite element space.
mfem.fespace.createNURBS(mesh, order?, vdim?)
mfem.fespace.createRT
Creates a Raviart-Thomas (RT) finite element space.
mfem.fespace.createRT(mesh, order)
mfem.fespace.getAllDofCoordinates
Gets the physical coordinates for all degrees of freedom in a finite element space.
mfem.fespace.getAllDofCoordinates(fespace)
mfem.fespace.getBoundaryDofs
Gets the DOF indices on a boundary with a specific attribute.
mfem.fespace.getBoundaryDofs(fespace, bdrAttr)
mfem.fespace.getDofMap
Gets the DOF indices for a specific element.
mfem.fespace.getDofMap(fespace, elemIndex)
mfem.fespace.getEssentialDofs
Gets the essential (Dirichlet) DOF indices for specified boundary attributes.
mfem.fespace.getEssentialDofs(fespace, bdrAttrs)
mfem.fespace.order
Gets the maximum polynomial order of the finite element space.
mfem.fespace.order(fespace)
mfem.fespace.FiniteElementSpace.createH1
Creates an H1 (continuous Lagrange) finite element space.
mfem.fespace.FiniteElementSpace.createH1(mesh, order, vdim?)
mfem.gridfunction.computeError
Computes the L2 error between a grid function and a constant exact solution.
mfem.gridfunction.computeError(gf, exactValue)
mfem.gridfunction.computeH1Error
Computes the H1 error between a grid function and an exact solution.
mfem.gridfunction.computeH1Error(gf, coeffPtr?, dcoeffPtr?)
mfem.gridfunction.computeL2ErrorCoeff
Computes the L2 error between a grid function and an exact solution
mfem.gridfunction.computeL2ErrorCoeff(gf, coeffPtr)
mfem.gridfunction.computeL2ErrorVCoeff
Computes the L2 error between a vector grid function and an exact solution
mfem.gridfunction.computeL2ErrorVCoeff(gf, vcoeffPtr)
mfem.gridfunction.computeMaxError
Computes the maximum (L-infinity) error between a grid function and
mfem.gridfunction.computeMaxError(gf, coeffPtr)
mfem.gridfunction.computeW11Error
Computes the W^{1,1} error between a grid function and an exact solution.
mfem.gridfunction.computeW11Error(gf, coeffPtr?, dcoeffPtr?, normType?)
mfem.gridfunction.fromBinary
Loads a grid function from a base64-encoded binary string with an existing FE space.
mfem.gridfunction.fromBinary(fespace, data)
mfem.gridfunction.fromBinaryWithMesh
Loads a grid function from a base64-encoded binary string with auto-detected FE space.
mfem.gridfunction.fromBinaryWithMesh(mesh, data)
mfem.gridfunction.fromCoefficient
Creates a new grid function initialized with a constant value.
mfem.gridfunction.fromCoefficient(fespace, value)
mfem.gridfunction.fromFunction
Creates a new grid function initialized by evaluating a function at DOF locations.
mfem.gridfunction.fromFunction(fespace, fn)
mfem.gridfunction.fromMFEM
Loads a grid function from an MFEM format string into an existing GridFunction.
mfem.gridfunction.fromMFEM(fespace, data)
mfem.gridfunction.fromMFEMWithMesh
Creates a grid function from an MFEM format string with auto-detected FE space.
mfem.gridfunction.fromMFEMWithMesh(mesh, data)
mfem.gridfunction.getAllNodalValues
Gets the values of a grid function at all vertices of the mesh.
mfem.gridfunction.getAllNodalValues(gf, vdim?)
mfem.gridfunction.getCurl
Computes the curl of a vector grid function at a point within an element.
mfem.gridfunction.getCurl(gf, elemIdx, ip)
mfem.gridfunction.getDerivative
Computes the derivative of a grid function component in a specified direction
mfem.gridfunction.getDerivative(gf, comp, derComp, destGf)
mfem.gridfunction.getDivergence
Computes the divergence of a vector grid function at a point within an element.
mfem.gridfunction.getDivergence(gf, elemIdx, ip)
mfem.gridfunction.getGradient
Computes the gradient of a scalar grid function at a point within an element.
mfem.gridfunction.getGradient(gf, elemIdx, ip)
mfem.gridfunction.getGradients
Computes gradients of a grid function at multiple integration points
mfem.gridfunction.getGradients(gf, elemIdx, points)
mfem.gridfunction.getHessian
Computes the Hessian matrix of a grid function at a point within an element.
mfem.gridfunction.getHessian(gf, elemIdx, ip)
mfem.gridfunction.getLaplacian
Computes the Laplacian of a grid function at a point within an element.
mfem.gridfunction.getLaplacian(gf, elemIdx, ip, vdim?)
mfem.gridfunction.getNodalValues
Gets the values of a grid function at the vertices of a specific element.
mfem.gridfunction.getNodalValues(gf, elemIdx, vdim?)
mfem.gridfunction.getValue
Evaluates a grid function at a point within a specific element.
mfem.gridfunction.getValue(gf, elemIdx, ip)
mfem.gridfunction.getVectorFieldNodalValues
Gets the values of a specific component of a vector-valued grid function
mfem.gridfunction.getVectorFieldNodalValues(gf, component)
mfem.gridfunction.getVectorValue
Evaluates a vector-valued grid function at a point within an element.
mfem.gridfunction.getVectorValue(gf, elemIdx, ip)
mfem.gridfunction.getVectorValues
Evaluates a vector-valued grid function at multiple integration points within an element.
mfem.gridfunction.getVectorValues(gf, elemIdx, points)
mfem.gridfunction.normH1
Computes the H1 norm of a grid function.
mfem.gridfunction.normH1(gf)
mfem.gridfunction.normL2
Computes the L2 norm of a grid function.
mfem.gridfunction.normL2(gf)
mfem.gridfunction.normLinf
Computes the L-infinity (maximum) norm of a grid function.
mfem.gridfunction.normLinf(gf)
mfem.gridfunction.projectBdrCoefficient
Projects a constant value onto boundary DOFs for specified boundary attributes.
mfem.gridfunction.projectBdrCoefficient(gf, value, bdrAttrs)
mfem.gridfunction.projectBdrVectorCoefficient
Projects a vector coefficient onto boundary DOFs of a grid function.
mfem.gridfunction.projectBdrVectorCoefficient(gf, vcoeffPtr, bdrAttrs)
mfem.gridfunction.projectCoefficient
Projects a constant coefficient onto a grid function.
mfem.gridfunction.projectCoefficient(gf, value)
mfem.gridfunction.projectDiscCoefficient
Projects a discontinuous coefficient onto a grid function with averaging.
mfem.gridfunction.projectDiscCoefficient(gf, coeffPtr, avgType?)
mfem.gridfunction.projectFunction
Projects a JavaScript function onto a grid function using nodal interpolation.
mfem.gridfunction.projectFunction(gf, fn)
mfem.gridfunction.projectGridFunction
Projects a source grid function onto a destination grid function.
mfem.gridfunction.projectGridFunction(destGf, srcGf)
mfem.gridfunction.save
Exports a grid function to MFEM format string.
mfem.gridfunction.save(gf)
mfem.gridfunction.toBinary
Exports a grid function to a base64-encoded binary string.
mfem.gridfunction.toBinary(gf)
mfem.gridfunction.toVTK
Exports a grid function to VTK format string for visualization.
mfem.gridfunction.toVTK(gf, options?)
mfem.gridfunction.getTrueDofs
Gets the true DOF values from a grid function.
mfem.gridfunction.getTrueDofs(gf)
mfem.gridfunction.getTrueVectorSize
Gets the size of the true DOF vector.
mfem.gridfunction.getTrueVectorSize(gf)
mfem.gridfunction.setFromTrueDofs
Sets grid function values from true DOF values.
mfem.gridfunction.setFromTrueDofs(gf, trueDofs)
mfem.gridfunction.setTrueVector
Extracts true DOFs from the grid function to internal storage.
mfem.gridfunction.setTrueVector(gf)
mfem.gridfunction.GridFunction.create
Creates a new grid function on the specified finite element space.
mfem.gridfunction.GridFunction.create(fespace)
mfem.linalg.createDoubleArray
Create a zero-initialized Float64Array.
mfem.linalg.createDoubleArray(size)
mfem.linalg.createIntArray
Array utility functions for creating typed arrays.
mfem.linalg.createIntArray(size)
mfem.linalg.createMarkerArray
Create a marker array (0/1 values) with specified indices marked as 1.
mfem.linalg.createMarkerArray(size, markedIndices)
mfem.linalg.BlockMatrix.createSquare
Create a square BlockMatrix with the same offsets for rows and columns.
mfem.linalg.BlockMatrix.createSquare(offsets)
mfem.linalg.BlockMatrix.create
Create a rectangular BlockMatrix with different row and column offsets.
mfem.linalg.BlockMatrix.create(rowOffsets, colOffsets)
mfem.linalg.BlockMatrix.fromPointer
Creates a BlockMatrix from an existing WASM pointer.
mfem.linalg.BlockMatrix.fromPointer(ptr)
mfem.linalg.BlockOperator.createSquare
Create a square BlockOperator with the same offsets for rows and columns.
mfem.linalg.BlockOperator.createSquare(offsets)
mfem.linalg.BlockOperator.create
Create a rectangular BlockOperator with different row and column offsets.
mfem.linalg.BlockOperator.create(rowOffsets, colOffsets)
mfem.linalg.BlockOperator.fromPointer
Creates a BlockOperator from an existing WASM pointer.
mfem.linalg.BlockOperator.fromPointer(ptr)
mfem.linalg.BlockVector.create
Create a new BlockVector with the specified block offsets.
mfem.linalg.BlockVector.create(offsets)
mfem.linalg.BlockVector.fromPointer
Creates a BlockVector from an existing WASM pointer.
mfem.linalg.BlockVector.fromPointer(ptr, offsets)
mfem.linalg.DenseMatrix.create
Creates a new dense matrix of specified dimensions.
mfem.linalg.DenseMatrix.create(height, width)
mfem.linalg.DenseMatrix.zeros
Creates a zero matrix of specified dimensions.
mfem.linalg.DenseMatrix.zeros(height, width)
mfem.linalg.DenseMatrix.identity
Creates an identity matrix of size n x n.
mfem.linalg.DenseMatrix.identity(n)
mfem.linalg.DenseMatrix.fromArray
Creates a DenseMatrix from a 2D array.
mfem.linalg.DenseMatrix.fromArray(data)
mfem.linalg.DenseMatrix.fromPointer
Creates a DenseMatrix from an existing WASM pointer.
mfem.linalg.DenseMatrix.fromPointer(ptr, ownsMemory?)
mfem.linalg.SparseMatrix.create
Creates a new empty sparse matrix of the specified dimensions.
mfem.linalg.SparseMatrix.create(height, width)
mfem.linalg.SparseMatrix.fromPointer
Creates a SparseMatrix from an existing WASM pointer.
mfem.linalg.SparseMatrix.fromPointer(ptr, ownsMemory?)
mfem.linalg.Vector.create
Creates a new vector of the specified size.
mfem.linalg.Vector.create(size)
mfem.linalg.Vector.fromPointer
Creates a Vector from an existing WASM pointer.
mfem.linalg.Vector.fromPointer(ptr)
mfem.linear.getFinalNorm
Get the final residual norm from the last solve.
mfem.linear.getFinalNorm(solver)
mfem.linear.getNumIterations
Get the number of iterations from the last solve.
mfem.linear.getNumIterations(solver)
mfem.linear.mult
Solve the linear system Ax = b.
mfem.linear.mult(solver, b, x)
mfem.linear.setMaxIterations
Set maximum number of iterations for an iterative solver.
mfem.linear.setMaxIterations(solver, max)
mfem.linear.setPreconditioner
Set preconditioner for an iterative solver.
mfem.linear.setPreconditioner(solver, prec)
mfem.linear.setPrintLevel
Set verbosity level for an iterative solver.
mfem.linear.setPrintLevel(solver, level)
mfem.linear.setTolerance
Set convergence tolerances for an iterative solver.
mfem.linear.setTolerance(solver, rtol, atol?)
mfem.linear.BiCGSTABSolver.create
Creates a new BiCGSTAB solver.
mfem.linear.BiCGSTABSolver.create()
mfem.linear.BlockILU.create
Creates a new BlockILU preconditioner.
mfem.linear.BlockILU.create(matrixPtr, blockSize?, options?)
mfem.linear.CGSolver.create
Creates a new CG solver.
mfem.linear.CGSolver.create()
mfem.linear.ChebyshevSmoother.create
Creates a new Chebyshev smoother with explicit maximum eigenvalue.
mfem.linear.ChebyshevSmoother.create(options)
mfem.linear.ChebyshevSmoother.createAuto
Creates a new Chebyshev smoother with automatic eigenvalue estimation.
mfem.linear.ChebyshevSmoother.createAuto(options)
mfem.linear.DirectSubBlockSolver.create
Creates a new DirectSubBlockSolver.
mfem.linear.DirectSubBlockSolver.create(APtr, blockDofPtr)
mfem.linear.DSmoother.create
Creates a new DSmoother.
mfem.linear.DSmoother.create(matrixPtr, options?)
mfem.linear.FGMRESSolver.create
Creates a new Flexible GMRES solver.
mfem.linear.FGMRESSolver.create(kdim?)
mfem.linear.GMRESSolver.create
Creates a new GMRES solver.
mfem.linear.GMRESSolver.create(kdim?)
mfem.linear.GSSmoother.create
Creates a new Gauss-Seidel smoother.
mfem.linear.GSSmoother.create(matrixPtr, type?, iterations?)
mfem.linear.JacobiSmoother.create
Creates a new Jacobi smoother.
mfem.linear.JacobiSmoother.create(matrixPtr, essentialDofs?)
mfem.linear.KLUSolver.isAvailable
Checks if KLU (SuiteSparse) is available.
mfem.linear.KLUSolver.isAvailable()
mfem.linear.KLUSolver.create
Creates a new KLU solver.
mfem.linear.KLUSolver.create()
mfem.linear.MINRESSolver.create
Creates a new MINRES solver.
mfem.linear.MINRESSolver.create()
mfem.linear.OrthoSolver.create
Creates a new orthogonalizing solver wrapper.
mfem.linear.OrthoSolver.create()
mfem.linear.ProductSolver.create
Creates a new product solver: S = S1 * S0.
mfem.linear.ProductSolver.create(s0Ptr, s1Ptr, options?)
mfem.linear.ProductSolver.create
Creates a new product solver: S = S1 * S0.
mfem.linear.ProductSolver.create(s0, s1, options?)
mfem.linear.SLISolver.create
Creates a new SLI solver.
mfem.linear.SLISolver.create()
mfem.linear.UMFPackSolver.isAvailable
Checks if UMFPack (SuiteSparse) is available.
mfem.linear.UMFPackSolver.isAvailable()
mfem.linear.UMFPackSolver.create
Creates a new UMFPack solver.
mfem.linear.UMFPackSolver.create()
mfem.linearForms.addBoundaryFluxIntegrator
Add a VectorFE boundary flux integrator for H(div) spaces.
mfem.linearForms.addBoundaryFluxIntegrator(lf, coeff, bdrAttrs?)
mfem.linearForms.addBoundaryIntegrator
Add a boundary integrator (g, v) to the linear form.
mfem.linearForms.addBoundaryIntegrator(lf, coeff, bdrAttrs?)
mfem.linearForms.addBoundaryNormalIntegrator
Add a boundary normal integrator (F · n, v) to the linear form.
mfem.linearForms.addBoundaryNormalIntegrator(lf, coeff, bdrAttrs?)
mfem.linearForms.addBoundaryTangentialIntegrator
Add a boundary tangential integrator (F × n, v) to the linear form.
mfem.linearForms.addBoundaryTangentialIntegrator(lf, coeff, bdrAttrs?)
mfem.linearForms.addDGDirichletIntegrator
Add a DG Dirichlet boundary integrator for discontinuous Galerkin methods.
mfem.linearForms.addDGDirichletIntegrator(lf, coeff, sigma, kappa)
mfem.linearForms.addDomainGradientIntegrator
Add a domain gradient integrator (F, ∇v) to the linear form.
mfem.linearForms.addDomainGradientIntegrator(lf, coeff)
mfem.linearForms.addDomainIntegrator
Add a domain integrator (f, v) to the linear form.
mfem.linearForms.addDomainIntegrator(lf, coeff)
mfem.linearForms.addVectorDomainIntegrator
Add a vector domain integrator (F, v) to the linear form.
mfem.linearForms.addVectorDomainIntegrator(lf, coeff)
mfem.linearForms.assemble
Assemble the linear form into a vector.
mfem.linearForms.assemble(lf)
mfem.linearForms.getVector
Get the assembled vector data from the linear form.
mfem.linearForms.getVector(lf)
mfem.linearForms.create
Create a linear form on a finite element space.
mfem.linearForms.create(fespace)
mfem.linearForms.LinearForm.create
Creates a new linear form on the specified finite element space.
mfem.linearForms.LinearForm.create(fespace)
mfem.matrix.add
add
mfem.matrix.add(dm, alpha, other)
mfem.matrix.cols
cols
mfem.matrix.cols(dm)
mfem.matrix.create
create_2
mfem.matrix.create(rows, cols)
mfem.matrix.determinant
determinant
mfem.matrix.determinant(dm)
mfem.matrix.eigenvalues
eigenvalues
mfem.matrix.eigenvalues(dm)
mfem.matrix.fromArray
fromArray
mfem.matrix.fromArray(data)
mfem.matrix.get
get_2
mfem.matrix.get(dm, i, j)
mfem.matrix.getData
getData
mfem.matrix.getData(dm)
mfem.matrix.identity
identity_2
mfem.matrix.identity(n)
mfem.matrix.invert
invert
mfem.matrix.invert(dm)
mfem.matrix.mult
mult
mfem.matrix.mult(dm, x, y)
mfem.matrix.multTranspose
multTranspose
mfem.matrix.multTranspose(dm, x, y)
mfem.matrix.rows
rows
mfem.matrix.rows(dm)
mfem.matrix.set
set_2
mfem.matrix.set(dm, i, j, value)
mfem.matrix.solve
solve
mfem.matrix.solve(dm, b)
mfem.matrix.svd
svd
mfem.matrix.svd(dm)
mfem.matrix.trace
trace
mfem.matrix.trace(dm)
mfem.matrix.transpose
transpose_2
mfem.matrix.transpose(dm)
mfem.matrix.zeros
zeros
mfem.matrix.zeros(rows, cols)
mfem.matrix.DenseMatrix.create
Creates a new dense matrix of specified dimensions.
mfem.matrix.DenseMatrix.create(height, width)
mfem.matrix.DenseMatrix.zeros
Creates a zero matrix of specified dimensions.
mfem.matrix.DenseMatrix.zeros(height, width)
mfem.matrix.DenseMatrix.identity
Creates an identity matrix of size n x n.
mfem.matrix.DenseMatrix.identity(n)
mfem.matrix.DenseMatrix.fromArray
Creates a DenseMatrix from a 2D array.
mfem.matrix.DenseMatrix.fromArray(data)
mfem.matrix.DenseMatrix.fromPointer
Creates a DenseMatrix from an existing WASM pointer.
mfem.matrix.DenseMatrix.fromPointer(ptr, ownsMemory?)
mfem.mesh.derefine
Derefines (coarsens) specified elements in a non-conforming mesh.
mfem.mesh.derefine(mesh, derefinements)
mfem.mesh.enableNCMesh
Enables non-conforming mesh (NCMesh) support.
mfem.mesh.enableNCMesh(mesh)
mfem.mesh.getDerefTableSize
Gets the size of the derefinement table.
mfem.mesh.getDerefTableSize(mesh)
mfem.mesh.isNCMesh
Checks if a mesh has NCMesh (non-conforming mesh) support.
mfem.mesh.isNCMesh(mesh)
mfem.mesh.elevateNURBSDegree
Elevates the polynomial degree of a NURBS mesh.
mfem.mesh.elevateNURBSDegree(mesh, relDegree)
mfem.mesh.setNURBSOrder
Sets the NURBS order uniformly.
mfem.mesh.setNURBSOrder(mesh, order)
mfem.mesh.fromBinary
Loads a mesh from a base64-encoded binary string.
mfem.mesh.fromBinary(data)
mfem.mesh.fromGmsh
Loads a mesh from a Gmsh format string.
mfem.mesh.fromGmsh(data)
mfem.mesh.fromMFEM
Loads a mesh from an MFEM native format string.
mfem.mesh.fromMFEM(data)
mfem.mesh.fromNetgen
Loads a mesh from a Netgen format string.
mfem.mesh.fromNetgen(data)
mfem.mesh.fromTrueGrid
Loads a mesh from a TrueGrid format string.
mfem.mesh.fromTrueGrid(data)
mfem.mesh.fromVTK
Loads a mesh from a VTK format string.
mfem.mesh.fromVTK(data)
mfem.mesh.getElementCentroids
Computes the centroid (geometric center) of each element in the mesh.
mfem.mesh.getElementCentroids(mesh)
mfem.mesh.getElementVolumes
Computes the volume (or area/length) of each element in the mesh.
mfem.mesh.getElementVolumes(mesh)
mfem.mesh.getNURBSKnotVector
Gets the knot vector for a NURBS patch in a specific direction.
mfem.mesh.getNURBSKnotVector(mesh, patchIdx, dir)
mfem.mesh.getNURBSPatch
Gets full NURBS patch data including knot vectors.
mfem.mesh.getNURBSPatch(mesh, patchIdx)
mfem.mesh.getNURBSPatchInfo
Gets information about a NURBS patch.
mfem.mesh.getNURBSPatchInfo(mesh, patchIdx)
mfem.mesh.getNumNURBSPatches
Gets the number of NURBS patches in the mesh.
mfem.mesh.getNumNURBSPatches(mesh)
mfem.mesh.insertNURBSKnot
Inserts a single knot into a NURBS mesh.
mfem.mesh.insertNURBSKnot(mesh, direction, knot)
mfem.mesh.insertNURBSKnots
Inserts multiple knots into a NURBS mesh in a specific direction.
mfem.mesh.insertNURBSKnots(mesh, direction, knots)
mfem.mesh.uniformNURBSRefinement
Performs uniform refinement on a NURBS mesh.
mfem.mesh.uniformNURBSRefinement(mesh, refFactor?)
mfem.mesh.makeCartesian1D
Creates a 1D Cartesian (line segment) mesh.
mfem.mesh.makeCartesian1D(n, sx?)
mfem.mesh.makeCartesian2D
Creates a 2D Cartesian (rectangular) mesh.
mfem.mesh.makeCartesian2D(nx, ny, type?, sx?, sy?)
mfem.mesh.makeCartesian3D
Creates a 3D Cartesian (box) mesh.
mfem.mesh.makeCartesian3D(nx, ny, nz, type?, sx?, sy?, sz?)
mfem.mesh.makeCircle
Creates a 2D circular disk mesh.
mfem.mesh.makeCircle(npts, radius?)
mfem.mesh.makeCylinder
Creates a 3D solid cylinder mesh.
mfem.mesh.makeCylinder(npts, length?, radius?)
mfem.mesh.makeDisk
Creates a 2D disk mesh using elliptic mapping.
mfem.mesh.makeDisk(npts, radius?)
mfem.mesh.makeSphere
Creates a 3D solid sphere (ball) mesh.
mfem.mesh.makeSphere(npts, radius?)
mfem.mesh.refineLocal
Locally refines specified elements in the mesh.
mfem.mesh.refineLocal(mesh, elements)
mfem.mesh.refineNonconforming
Performs non-conforming refinement of specified elements.
mfem.mesh.refineNonconforming(mesh, elements)
mfem.mesh.refineUniform
Uniformly refines a mesh one or more times.
mfem.mesh.refineUniform(mesh, times?)
mfem.mesh.rotate
Rotates a mesh around an axis.
mfem.mesh.rotate(mesh, angle, axis?)
mfem.mesh.scale
Scales a mesh uniformly or along each axis.
mfem.mesh.scale(mesh, factor)
mfem.mesh.setCurvature
Sets the curvature order for high-order geometry representation.
mfem.mesh.setCurvature(mesh, order)
mfem.mesh.getBoundaryNormals
Computes unit normal vectors for all boundary elements (or a subset).
mfem.mesh.getBoundaryNormals(mesh, bdrAttribute?)
mfem.mesh.getBoundaryNormalsFlat
Computes unit normal vectors for all boundary elements as a flat array.
mfem.mesh.getBoundaryNormalsFlat(mesh)
mfem.mesh.getSurfaceNormal
Computes the unit outward normal vector at a point on a boundary element.
mfem.mesh.getSurfaceNormal(mesh, bdrIndex, refPoint?)
mfem.mesh.getSurfaceTangents
Gets the tangent vectors at a point on a boundary element.
mfem.mesh.getSurfaceTangents(mesh, bdrIndex, refPoint?, normalize?)
mfem.mesh.toBinary
Exports a mesh to a base64-encoded binary string.
mfem.mesh.toBinary(mesh)
mfem.mesh.toGmsh
Exports a mesh to Gmsh MSH 2.2 format string.
mfem.mesh.toGmsh(mesh)
mfem.mesh.toMFEM
Exports a mesh to MFEM native format string.
mfem.mesh.toMFEM(mesh)
mfem.mesh.toNetgen
Exports a mesh to Netgen/TrueGrid format string.
mfem.mesh.toNetgen(mesh)
mfem.mesh.toParaView
Exports a mesh to ParaView VTU (VTK XML Unstructured Grid) format string.
mfem.mesh.toParaView(mesh, options?)
mfem.mesh.toVTK
Exports a mesh to VTK legacy format string.
mfem.mesh.toVTK(mesh)
mfem.mesh.transform
Transforms all mesh vertex coordinates using a custom function.
mfem.mesh.transform(mesh, fn)
mfem.mesh.translate
Translates a mesh by an offset vector.
mfem.mesh.translate(mesh, offset)
mfem.mesh.IsoparametricTransformation.create
Creates a new IsoparametricTransformation.
mfem.mesh.IsoparametricTransformation.create()
mfem.mesh.Mesh.create
Creates an empty mesh.
mfem.mesh.Mesh.create()
mfem.mesh.Mesh.fromString
Loads a mesh from a string containing mesh data in MFEM format.
mfem.mesh.Mesh.fromString(meshData)
mfem.nonlinear.mult
Solve nonlinear system F(x) = b.
mfem.nonlinear.mult(solver, b, x)
mfem.nonlinear.setHistorySize
Set history size for L-BFGS solver.
mfem.nonlinear.setHistorySize(solver, m)
mfem.nonlinear.setLinearSolver
Set linear solver for Newton iterations.
mfem.nonlinear.setLinearSolver(solver, linearSolver)
mfem.nonlinear.setMaxIterations
Set maximum iterations for nonlinear solver.
mfem.nonlinear.setMaxIterations(solver, max)
mfem.nonlinear.setOperator
Set nonlinear operator for the solver.
mfem.nonlinear.setOperator(solver, oper)
mfem.nonlinear.setTolerance
Set convergence tolerances for nonlinear solver.
mfem.nonlinear.setTolerance(solver, rtol, atol?)
mfem.nonlinear.HyperelasticIntegrator.create
Creates a new hyperelastic integrator.
mfem.nonlinear.HyperelasticIntegrator.create(modelPtr)
mfem.nonlinear.LBFGSSolver.create
Creates a new L-BFGS solver.
mfem.nonlinear.LBFGSSolver.create(historySize?)
mfem.nonlinear.NeoHookeanModel.create
Creates a new NeoHookean material model.
mfem.nonlinear.NeoHookeanModel.create(mu, K)
mfem.nonlinear.NewtonSolver.create
Creates a new Newton solver.
mfem.nonlinear.NewtonSolver.create()
mfem.nonlinear.NonlinearForm.create
Creates a new NonlinearForm on the given finite element space.
mfem.nonlinear.NonlinearForm.create(fespacePtr)
mfem.nonlinear.VectorConvectionIntegrator.create
Creates a new vector convection integrator.
mfem.nonlinear.VectorConvectionIntegrator.create(coeff?)
mfem.ode.AB1Solver.create
Creates a new AB1 solver.
mfem.ode.AB1Solver.create()
mfem.ode.AB2Solver.create
Creates a new AB2 solver.
mfem.ode.AB2Solver.create()
mfem.ode.AB3Solver.create
Creates a new AB3 solver.
mfem.ode.AB3Solver.create()
mfem.ode.AB4Solver.create
Creates a new AB4 solver.
mfem.ode.AB4Solver.create()
mfem.ode.AB5Solver.create
Creates a new AB5 solver.
mfem.ode.AB5Solver.create()
mfem.ode.AM1Solver.create
Creates a new AM1 solver.
mfem.ode.AM1Solver.create()
mfem.ode.AM2Solver.create
Creates a new AM2 solver.
mfem.ode.AM2Solver.create()
mfem.ode.AM3Solver.create
Creates a new AM3 solver.
mfem.ode.AM3Solver.create()
mfem.ode.AM4Solver.create
Creates a new AM4 solver.
mfem.ode.AM4Solver.create()
mfem.ode.BackwardEulerSolver.create
Creates a new Backward Euler solver.
mfem.ode.BackwardEulerSolver.create()
mfem.ode.ESDIRK32Solver.create
Creates a new ESDIRK32 solver.
mfem.ode.ESDIRK32Solver.create()
mfem.ode.ESDIRK33Solver.create
Creates a new ESDIRK33 solver.
mfem.ode.ESDIRK33Solver.create()
mfem.ode.ForwardEulerSolver.create
Creates a new Forward Euler solver.
mfem.ode.ForwardEulerSolver.create()
mfem.ode.GeneralizedAlphaSolver.create
Creates a new Generalized-α solver.
mfem.ode.GeneralizedAlphaSolver.create(rhoInf?)
mfem.ode.IMEXEulerSolver.create
Creates a new IMEX Euler solver.
mfem.ode.IMEXEulerSolver.create()
mfem.ode.IMEXRK2Solver.create
Creates a new IMEX RK2 solver.
mfem.ode.IMEXRK2Solver.create()
mfem.ode.ImplicitMidpointSolver.create
Creates a new Implicit Midpoint solver.
mfem.ode.ImplicitMidpointSolver.create()
mfem.ode.RK2Solver.create
Creates a new RK2 solver.
mfem.ode.RK2Solver.create(alpha?)
mfem.ode.RK3SSPSolver.create
Creates a new RK3 SSP solver.
mfem.ode.RK3SSPSolver.create()
mfem.ode.RK4Solver.create
Creates a new RK4 solver.
mfem.ode.RK4Solver.create()
mfem.ode.RK6Solver.create
Creates a new RK6 solver.
mfem.ode.RK6Solver.create()
mfem.ode.RK8Solver.create
Creates a new RK8 solver.
mfem.ode.RK8Solver.create()
mfem.ode.SDIRK23Solver.create
Creates a new SDIRK23 solver.
mfem.ode.SDIRK23Solver.create()
mfem.ode.SDIRK33Solver.create
Creates a new SDIRK33 solver.
mfem.ode.SDIRK33Solver.create()
mfem.ode.SDIRK34Solver.create
Creates a new SDIRK34 solver.
mfem.ode.SDIRK34Solver.create()
mfem.ode.TrapezoidalRuleSolver.create
Creates a new Trapezoidal Rule solver.
mfem.ode.TrapezoidalRuleSolver.create()
mfem.ode.AverageAccelerationSolver.create
Creates a new Average Acceleration solver.
mfem.ode.AverageAccelerationSolver.create()
mfem.ode.CentralDifferenceSolver.create
Creates a new Central Difference solver.
mfem.ode.CentralDifferenceSolver.create()
mfem.ode.FoxGoodwinSolver.create
Creates a new Fox-Goodwin solver.
mfem.ode.FoxGoodwinSolver.create()
mfem.ode.GeneralizedAlpha2Solver.create
Creates a new Generalized-Alpha 2 solver.
mfem.ode.GeneralizedAlpha2Solver.create(rhoInf?)
mfem.ode.HHTAlphaSolver.create
Creates a new HHT-alpha solver.
mfem.ode.HHTAlphaSolver.create(alpha?)
mfem.ode.LinearAccelerationSolver.create
Creates a new Linear Acceleration solver.
mfem.ode.LinearAccelerationSolver.create()
mfem.ode.NewmarkSolver.create
Creates a new Newmark solver.
mfem.ode.NewmarkSolver.create(beta?, gamma?)
mfem.ode.WBZAlphaSolver.create
Creates a new WBZ-alpha solver.
mfem.ode.WBZAlphaSolver.create(rhoInf?)
mfem.sparse.add
add_2
mfem.sparse.add(sm, i, j, value)
mfem.sparse.create
create_3
mfem.sparse.create(rows, cols)
mfem.sparse.fromCOO
fromCOO
mfem.sparse.fromCOO(rows, cols, data)
mfem.sparse.fromPointer
Creates a SparseMatrix wrapper from an existing WASM pointer.
mfem.sparse.fromPointer(ptr, ownsMemory?)
mfem.sparse.getColIndices
getColIndices
mfem.sparse.getColIndices(sm)
mfem.sparse.getData
getData_2
mfem.sparse.getData(sm)
mfem.sparse.getRowOffsets
getRowOffsets
mfem.sparse.getRowOffsets(sm)
mfem.sparse.mult
mult_2
mfem.sparse.mult(sm, x, y)
mfem.sparse.numNonZeros
numNonZeros
mfem.sparse.numNonZeros(sm)
mfem.sparse.toDense
toDense
mfem.sparse.toDense(sm)
mfem.sparse.transpose
transpose_3
mfem.sparse.transpose(sm)
mfem.sparse.SparseMatrix.create
Creates a new empty sparse matrix of the specified dimensions.
mfem.sparse.SparseMatrix.create(height, width)
mfem.sparse.SparseMatrix.fromPointer
Creates a SparseMatrix from an existing WASM pointer.
mfem.sparse.SparseMatrix.fromPointer(ptr, ownsMemory?)
mfem.vector.add
add_3
mfem.vector.add(v, alpha, other)
mfem.vector.copy
copy
mfem.vector.copy(vec)
mfem.vector.create
create_4
mfem.vector.create(size)
mfem.vector.dot
dot
mfem.vector.dot(v1, v2)
mfem.vector.fromArray
fromArray_2
mfem.vector.fromArray(data)
mfem.vector.fromPointer
Creates a Vector wrapper from an existing WASM pointer.
mfem.vector.fromPointer(ptr)
mfem.vector.get
get_3
mfem.vector.get(vec, i)
mfem.vector.getData
getData_3
mfem.vector.getData(vec)
mfem.vector.neg
neg
mfem.vector.neg(vec)
mfem.vector.norm
norm
mfem.vector.norm(vec)
mfem.vector.normInf
normInf
mfem.vector.normInf(vec)
mfem.vector.ones
ones
mfem.vector.ones(size)
mfem.vector.rand
rand
mfem.vector.rand(size)
mfem.vector.scale
scale
mfem.vector.scale(vec, alpha)
mfem.vector.set
set_3
mfem.vector.set(vec, i, value)
mfem.vector.setAll
setAll
mfem.vector.setAll(vec, value)
mfem.vector.setData
setData
mfem.vector.setData(vec, data)
mfem.vector.size
size
mfem.vector.size(vec)
mfem.vector.zeros
zeros_2
mfem.vector.zeros(size)
mfem.vector.Vector.create
Creates a new vector of the specified size.
mfem.vector.Vector.create(size)
mfem.vector.Vector.fromPointer
Creates a Vector from an existing WASM pointer.
mfem.vector.Vector.fromPointer(ptr)
mfem.checkBoundaryDofs
Check boundary DOF extraction for specified boundary attributes.
mfem.checkBoundaryDofs(fespace, bdrAttrs)
mfem.checkForLeaks
Check for memory leaks.
mfem.checkForLeaks()
mfem.checkPositiveDefinite
Check if a sparse matrix is positive definite.
mfem.checkPositiveDefinite(mat)
mfem.checkResidual
Check if a solution satisfies the residual tolerance.
mfem.checkResidual(A, x, b, tol)
mfem.checkSymmetry
Check if a sparse matrix is symmetric within a given tolerance.
mfem.checkSymmetry(mat, tol?)
mfem.computeConditionNumber
Estimate the condition number of a sparse matrix.
mfem.computeConditionNumber(mat, maxIter?)
mfem.computeResidual
Compute the residual vector r = b - A*x.
mfem.computeResidual(A, x, b, r)
mfem.configureMFEM
Configure the MFEM WASM loader before initialization.
mfem.configureMFEM(config)
mfem.disableTiming
Disable timing collection.
mfem.disableTiming()
mfem.enableTiming
Enable timing collection for MFEMWASM operations.
mfem.enableTiming()
mfem.getMemoryUsage
Get current WASM memory usage.
mfem.getMemoryUsage()
mfem.getMFEMModule
Get the loaded MFEM module synchronously.
mfem.getMFEMModule()
mfem.getObjectCount
Get the current object counts by type.
mfem.getObjectCount()
mfem.getTimingReport
Get the current timing report.
mfem.getTimingReport()
mfem.isMFEMLoaded
Check if the MFEM module has been loaded.
mfem.isMFEMLoaded()
mfem.loadMFEMModule
Load and initialize the MFEM WASM module.
mfem.loadMFEMModule()
mfem.loadSolution
Loads a mesh and grid function pair from a JSON bundle string.
mfem.loadSolution(data)
mfem.printDofInfo
Get comprehensive DOF information for a finite element space.
mfem.printDofInfo(fespace)
mfem.resetMFEMModule
Reset the module state for testing purposes.
mfem.resetMFEMModule()
mfem.resetTimers
Reset all timing data.
mfem.resetTimers()
mfem.saveSolution
Saves a mesh and grid function pair to a JSON bundle string.
mfem.saveSolution(mesh, gf, options?)
mfem.verifyAssembly
Verify that a bilinear form has been correctly assembled.
mfem.verifyAssembly(bf)
mfem.visualizeDofs
Get DOF locations for visualization/debugging of a specific element.
mfem.visualizeDofs(fespace, elemIdx)