Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.9%) to scientific vocabulary
Last synced: 6 months ago
·
JSON representation
·
Repository
Basic Info
- Host: GitHub
- Owner: kesperinc
- License: other
- Language: C
- Default Branch: main
- Size: 5 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created over 3 years ago
· Last pushed over 3 years ago
Metadata Files
Readme
License
Citation
README.rst
PyMetis: A Python Wrapper for METIS
===================================
.. image:: https://gitlab.tiker.net/inducer/pymetis/badges/main/pipeline.svg
:alt: Gitlab Build Status
:target: https://gitlab.tiker.net/inducer/pymetis/commits/main
.. image:: https://github.com/inducer/pymetis/workflows/CI/badge.svg?branch=main
:alt: Github Build Status
:target: https://github.com/inducer/pymetis/actions?query=branch%3Amain+workflow%3ACI
.. image:: https://badge.fury.io/py/PyMetis.png
:alt: Python Package Index Release Page
:target: https://pypi.org/project/pymetis/
.. image:: https://zenodo.org/badge/2199177.svg
:alt: Zenodo DOI for latest release
:target: https://zenodo.org/badge/latestdoi/2199177
PyMetis is a Python wrapper for the `Metis
`_ graph partititioning software
by George Karypis, Vipin Kumar and others. It includes version 5.1.0 of Metis
and wraps it using the `Pybind11 `_
wrapper generator library. So far, it only wraps the most basic graph
partitioning functionality (which is enough for my current use), but extending
it in case you need more should be quite straightforward. Using PyMetis to
partition your meshes is really easy--essentially all you need to pass into
PyMetis is an adjacency list for the graph and the number of parts you would
like.
Links
-----
* `Documentation `__ (read how things work)
* `Conda Forge `_ (download binary packages for Linux, macOS, Windows)
* `Python package index `_ (download releases)
* `C. Gohlke's Windows binaries `_ (download Windows binaries)
* `Github `_ (get latest source code, file bugs)
Installation
------------
The following line should do the job::
pip install pymetis
Quick Start
-----------
This graph, adapted from Figure 2 of the Metis
`manual `_ to
use zero-based indexing,
.. image:: doc/_static/tiny_01.png
can be defined and partitioned into two graphs with
.. code:: python
import numpy as np
import pymetis
adjacency_list = [np.array([4, 2, 1]),
np.array([0, 2, 3]),
np.array([4, 3, 1, 0]),
np.array([1, 2, 5, 6]),
np.array([0, 2, 5]),
np.array([4, 3, 6]),
np.array([5, 3])]
n_cuts, membership = pymetis.part_graph(2, adjacency=adjacency_list)
# n_cuts = 3
# membership = [1, 1, 1, 0, 1, 0, 0]
nodes_part_0 = np.argwhere(np.array(membership) == 0).ravel() # [3, 5, 6]
nodes_part_1 = np.argwhere(np.array(membership) == 1).ravel() # [0, 1, 2, 4]
.. image:: doc/_static/tiny_01_partitioned.png
Owner
- Name: Sun Kim
- Login: kesperinc
- Kind: user
- Repositories: 2
- Profile: https://github.com/kesperinc
Citation (CITATION.cff)
cff-version: 1.1.0 message: "If you use this software, please cite it as below." authors: - family-names: "Kloeckner" given-names: "Andreas" orcid: "https://orcid.org/0000-0003-1228-519X" - family-names: Wala given-names: Matt - family-names: Hartland given-names: Nathan - family-names: Danial given-names: Albert - family-names: Obermeyer given-names: Fritz - family-names: Wu given-names: Cathy - family-names: Gohlke given-names: Christoph title: PyMetis version: "2022.1" date-released: 2022-07-23 url: "https://github.com/inducer/pymetis" doi: 10.5281/zenodo.6892213
GitHub Events
Total
Last Year
Dependencies
.github/workflows/autopush.yml
actions
- actions/checkout v3 composite
.github/workflows/ci.yml
actions
- actions/checkout v3 composite
- actions/setup-python v4 composite
requirements.txt
pypi
- meshpy *
- numpy *
- pybind11 *
setup.py
pypi
- six *