CutCells documentation#
CutCells is a C++20 geometry kernel with Python bindings for cutting mesh
cells by implicit level sets. It classifies every cell by Pk or analytic level
sets, selects regions such as phi < 0, phi > 0 and phi = 0, including
combinations of several level sets, and gives quadrature rules and
visualisation meshes for them. These serve downstream unfitted and immersed
finite element workflows.
pip install cutcells
Getting started#
Installation: install the wheel from PyPI, or build the C++ core and Python package in one environment.
Quickstart: cut a structured triangular mesh with a circular level set and integrate the selected part.
User guide#
Mesh views: represent background meshes with coordinates, connectivity, offsets, and VTK cell types.
Level sets: interpolate implicit geometry on a mesh, or give it analytically, name level sets, and make level sets of level sets for shapes with sharp edges.
Cut results and selections: select parts with conditions such as
result[phi < 0]or their strings, combine several level sets, pick the faces of a level set made of level sets, and infer the dimension.Quadrature and output: create quadrature rules, visualisation meshes, and VTU files.
Algorithms and scope: supported cell types, classification, and the two backends, quadrays and the lookup tables.
Tutorials#
Tutorial book: twelve chapters, each following a runnable demo in
python/demo: the workflow, measurements of degree, cell shape, points and compression, and several level sets.
Reference#
Python API overview: compact reference for the current user-facing Python objects and functions.
Current scope#
This documentation starts with the Python workflow because it is the most common entry point for CutFEMx and other runtime-quadrature users. The C++ API follows the same concepts: a background mesh, one or more level sets, selected mesh parts, and quadrature and output routines.