Skip to main content

Gravo MG: A Fast Geometric Multigrid Method for Curved Surfaces

Project description

Gravo MG Python Bindings

[Paper] [Project page]

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.

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:

import mgsolver

V, 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

pip install gravomg

If you would like to recompile yourself, you can clone this repository

git clone --recurse https://github.com/rubenwiersma/gravo_mg_python.git

And install from the folder

cd gravo_mg_python
pip install ./

Citations

Please cite our paper if this code contributes to an academic publication:

@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}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gravomg-0.0.4.tar.gz (227.7 kB view hashes)

Uploaded Source

Built Distributions

gravomg-0.0.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (202.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.0 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (204.3 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.2 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-cp310-cp310-macosx_13_0_arm64.whl (153.1 kB view hashes)

Uploaded CPython 3.10 macOS 13.0+ ARM64

gravomg-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.6 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (205.6 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

gravomg-0.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (205.6 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page