Metadata-Version: 2.4
Name: rbflab
Version: 0.2.0
Summary: RBFLAB: radial basis functions for interpolation and PDEs
License-Expression: MIT
Project-URL: Homepage, https://github.com/LDBreton/RBFLAB
Project-URL: Repository, https://github.com/LDBreton/RBFLAB
Project-URL: Issues, https://github.com/LDBreton/RBFLAB/issues
Keywords: radial basis functions,meshless,PDE,RBF-FD,collocation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: docs/provenance/RBFMeshGen-LICENSE.txt
Requires-Dist: numpy>=1.26
Requires-Dist: scipy>=1.11
Requires-Dist: sympy>=1.12
Requires-Dist: mpmath>=1.3
Requires-Dist: threadpoolctl>=3.5
Requires-Dist: shapely>=2.0
Provides-Extra: torch
Requires-Dist: torch>=2.2; extra == "torch"
Provides-Extra: fast
Requires-Dist: gmpy2>=2.2; extra == "fast"
Provides-Extra: mesh
Requires-Dist: gmsh>=4.12; extra == "mesh"
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Provides-Extra: examples
Requires-Dist: matplotlib>=3.8; extra == "examples"
Requires-Dist: pillow>=10; extra == "examples"
Provides-Extra: docs
Requires-Dist: mkdocs<2,>=1.6; extra == "docs"
Requires-Dist: mkdocs-material>=9; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.30; extra == "docs"
Dynamic: license-file

# RBFLAB

RBFLAB is a Python library for radial basis function interpolation and PDEs on
point clouds. It supports global collocation, local Hermite interpolation
(LHI), RBF-FD, symbolic linear operators and boundary conditions, and
divergence-free velocity spaces. Scalar operators work in 2D and 3D.

Source and examples: https://github.com/LDBreton/RBFLAB

Install the Python core with:

```sh
python -m pip install rbflab
```

Optional extras include `rbflab[examples]` for Matplotlib plots and GIFs,
`rbflab[mesh]` for Gmsh, and `rbflab[torch]` for the documented CPU Float64
tensor backend. The C++ double/MPFR backends are source-build options.

RBFMeshGen is integrated in version 0.2: labeled planar domains, holes, 3D
regions and explicit 2D staggered layouts share the solver PointCloud contract.
Shapely is a core dependency; Matplotlib, Gmsh and PyTorch remain optional.

```python
from rbflab import geometry, meshgen
cloud = meshgen.generate(geometry.Annulus(), interior=240, boundary=144, seed=42)
```

Explore [curved-domain tutorials](https://ldbreton.github.io/RBFLAB/geometry/)
for annular Laplace and Stokes, flower-shaped heat diffusion, mixed ellipse
boundaries and Poisson inside a 3D ball.

Here is a symbolic Poisson problem:

```python
import sympy as sp
import rbflab as rbf

model = rbf.SymbolicScalar(2)
u = model.field
x, y = model.coordinates
exact = sp.sin(sp.pi*x) * sp.sin(sp.pi*y)
lhs = -model.laplacian(u)
problem = model.stationary(
    sp.Eq(lhs, lhs.subs(u, exact).doit()),
    boundary=[model.bc("boundary", sp.Eq(u, 0))],
)
cloud = rbf.unit_box_grid(5)
solution = problem.solve(
    cloud, rbf.GlobalCollocation(rbf.IMQ(2), scheme="asymmetric")
)
print(solution.evaluate([[0.3, 0.4]]))
```

The source repository also contains short heat, Stokes, 3D operator, custom
kernel, and Re=100 lid-driven cavity examples. The cavity example is a
showcase with a documented nonzero discrete divergence defect; it does not
validate a general Navier–Stokes solver. LHI off-node reconstruction has its
own accuracy limitations, and MPFR local weights do not automatically make a
global sparse solve extended precision.

The [documentation site](https://ldbreton.github.io/RBFLAB/) includes a
[getting-started guide](https://ldbreton.github.io/RBFLAB/getting-started/)
and generated [API reference](https://ldbreton.github.io/RBFLAB/api/discretizations/).

RBFLAB is licensed under MIT.
