Skip to main content

`meshkernel` is a library which can be used to manipulate meshes.

Project description

MeshKernelPy

Quality Gate Status PyPI version

MeshKernelPy is a library for creating and editing meshes. It supports 1D and 2D unstructured meshes. Support for curvilinear meshes is planned. The underlying C++ library MeshKernel can be found here.

Installation

Windows

The library can be installed from PyPI by executing

pip install meshkernel

If you encounter any issues importing the pip wheels on Windows, you may need to install the Visual C++ Redistributable for Visual Studio 2019.

Linux

Currently, we only offer wheels specific to Deltares' CentOS machines. We plan to release a manylinux wheel at PyPI in the future.

Examples

Creating a triangular mesh inside a polygon

In this example a mesh is created by discretizing the polygon perimeter with the desired edge length.

Mesh orthogonalization

Finite volume staggered flow solvers require the mesh to be as much orthogonal as possible. MeshKernel provides an algorithm to adapt the mesh and achieve a good balance between mesh orthogonality and smoothness.

Mesh refinement

A mesh can be refined in areas based on samples or polygon selections.

License

MeshKernelPy uses the MIT license. However, the wheels on PyPI bundle the LGPL licensed MeshKernel. Please make sure that this fits your needs before depending on it.

Contributing

In order to install MeshKernelPy locally, please execute the following line inside your virtual environment

pip install -e ".[tests, lint, docs]"

Then add a compiled MeshKernelApi.dll into your src folder.

Also make sure that your editor is configured to format the code with black and isort. When modifying Jupyter notebooks, the jupyterlab-code-formatter can be used.

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

meshkernel-2.0.1.tar.gz (363.8 kB view details)

Uploaded Source

Built Distribution

meshkernel-2.0.1-py3-none-win_amd64.whl (363.3 kB view details)

Uploaded Python 3 Windows x86-64

File details

Details for the file meshkernel-2.0.1.tar.gz.

File metadata

  • Download URL: meshkernel-2.0.1.tar.gz
  • Upload date:
  • Size: 363.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.13.0 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for meshkernel-2.0.1.tar.gz
Algorithm Hash digest
SHA256 7efa64ce2f6ec7e4783f38fbcfc49b456a0a8dc0049bf0476b5e1b95805126d0
MD5 ee8df05b9ecc2417aef13c6471cb7090
BLAKE2b-256 65ebf3de408c378fa3fbfcf53a1ec9f844a21c56c90b9437096b41061abd9bec

See more details on using hashes here.

File details

Details for the file meshkernel-2.0.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: meshkernel-2.0.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 363.3 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.13.0 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for meshkernel-2.0.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d17487a16a211e6775d6eeadc50bd3c8ea81e39b9a8c6d49fc59512a9a967992
MD5 92e2d8663c61dfdbd9dd11f3a7833c87
BLAKE2b-256 cf34e4ba2deb94bddcbdee313d602819f49554ddd20b434986f2b5f9d9512d2e

See more details on using hashes here.

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