Skip to main content

A simple tool to convert mesh created from Gmsh to XDMF for use in FEniCS

Project description

meshx

A simple tool to convert mesh created from Gmsh to XDMF for use in FEniCS. This work is derived from the work done during my GSoC project and is based on the following snippet of code made by Michal Habera.

Getting Started

To use this tool you have to use the docker image provided here. It has all the correct version of different libraries that are supported by this tool.

Installing

You can install this with the following commands:

sudo -H pip install meshx

Running

Run the following in the directory which contains the .msh file.

meshx plate.msh

Example problem:

cd demo/poisson_problem
meshx plate.msh

This command will give you 2 folders -

  1. mesh - This folder will contain the data that we will use in the script i.e, the XDMF files for different entities of mesh and the JSON file containing the corresponding tag names and tag values.
  2. sub_domains - This folder will contain the XDMF files of different subdomains marked. These files can be visualised in Paraview for validating the correctness of the marked subdomain.
python3 main.py

Notes

This repository is tested with the Docker image provided here. This Docker image has all the correct version of libraries required for this tool. If you want to use this tool with your Docker image then please install all the different libraries mentioned in the above repository.

Development

Install the repository in editable mode for development. Go to the root folder containing setup.py and run the following in terminal.

sudo -H pip install -e .

Authors

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

meshx-1.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

meshx-1.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file meshx-1.2.tar.gz.

File metadata

  • Download URL: meshx-1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.7

File hashes

Hashes for meshx-1.2.tar.gz
Algorithm Hash digest
SHA256 cfd34f8317a9dceec1ebf4a5b609d12ac87f76fff8557ff81070c03600e5ab8c
MD5 69b76435217c2a81aacfaa794d943a31
BLAKE2b-256 3ec89cf3c92d28b89f4292278943a1ace29b753109913aecdbae8c5c7a601888

See more details on using hashes here.

File details

Details for the file meshx-1.2-py3-none-any.whl.

File metadata

  • Download URL: meshx-1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.7

File hashes

Hashes for meshx-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f2039c41b2bd695e2e5101e07448a223008f35b347f2221d1ac6da42dd449abd
MD5 4f3d557bac36a67db1a2d061917c24a3
BLAKE2b-256 c80c3660c98ca1bcbc049d449a6b6c06d99a6219ee9d4e9b666748b7266316f2

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