Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

About mefikit

mefikit — short for Mesh and Field Kit — is a comprehensive library for generating, manipulating, and analyzing unstructured meshes together with associated scalar, vector, and tensor fields. Its goal is to provide a unified in-memory representation of meshes and fields, along with a set of robust, efficient tools that support numerical simulation workflows in research, engineering, and scientific computing.

This book documents the Python API. The heavy lifting is done by the mefikit Rust crate, which the Python bindings wrap; the same crate can be used directly from Rust for performance-critical code.

mefikit focuses on three core principles:

  1. A flexible mesh model capable of representing mixed-element unstructured meshes.
  2. A consistent field and group architecture that attaches data to mesh entities across dimensions.
  3. Zero-copy, iterator-based access patterns to efficiently navigate and process large meshes.

This design positions mefikit as a modern core library for algorithm development.

mefikit provides

  • UMesh, the unstructured mesh container supporting mixed element types, fields, and groups.
  • I/O for reading and writing meshes in various formats (VTK, VTKHDF, CGNS, MED, JSON, YAML).
  • topology tools for analyzing mesh connectivity, computing descending meshes, neighbours, domain boundaries, etc.
  • geometry tools for computing element measures, centroids, overlays, etc.
  • transfer operators for remapping fields between meshes, and meshless field gradients.
  • selections (mf.sel) for querying and filtering mesh elements based on geometric or topological criteria.

Continue to Getting Started.