pargeo


Namepargeo JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/Priusds/ParGeo
SummaryGenerate complex two-dimensional geometries for simulations based on mesh discretizations.
upload_time2024-02-25 16:17:14
maintainerTill Schäfer
docs_urlNone
authorTill Schäfer
requires_python>=3.11,<4.0
licenseMIT
keywords geometry mesh gmsh composite material fem finite element method
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ParGeo

[**Overview**](#overview)
| [**Installation**](#installation)
| [**Basic Usage**](#basic-usage)
| [**Getting Started**](https://pargeo.readthedocs.io/en/latest/notebooks/getting-started.html)
| [**Documentation**](https://pargeo.readthedocs.io/en/latest/)
| [**Cite**](#cite)

Generate complex two-dimensional geometries for simulations based on mesh discretizations.

![ParGeo Logo](docs/_static/logo.png)

# 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](https://shapely.readthedocs.io/en/stable/reference/shapely.Polygon.html#shapely.Polygon) and [MultiPolygons](https://shapely.readthedocs.io/en/stable/reference/shapely.MultiPolygon.html#shapely.MultiPolygon) 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](https://gmsh.info).

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](https://pargeo.readthedocs.io/en/latest/) 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).to_polygon(refs=50)
domain.add_subdomain(subdomain=subdomain, level=1)

subdomain = Circle((0.7, 0.5), 0.3).to_polygon(refs=50)
domain.add_subdomain(subdomain=subdomain, level=1)

subdomain = Stellar((0.5, 0.3), 0.2).to_polygon(refs=50)
domain.add_subdomain(subdomain=subdomain, level=2)

# Plot the domain
domain.plot()

# Mesh the domain using Gmsh and write the .MSH file
write_mesh(domain, "basic_usage")
```


## Cite

If you use ParGeo in your research, please cite it. You can use the following BibTeX entry:

```bibtex
@software{Schafer_ParGeo_2024,
    author = {Schäfer, Till and Gruhlke, Robert},
    month = feb,
    title = {{ParGeo}},
    url = {https://github.com/Priusds/ParGeo},
    version = {0.3.2},
    year = {2024}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Priusds/ParGeo",
    "name": "pargeo",
    "maintainer": "Till Sch\u00e4fer",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "tillschaefer96@hotmail.it",
    "keywords": "geometry,mesh,gmsh,composite,material,FEM,Finite Element Method",
    "author": "Till Sch\u00e4fer",
    "author_email": "tillschaefer96@hotmail.it",
    "download_url": "https://files.pythonhosted.org/packages/f7/df/c6afe7e1cbd4559c0b223478f684bda9f9d7238b57f7130c94a4005457df/pargeo-0.3.2.tar.gz",
    "platform": null,
    "description": "# ParGeo\n\n[**Overview**](#overview)\n| [**Installation**](#installation)\n| [**Basic Usage**](#basic-usage)\n| [**Getting Started**](https://pargeo.readthedocs.io/en/latest/notebooks/getting-started.html)\n| [**Documentation**](https://pargeo.readthedocs.io/en/latest/)\n| [**Cite**](#cite)\n\nGenerate complex two-dimensional geometries for simulations based on mesh discretizations.\n\n![ParGeo Logo](docs/_static/logo.png)\n\n# Overview\n\nWith ParGeo you can create complex _domains_, where a domain is a two-dimensional geometry which is described by a collection of shapely [Polygons](https://shapely.readthedocs.io/en/stable/reference/shapely.Polygon.html#shapely.Polygon) and [MultiPolygons](https://shapely.readthedocs.io/en/stable/reference/shapely.MultiPolygon.html#shapely.MultiPolygon) called _subdomains_.\n\nThis 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](https://gmsh.info).\n\nTo 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.\n\nFollowing features support you with the domain-generating process:\n\n- **Create Geometries** (`pargeo.geometry`): \n    \n    Create common geometries that can easly be transformed into shapely Polygons.\n\n    Following geometries are provided:\n\n    - Box\n    - Circle & Ellipse\n    - Stellar\n    - NStar\n    - Raindrop \n\n- **Transform Geometries** (`pargeo.transform`)\n\n    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.\n\n    Following transforms are provided:\n\n    - Repeat\n    - Periodic\n    - Diffeomorphism\n\n- **Impose Constraints** (`pargeo.constraint`)\n\n    Pass constraints to the domain while adding new sub-domains. The new sub-domain is only added, if the constraints are met.\n    \n    Following constraints are provided:\n\n    - DistanceConstraint\n\nCheck out the [documentation](https://pargeo.readthedocs.io/en/latest/) for more information.\n\n## Installation\n\nInstall the latest version of ParGeo from PyPI using pip:\n\n```bash\npip install pargeo\n``` \n\n## Basic Usage\n\nHere's a simple example of how to use ParGeo.\n\n```python\nfrom pargeo import write_mesh\nfrom pargeo.domain import Domain\nfrom pargeo.geometry import Box, Circle, Stellar\n\n# Create a domain\nbackground = Box((0, 0), (1, 1)).to_polygon()\ndomain = Domain(background)\n\n# Add some subdomains\nsubdomain = Circle((0.3, 0.5), 0.3).to_polygon(refs=50)\ndomain.add_subdomain(subdomain=subdomain, level=1)\n\nsubdomain = Circle((0.7, 0.5), 0.3).to_polygon(refs=50)\ndomain.add_subdomain(subdomain=subdomain, level=1)\n\nsubdomain = Stellar((0.5, 0.3), 0.2).to_polygon(refs=50)\ndomain.add_subdomain(subdomain=subdomain, level=2)\n\n# Plot the domain\ndomain.plot()\n\n# Mesh the domain using Gmsh and write the .MSH file\nwrite_mesh(domain, \"basic_usage\")\n```\n\n\n## Cite\n\nIf you use ParGeo in your research, please cite it. You can use the following BibTeX entry:\n\n```bibtex\n@software{Schafer_ParGeo_2024,\n    author = {Sch\u00e4fer, Till and Gruhlke, Robert},\n    month = feb,\n    title = {{ParGeo}},\n    url = {https://github.com/Priusds/ParGeo},\n    version = {0.3.2},\n    year = {2024}\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Generate complex two-dimensional geometries for simulations based on mesh discretizations.",
    "version": "0.3.2",
    "project_urls": {
        "Documentation": "https://pargeo.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/Priusds/ParGeo",
        "Repository": "https://github.com/Priusds/ParGeo"
    },
    "split_keywords": [
        "geometry",
        "mesh",
        "gmsh",
        "composite",
        "material",
        "fem",
        "finite element method"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "305375a6b268a6c31d31077a455c4fb4fd1ba9a617cd5789a892ed92b4c00bd1",
                "md5": "e034a1163f5d2dd1665c0f7221e65959",
                "sha256": "5c380ceb9457d9046fc890df8938bf40b52c79be1c055e8cfe51b2e14453b6fb"
            },
            "downloads": -1,
            "filename": "pargeo-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e034a1163f5d2dd1665c0f7221e65959",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 23860,
            "upload_time": "2024-02-25T16:17:13",
            "upload_time_iso_8601": "2024-02-25T16:17:13.087401Z",
            "url": "https://files.pythonhosted.org/packages/30/53/75a6b268a6c31d31077a455c4fb4fd1ba9a617cd5789a892ed92b4c00bd1/pargeo-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7dfc6afe7e1cbd4559c0b223478f684bda9f9d7238b57f7130c94a4005457df",
                "md5": "e74dffaceb5ed94b9db8d8f87aad32fc",
                "sha256": "883d0337d27b3545ac63aae491860d2f2c2e002845e53d037d2ad0a2d22afacb"
            },
            "downloads": -1,
            "filename": "pargeo-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e74dffaceb5ed94b9db8d8f87aad32fc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 21640,
            "upload_time": "2024-02-25T16:17:14",
            "upload_time_iso_8601": "2024-02-25T16:17:14.698823Z",
            "url": "https://files.pythonhosted.org/packages/f7/df/c6afe7e1cbd4559c0b223478f684bda9f9d7238b57f7130c94a4005457df/pargeo-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-25 16:17:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Priusds",
    "github_project": "ParGeo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pargeo"
}
        
Elapsed time: 0.22530s