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.0.tar.gz (365.9 kB view details)

Uploaded Source

Built Distribution

meshkernel-2.0.0-py3-none-win_amd64.whl (365.9 kB view details)

Uploaded Python 3 Windows x86-64

File details

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

File metadata

  • Download URL: meshkernel-2.0.0.tar.gz
  • Upload date:
  • Size: 365.9 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.0.tar.gz
Algorithm Hash digest
SHA256 71eb8affc40387527f0cf27bba321ad25a3c505ad2f8252c3c2b05055f9c2109
MD5 51b21ed1d9feb9040361275f1305df22
BLAKE2b-256 22263c4ba75f942b1049547466f3b83e611116a00d627c8903f478588c575659

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meshkernel-2.0.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 365.9 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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 16de47c9a2273da6dd4186e54438c5b0d3bf745c778701264c4c12adb9084bcb
MD5 1ddd30bb58a2a0cf11bf86f8803f9211
BLAKE2b-256 1c983275be4caeac35e2c718d2759f9c24f9d320271b0a9179010d97da5db06f

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