ScimBa

pipeline status coverage report Latest Release Doc

Scimba is a Python library that implements varying Scientific Machine Learning (SciML) methods for PDE problems, as well as tools for hybrid numerical methods.

The current version of the code solves parametric PDEs using various nonlinear approximation spaces such as neural networks, low-rank approximations, and nonlinear kernel methods. These methods:

  • can handle complex geometries generated via level-set techniques and mappings, including sub-volumetric and surface domains;

  • support function projections as well as elliptic, time-dependent, and kinetic parametric PDEs;

  • are compatible with both space–time algorithms (PINN, Deep Ritz) and time-sequential ones (discrete PINNs, neural Galerkin and neural semi-Lagrangian schemes).

To achieve this, the code provides several optimization strategies, including:

  • Adam and L-BFGS;

  • natural gradient methods (for neural network-based models);

  • hybrid least-squares approaches.

The current version of Scimba relies on a PyTorch backend. A JAX version is under development.

Install

uv is the preferred tool to install scimba, but you can also use pip. In any case, it is strongly recommended to isolate your installation in a virtual environment (uv does this for you).

uv tool install scimba
pip install scimba

Note

If you are using an AMD GPU, you need to set the appropriate index URL to install the PyTorch ROCm version prior to installing scimba.

export UV_EXTRA_INDEX_URL="https://download.pytorch.org/whl/rocm6.4"
export PIP_INDEX_URL="https://download.pytorch.org/whl/rocm6.4"

Scimba API documentation

Basic configuration

Please refer to the basic configuration page for an overview of scimba_torch global parameters.

Available Packages

scimba_torch.approximation_space

Defines the approximation space and its components.

scimba_torch.domain

Defines mesh-based and meshless domains.

scimba_torch.flows

Various numerical integrators for ODEs.

scimba_torch.integration

Integration methods for volumetric and surfacic domains.

scimba_torch.neural_nets

Defines neural networks.

scimba_torch.numerical_solvers

Defines numerical solvers.

scimba_torch.optimizers

Scimba optimizers and losses.

scimba_torch.physical_models

Defines physical models.

scimba_torch.plots

Plot utilities.

scimba_torch.utils

Utility functions and classes.

Development