`meshkernel` is a library which can be used to manipulate meshes.
Project description
MeshKernelPy
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.
Building linux wheels
To deploy Linux wheels to PyPI, we provide a Docker image that is based on manylinux2014_x86_64. This image includes cmake and boost, which are necessary for compiling the native MeshKernel library (written in C++). To build the Docker image, please follow these steps:
cd scripts
docker build --progress=plain ./scripts -t build_linux_library
cd ..
Once the Docker image has been built, build the linux wheels using the following command:
docker run -v %cd%:/root --rm build_linux_library
The deployable linux wheels will be located in dist/wheelhouse
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file meshkernel-2.0.2.tar.gz
.
File metadata
- Download URL: meshkernel-2.0.2.tar.gz
- Upload date:
- Size: 364.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17565ea786d1247b6070f3c63df3a40b008b7a0d9b97e917bcd1674b42cf670f |
|
MD5 | 79bf86d7b8bf695889b4efa7e51d90c3 |
|
BLAKE2b-256 | 37219037f07ecdd0cb962f0d0c0922d3b01338e98cadaaa8fd2f7eff4ad1c0b7 |
File details
Details for the file meshkernel-2.0.2-py3-none-win_amd64.whl
.
File metadata
- Download URL: meshkernel-2.0.2-py3-none-win_amd64.whl
- Upload date:
- Size: 362.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04a200ebe2a9302f15128cb8ce29f0267e323d0941e3b2612a7369f25ff85738 |
|
MD5 | bc6a305b2d73c0ef0a64ea6f36c3c9af |
|
BLAKE2b-256 | 1d66b2812f53d81d178c32afaf7cb686021c3e009fcf8c18002601812dc6b84e |
File details
Details for the file meshkernel-2.0.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: meshkernel-2.0.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 522.7 kB
- Tags: Python 3, manylinux: glibc 2.17+ 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 710b5541d0d67eafc3b75bbf9e7fa944430a3d9f57a9779c88431f977d99dc89 |
|
MD5 | ad04326a51976da64fae716a3f5805da |
|
BLAKE2b-256 | 06656957b53484b33ceb03870878883946d314210fb7857ef87cbf8ca81e16bd |