wosx
Grid-Free Monte Carlo Solvers for Physics Simulations Involving Partial Differential Equations
WoSX is a C++ and Python library from NVIDIA Research that solves physics simulation equations using a mesh-free randomized method, working directly on boundary geometry with no volume mesh required.
WoSX is a C++ library for solving a class of physics equations called partial differential equations, which describe how quantities like heat, electric potential, or fluid flow are distributed across a region. Traditional solvers for these equations require generating a volume mesh, a grid that fills the interior of the shape being simulated. WoSX avoids that step entirely by using a technique called Walk on Spheres, a randomized method that estimates the solution at any point by running many random paths and averaging the results.
The practical advantage is that WoSX works directly on the original boundary description of the shape, whether that is line segments in 2D or a triangle mesh in 3D. You give it the boundary geometry, specify what values or conditions hold at the boundary, pick the points where you want answers, and run the solver. No meshing software is needed, and you only compute where you actually need values. This makes it well-suited to complex or irregular shapes where building a volume mesh would be expensive or awkward.
The library runs on both CPU and GPU. CPU usage follows standard C++ patterns. GPU usage is built around the Slang shading language, with CUDA as the tested backend, though the code also targets Vulkan, Direct3D, and Metal. Python bindings are available so the solver can be called from Python scripts in addition to C++ programs. The library is header-only at its core, so using it in a C++ project does not require compiling a separate shared library.
The repository includes demo applications for thermal conduction, electrostatics, potential flow around 3D shapes, and basic 2D reference problems. Each demo has its own README with expected outputs and run commands. WoSX is described as research software from NVIDIA's Toronto lab, intended as a reference implementation rather than a production-optimized tool. It is released under the Apache 2.0 license.
Where it fits
- Simulate heat conduction or electrostatics on complex 3D shapes without needing to generate a volume mesh.
- Run physics equation solvers on GPU to get answers only at the specific points you care about.
- Call the solver from Python scripts to integrate mesh-free physics simulation into your research pipeline.
- Use the included demos as reference implementations for thermal, electrostatic, and fluid flow problems.