Metadata-Version: 2.4
Name: rippl
Version: 0.5.0
Summary: High-performance physics compiler and PINN engine.
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.0
Requires-Dist: pydantic
Provides-Extra: dynamics
Requires-Dist: torchdiffeq>=0.2.3; extra == "dynamics"
Dynamic: license-file

# rippl
**The physics compiler for neural networks.**

[![PyPI](https://img.shields.io/pypi/v/rippl)](https://pypi.org/project/rippl)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)

Welcome to `rippl`. If you've ever felt that training neural networks to solve Partial Differential Equations (PDEs) requires too much boilerplate, math-heavy configuration, and bloated code, you are exactly where you need to be. 

Traditional simulation engines take days to compute on supercomputers. `rippl` is a modern, hyper-optimized PINN (Physics-Informed Neural Network) compiler built on PyTorch. It trains an AI to understand the fundamental laws of physics, reducing inference time to milliseconds. 

The best part? You don't need a PhD in numerical methods to use it. If you can snap Lego blocks together, you can build a physics solver.

---

### 📖 The Official Guide
**[👉 Click here to read the full Documentation (`docs.md`)](docs.md)**

This repository contains a definitive, beginner-friendly learning guide. We highly recommend starting there. It will take you from a basic 1D heat wave all the way to operator learning and multi-objective thermodynamics.

---

### ⚡ Quickstart: The 7-Line Promise

We believe in showing, not telling. Here is the absolute minimum code required to solve the Heat Equation ($\frac{\partial u}{\partial t} = 0.1 \frac{\partial^2 u}{\partial x^2}$) using `rippl`:
```python
import torch
import rippl

# 1. Physics
eq = rippl.Equation([(1.0, rippl.TimeDerivative(order=1)), (-0.1, rippl.Laplacian())])

# 2. Domain
domain = rippl.Domain(bounds=[(0, 1)])

# 3. Constraints
bcs = [rippl.Dirichlet(0, value=0.0), rippl.Dirichlet(1, value=0.0)]
ic  = rippl.Initial(lambda x: torch.sin(torch.pi * x[:, 0:1]))
constraints = rippl.Constraints(bcs + [ic], fields=["u"])

# 4. Engine
solver = rippl.Solver(equation=eq, domain=domain, constraints=constraints)

# 5. Execute
model = solver.solve(epochs=3000)
You just built a PyTorch neural network, enforced boundaries algebraically, sampled coordinate points, and trained an AI solver.
```

🧰 What's in the Box?
While the core API is simple, the underlying engine is industrial-grade. rippl gives you access to:

Operator Learning: Out-of-the-box support for DeepONets and 1D Fourier Neural Operators (FNOs) so your network learns the rules of physics, not just a single solution.

Mesh-Free Geometry: Build complex 2D domains using Constructive Solid Geometry (CSG) math blocks—no painful meshing required.

Intelligent Training: Native support for Causal Training (respecting time), Adaptive Collocation Sampling, and Pareto Front Balancing for coupled multi-physics systems.

The Migration Engine: Instantly transpile your old, bloated legacy scripts (like DeepXDE) into optimized rippl syntax using rippl.migrate().

🚀 Next Steps
Install the package: pip install rippl

Dive into the docs: Open docs.md to see how these simple blocks scale up to 2D aerodynamics, shockwave capturing, and complex thermal stress simulations.
