Metadata-Version: 2.4
Name: dendra-solvers
Version: 0.3.1
Summary: Fast implicit solvers (CPU) for cable models, written in C++.
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: C++
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: torch>=2.12.0

# dendra-solvers

C++ PyTorch extensions for fast, differentiable implicit solvers in Dendra.

## Installation

```bash
pip install dendra-solvers
```

Python 3.10+ and PyTorch 2.12+ are required. When a compatible wheel is
available, installation does not require a compiler. Stable-ABI wheels work
across supported Python and PyTorch versions on the same operating system and
CPU architecture.

For an HPC environment or custom PyTorch build, install PyTorch first and build
the extension against that installation:

```bash
python -m pip install "torch>=2.12.0" "setuptools>=70.1,<82" ninja wheel
MAX_JOBS=1 python -m pip install --no-build-isolation --no-cache-dir \
  --no-deps --no-binary=dendra-solvers dendra-solvers
```

The build uses the C++ standard selected by your installed PyTorch. Use a
C++20-capable compiler for current PyTorch releases. Stable-ABI builds do not
need rebuilding just because PyTorch is upgraded; see
[installation and clean rebuilds](docs/installation.md) for wheel availability,
source builds, and upgrading older installations.

Useful build options:

- `DENDRA_NATIVE=1` enables host-specific compiler optimizations. Do not use it
  for redistributable builds.
- `DENDRA_OMP=1` enables OpenMP when its runtime is available.
- `MAX_JOBS=1` limits compilation concurrency on memory-constrained systems.

## Testing

For a development checkout:

```bash
python -m pip install "torch>=2.12.0" "setuptools>=70.1,<82" ninja wheel numpy pytest
MAX_JOBS=1 python -m pip install -v --no-build-isolation --no-deps -e .
python -c "import dendra_solvers._ext as ext; print(ext.__file__)"
python -m pytest -q -ra
```

Solver contracts and PyTorch transform usage are documented in [`docs/`](docs/).

See [Contributing](CONTRIBUTING.md) for development tools, commit conventions,
and versioning.
