/SSplines

A Python library for the evaluation of C1 quadratic simplex splines on the PS12

Primary LanguagePython

SSplines

Simplex Splines on the Powell-Sabin 12-split

Build Status Coverage Status Downloads

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.

Functionality

At the moment, the SSpline library features:

  1. SplineFunction objects representing a callable spline function over a single triangle, and the SplineSpace object facilitating instantiation of several functions in the same spline space.
  2. Evaluation and differentiation of constant, linear and quadratic simplex splines with convenient short cuts for gradient, divergence and laplacian operators.
  3. Conversion between quadratic S-spline basis and the quadratic Hermite nodal basis often employed in finite element methods.
  4. A Method for sampling of triangles for ease of evaluation and visualization.
  5. Some basic subdomain integration methods over the Powell--Sabin 12-split for use in finite element computations.
  6. Methods for returning the polynomial restrictions of a spline to each of the twelve sub-triangles of the split.

Installation

Pip

Install using pip with the command:

pip install SSplines

Locally

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