Skip to content

Instantly share code, notes, and snippets.

View ottarph's full-sized avatar

Ottar Hellan ottarph

  • Oslo, Norway
View GitHub Profile
@ottarph
ottarph / custom_partitioning.py
Created April 28, 2026 14:29
Quick demo of custom DOLFINx mesh partitioning in python.
# Author Ottar Hellan
# SPDX license identifier: MIT
# This example demonstrates how to implement custom partitioning strategies in DOLFINx without ghosting.
# Based on https://jsdokken.com/dolfinx_docs/meshes.html#custom-partitioning,
# Jørgen S. Dokken, 2023, under MIT License.
# Tested with DOLFINx 0.10.0.
# Example use: mpirun -n 4 python3 custom_partitioning.py