pargeo
Generate complex two-dimensional geometries for simulations based on mesh discretizations.
Science Score: 44.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
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.9%) to scientific vocabulary
Keywords
Repository
Generate complex two-dimensional geometries for simulations based on mesh discretizations.
Basic Info
- Host: GitHub
- Owner: Priusds
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://pypi.org/project/pargeo/
- Size: 1.62 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 13
- Releases: 8
Topics
Metadata Files
README.md
ParGeo
Overview | Installation | Basic Usage | Getting Started | Documentation | Cite
Generate complex two-dimensional geometries for simulations based on mesh discretizations.

Overview
With ParGeo you can create complex domains, where a domain is a two-dimensional geometry which is described by a collection of shapely Polygons and MultiPolygons called subdomains.
This domain could then be used for mesh generation, to further perform 2D mesh based simulations, like the Finite Element Methods (FEM). We provide mesh generating functionalities based on Gmsh.
To generate the desired domain you will use the pargeo.domain.Domain class and sequentially add subdomains. Each subdomain is associated with a visibility level. The visibility level is an integer, and subdomains with a higher visibility level will cover those with a lower one and be merged with those having the same one.
Following features support you with the domain-generating process:
Create Geometries (
pargeo.geometry):Create common geometries that can easly be transformed into shapely Polygons.
Following geometries are provided:
- Box
- Circle & Ellipse
- Stellar
- NStar
- Raindrop
Transform Geometries (
pargeo.transform)Pass transforms to your domain while adding new sub-domains. The sub-domain will then be first accordingly transformed before being added to the domain.
Following transforms are provided:
- Repeat
- Periodic
- Diffeomorphism
Impose Constraints (
pargeo.constraint)Pass constraints to the domain while adding new sub-domains. The new sub-domain is only added, if the constraints are met.
Following constraints are provided:
- DistanceConstraint
Check out the documentation for more information.
Installation
Install the latest version of ParGeo from PyPI using pip:
bash
pip install pargeo
Basic Usage
Here's a simple example of how to use ParGeo.
```python from pargeo import write_mesh from pargeo.domain import Domain from pargeo.geometry import Box, Circle, Stellar
Create a domain
background = Box((0, 0), (1, 1)).to_polygon() domain = Domain(background)
Add some subdomains
subdomain = Circle((0.3, 0.5), 0.3).topolygon(refs=50) domain.addsubdomain(subdomain=subdomain, level=1)
subdomain = Circle((0.7, 0.5), 0.3).topolygon(refs=50) domain.addsubdomain(subdomain=subdomain, level=1)
subdomain = Stellar((0.5, 0.3), 0.2).topolygon(refs=50) domain.addsubdomain(subdomain=subdomain, level=2)
Plot the domain
domain.plot()
Mesh the domain using Gmsh and write the .MSH file
writemesh(domain, "basicusage") ```
Cite
If you use ParGeo in your research, please cite it. You can use the following BibTeX entry:
bibtex
@software{Schafer_ParGeo_2024,
author = {Gruhlke, Robert and Schäfer, Till},
month = feb,
title = {{ParGeo}},
url = {https://github.com/Priusds/ParGeo},
version = {0.3.4},
year = {2024}
}
Owner
- Login: Priusds
- Kind: user
- Repositories: 1
- Profile: https://github.com/Priusds
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Gruhlke" given-names: "Robert" orcid: "https://orcid.org/0000-0003-3129-9423" - family-names: "Schäfer" given-names: "Till" title: "ParGeo" version: 0.3.4 date-released: 2024-02-11 url: "https://github.com/Priusds/ParGeo"
GitHub Events
Total
Last Year
Packages
- Total packages: 1
-
Total downloads:
- pypi 30 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
- Total maintainers: 1
pypi.org: pargeo
Generate complex two-dimensional geometries for simulations based on mesh discretizations.
- Homepage: https://github.com/Priusds/ParGeo
- Documentation: https://pargeo.readthedocs.io/en/latest/
- License: MIT
-
Latest release: 0.3.4
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- matplotlib *
- mystic *
- numpy *
- scipy *
- actions/checkout v4 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- pypa/gh-action-pypi-publish release/v1 composite
- sigstore/gh-action-sigstore-python v1.2.3 composite
- actions/checkout v3 composite
- actions/setup-python v2 composite
- chartboost/ruff-action v1 composite
- nbsphinx ==0.9.3
- sphinx ==7.2.6
- sphinx-copybutton ==0.5.2
- sphinx-rtd-theme ==2.0.0
- sphinxcontrib-napoleon ==0.7
- alabaster ==0.7.16
- attrs ==23.2.0
- babel ==2.14.0
- beautifulsoup4 ==4.12.3
- bleach ==6.1.0
- certifi ==2024.2.2
- charset-normalizer ==3.3.2
- defusedxml ==0.7.1
- docutils ==0.20.1
- fastjsonschema ==2.19.1
- idna ==3.6
- imagesize ==1.4.1
- jinja2 ==3.1.3
- jsonschema ==4.21.1
- jsonschema-specifications ==2023.12.1
- jupyter-client ==8.6.0
- jupyter-core ==5.7.1
- jupyterlab-pygments ==0.3.0
- markupsafe ==2.1.5
- mistune ==3.0.2
- nbclient ==0.9.0
- nbconvert ==7.16.1
- nbformat ==5.9.2
- nbsphinx ==0.9.3
- packaging ==23.2
- pandocfilters ==1.5.1
- platformdirs ==4.2.0
- pockets ==0.9.1
- pygments ==2.17.2
- python-dateutil ==2.8.2
- pyzmq ==25.1.2
- referencing ==0.33.0
- requests ==2.31.0
- rpds-py ==0.18.0
- six ==1.16.0
- snowballstemmer ==2.2.0
- soupsieve ==2.5
- sphinx ==7.2.6
- sphinx-copybutton ==0.5.2
- sphinx-rtd-theme ==2.0.0
- sphinxcontrib-applehelp ==1.0.8
- sphinxcontrib-devhelp ==1.0.6
- sphinxcontrib-htmlhelp ==2.0.5
- sphinxcontrib-jquery ==4.1
- sphinxcontrib-jsmath ==1.0.1
- sphinxcontrib-napoleon ==0.7
- sphinxcontrib-qthelp ==1.0.7
- sphinxcontrib-serializinghtml ==1.1.10
- tinycss2 ==1.2.1
- tornado ==6.4
- traitlets ==5.14.1
- urllib3 ==2.2.1
- webencodings ==0.5.1