Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rubenwiersma/gravo_mg_python
Python Bindings for Gravo MG
https://github.com/rubenwiersma/gravo_mg_python
Last synced: 20 days ago
JSON representation
Python Bindings for Gravo MG
- Host: GitHub
- URL: https://github.com/rubenwiersma/gravo_mg_python
- Owner: rubenwiersma
- License: mit
- Created: 2023-08-06T06:35:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-14T21:35:08.000Z (over 1 year ago)
- Last Synced: 2024-11-06T00:06:37.437Z (2 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gravo MG Python Bindings
[[Paper]](https://graphics.tudelft.nl/~klaus/papers/Gravo_MG.pdf) [[Project page]](https://rubenwiersma.nl/gravomg)![](https://rubenwiersma.nl/assets/img/publications/gravomg/teaser_gravomg.png)
Python binding for Gravo MG. Gravo MG is a Geometric Multigrid Method for solving linear systems on curved surfaces. For more information, check out our [project page](https://rubenwiersma.nl/gravomg).
## How to use
Given positions of points on a mesh or point clouds and a neighborhood graph (e.g., the edges on a mesh), you can use Gravo MG to solve linear systems as follows:
```python
import mgsolverV, F = # Mesh with vertices and faces
M = # Mass matrix
S = # Stiffness matrix (Laplacian)# Create the hierarchy
neigh = gravomg.util.neighbors_from_stiffness(S)
solver = gravomg.MultigridSolver(V, neigh, M)# Solve a linear system
lhs = # Some left hand side, e.g. M + 0.01 * S, make sure it is in csr format.
rhs = # Some right hand side, e.g. M @ V
solution = solver.solve(lhs, rhs)
```## Installation
The Gravo MG package is available on pip
```bash
pip install gravomg
```If you would like to recompile yourself, you can clone this repository
```bash
git clone --recurse https://github.com/rubenwiersma/gravo_mg_python.git
```And install from the folder
```bash
cd gravo_mg_python
pip install ./
```## Citations
Please cite our paper if this code contributes to an academic publication:```bib
@Article{WiersmaNasikun2023GravoMG,
author = {Ruben Wiersma, Ahmad Nasikun, Elmar Eisemann, Klaus Hildebrandt},
journal = {SIGGRAPH 2023},
title = {A Fast Geometric Multigrid Method for Curved Surfaces},
year = {2023},
month = jul,
number = {4},
volume = {41},
doi = {10.1145/3588432.3591502},
publisher = {ACM}
}
```