Skip to content

Instantly share code, notes, and snippets.

@reox
reox / pfilter.py
Created May 3, 2022 09:49
Paraview: Programmable Filter to display the CellType of unstructured grids
# This programmable filter can be used on an unstructured grid to display the
# numerical value of the cell type (i.e., tet, hex, wedge, ...)
output.CellData.append(inputs[0].CellTypes, 'Cell_type')
@reox
reox / build.sh
Created January 7, 2025 20:28
Build dovecot-fts-xapian nightly debian package
# Recommended to run in a clean environment
export EMAIL="builder@localhost"
apt update
apt dist-upgrade -y
apt install -y git git-buildpackage --no-install-recommends
git config --global user.name "Bob the Builder"
git config --global user.email "$EMAIL"
@reox
reox / doubletensorproduct.py
Last active February 10, 2025 08:18
double tensorial product for stiffness tensor from Lamé constants
import numpy as np
# 2nd order identity tensor
I = np.eye(3)
# Lamé Constants
lam_0 = 456
mu_0 = 123
print(f"G = {mu_0}")