ngsimple


Namengsimple JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/kinnala/ngsimple
SummaryThe easiest way to call Netgen from Python
upload_time2023-11-28 08:06:23
maintainer
docs_urlNone
authorTom Gustafsson
requires_python>=3.6
licenseLGPL-2.1-only
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ngsimple

[![PyPI](https://img.shields.io/pypi/v/ngsimple)](https://pypi.org/project/ngsimple/)

Suppose you wanted to use Netgen in a Python script to generate tetrahedral
meshes but did not want to spend time installing the entire [Netgen/NGSolve](https://ngsolve.org/)
package which ships with it's own Python interpreter.  This is a simple wrapper
for running Netgen mesh generator inside a container and functions for calling
it transparently from any Python interpreter.

_This is work-in-progress.  Currently using the following container: https://hub.docker.com/r/ngsxfem/ngsolve. In future, plan is to use a dedicated more lightweight container._

## Installation

Install with
```
pip install ngsimple
```
ngsimple requires Docker and
[docker-py](https://github.com/docker/docker-py)
for pulling container images and interacting with the mesh generator.
The output mesh is read back to Python using [meshio](https://github.com/nschloe/meshio).

## Example


```python
from ngsimple import generate

mesh = generate("""algebraic3d

solid main = sphere (0, 0, 0; 1);

tlo main;
point (0, 0, 0);
""", verbose=True)

from vedo import show

show(mesh)
```

![Netgen output mesh](https://user-images.githubusercontent.com/973268/89173063-549e0000-d58c-11ea-98b9-91d9ef9f218d.png)

# Changelog

## 0.2.0

- Update to a working container image
- Allow specifying `image` and `tag` in `generate`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kinnala/ngsimple",
    "name": "ngsimple",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Tom Gustafsson",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/67/e2/fe3ae257f6470f02eff654dacda44176a55871ae55b135bc5a73d38922b7/ngsimple-0.2.0.tar.gz",
    "platform": null,
    "description": "# ngsimple\n\n[![PyPI](https://img.shields.io/pypi/v/ngsimple)](https://pypi.org/project/ngsimple/)\n\nSuppose you wanted to use Netgen in a Python script to generate tetrahedral\nmeshes but did not want to spend time installing the entire [Netgen/NGSolve](https://ngsolve.org/)\npackage which ships with it's own Python interpreter.  This is a simple wrapper\nfor running Netgen mesh generator inside a container and functions for calling\nit transparently from any Python interpreter.\n\n_This is work-in-progress.  Currently using the following container: https://hub.docker.com/r/ngsxfem/ngsolve. In future, plan is to use a dedicated more lightweight container._\n\n## Installation\n\nInstall with\n```\npip install ngsimple\n```\nngsimple requires Docker and\n[docker-py](https://github.com/docker/docker-py)\nfor pulling container images and interacting with the mesh generator.\nThe output mesh is read back to Python using [meshio](https://github.com/nschloe/meshio).\n\n## Example\n\n\n```python\nfrom ngsimple import generate\n\nmesh = generate(\"\"\"algebraic3d\n\nsolid main = sphere (0, 0, 0; 1);\n\ntlo main;\npoint (0, 0, 0);\n\"\"\", verbose=True)\n\nfrom vedo import show\n\nshow(mesh)\n```\n\n![Netgen output mesh](https://user-images.githubusercontent.com/973268/89173063-549e0000-d58c-11ea-98b9-91d9ef9f218d.png)\n\n# Changelog\n\n## 0.2.0\n\n- Update to a working container image\n- Allow specifying `image` and `tag` in `generate`\n",
    "bugtrack_url": null,
    "license": "LGPL-2.1-only",
    "summary": "The easiest way to call Netgen from Python",
    "version": "0.2.0",
    "project_urls": {
        "Code": "https://github.com/kinnala/ngsimple",
        "Homepage": "https://github.com/kinnala/ngsimple",
        "Issues": "https://github.com/kinnala/ngsimple/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7b54cf25c09b9ab3ebea33312d8b4c7411578df1eb55f63d4acf33633d584b34",
                "md5": "fe401bf24d6d1fb3668a4dd5d13ad07d",
                "sha256": "f5700bf5beb908017a1b6909909dda28af3bcdcc966fb56105744f4dc78995cd"
            },
            "downloads": -1,
            "filename": "ngsimple-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fe401bf24d6d1fb3668a4dd5d13ad07d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 13350,
            "upload_time": "2023-11-28T08:06:22",
            "upload_time_iso_8601": "2023-11-28T08:06:22.141293Z",
            "url": "https://files.pythonhosted.org/packages/7b/54/cf25c09b9ab3ebea33312d8b4c7411578df1eb55f63d4acf33633d584b34/ngsimple-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "67e2fe3ae257f6470f02eff654dacda44176a55871ae55b135bc5a73d38922b7",
                "md5": "b87883a686a7bbb0fcd8b6c6b3b58b4f",
                "sha256": "fb2b5c28f8445e34f64609b4eac8584a2653ebfb533e90a3df679a88259e9910"
            },
            "downloads": -1,
            "filename": "ngsimple-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b87883a686a7bbb0fcd8b6c6b3b58b4f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 13018,
            "upload_time": "2023-11-28T08:06:23",
            "upload_time_iso_8601": "2023-11-28T08:06:23.515472Z",
            "url": "https://files.pythonhosted.org/packages/67/e2/fe3ae257f6470f02eff654dacda44176a55871ae55b135bc5a73d38922b7/ngsimple-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-28 08:06:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kinnala",
    "github_project": "ngsimple",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ngsimple"
}
        
Elapsed time: 0.13583s