SSplines
is a small Python library for the evaluation of simplex splines over
the Powell-Sabin 12-split of a triangle. The evaluation makes use of the
convenient matrix recurrence relation for the S-spline basis functions for
constant, linear and quadratic simplex splines as developed in this
paper by
Cohen, Lyche and Reisenfeld.
At the moment, the SSpline library features:
SplineFunction
objects representing a callable spline function over a single triangle, and theSplineSpace
object facilitating instantiation of several functions in the same spline space.- Evaluation and differentiation of constant, linear and quadratic simplex splines with convenient short cuts for gradient, divergence and laplacian operators.
- Conversion between quadratic S-spline basis and the quadratic Hermite nodal basis often employed in finite element methods.
- A Method for sampling of triangles for ease of evaluation and visualization.
- Some basic subdomain integration methods over the Powell--Sabin 12-split for use in finite element computations.
- Methods for returning the polynomial restrictions of a spline to each of the twelve sub-triangles of the split.
Install using pip
with the command:
pip install SSplines
The package can be installed locally by cloning the repository:
git clone https://github.com/qTipTip/SSplines2
The directory contains a setup-script, which can be run using
python setup.py install