--- id: scikit-fem version: "12.0.2" license: unclear license_treatment: permissive maintenance: active --- # scikit-fem — Simple finite element assemblers License: permissive · Maintenance: active · Downloads: 288.6K/mo ## What it is and what it does scikit-fem is a pure Python library that converts mathematical finite element forms into sparse matrices and vectors suitable for numerical solving. It handles the core assembly task in finite element analysis—taking weak formulations of PDEs and producing the linear systems that solvers need. The library supports a wide range of element types (linear and higher-order, including specialized elements like Raviart-Thomas and Nédélec) and works with 1D, 2D, and 3D meshes. The package is designed for researchers and engineers solving PDEs via the finite element method. It has minimal dependencies (only numpy and scipy for core functionality), contains no compiled code, and integrates with scipy's sparse solvers. Optional dependencies add mesh I/O and visualization. Assembly performance is competitive for many problem sizes, with benchmark data showing assembly times scale predictably up to large degree-of-freedom counts. Use it for: - Solve Poisson, Laplace, and other elliptic PDEs on unstructured meshes using Python. - Assemble stiffness and mass matrices for structural mechanics or heat transfer problems. - Prototype finite element formulations with custom bilinear and linear forms before optimization. - Work with specialized elements for mixed or vector-valued problems in electromagnetics or fluid dynamics. - Load and process meshes from external formats and solve coupled multiphysics problems. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Transforms bilinear and linear forms into sparse matrices and vectors for finite element assembly, supporting 1D, triangular, quadrilateral, tetrahedral, and hexahedral elements plus specialized element types. Yes. Active maintenance, permissive 3-clause BSD license, low install friction, and no known vulnerabilities make it a solid choice. The pure-Python design trades some speed for accessibility and ease of modification. Install if you need finite element assembly in Python and can accept that linear solve performance will dominate for large problems—the library excels at the assembly step itself. ## Install pip install scikit-fem uv add scikit-fem poetry add scikit-fem ## Installing scikit-fem Before you install: Low friction install with only numpy and scipy as core dependencies; pure Python with no compiled code. Active maintenance with latest release 70 days ago and steady repository activity. License in practice: Licensed under 3-clause BSD (permissive), allowing commercial and private use with minimal restrictions; no copyleft obligations. Quickstart: pip install scikit-fem from scikit_fem import * from scikit_fem.helpers import dot, grad mesh = MeshTri().refined(4) basis = Basis(mesh, ElementTriP1()) @BilinearForm def laplace(u, v, _): return dot(grad(u), grad(v)) A = laplace.assemble(basis) Requires Python 3.10 or later. Verify before relying: - Performance scaling characteristics for very large problems beyond 1M degrees-of-freedom. - Availability and maturity of optional autodiff and supermeshing submodules requiring jax and shapely. - Memory usage and solver performance characteristics for problems at the largest scales shown in benchmark. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 288.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags finite element assembly, bilinear form to matrix, FEM sparse matrix, finite element method Python, tetrahedral element basis, Raviart-Thomas elements, FEA matrix assembly, finite-elements, pde-solver, numerical-methods [View on SkillFed](https://skillfed.io/packages/scikit-fem) · [View on PyPI](https://pypi.org/project/scikit-fem/)