transform

The transform module.

class nutils.transform.TransformItem(todims, fromdims)

Bases: nutils.types.Singleton

Affine transformation.

Base class for transformations of the type \(x ↦ A x + b\).

Parameters
  • todims (int) – Dimension of the affine transformation domain.

  • fromdims (int) – Dimension of the affine transformation range.

class nutils.transform.Matrix(linear, offset)

Bases: nutils.transform.TransformItem

Affine transformation \(x ↦ A x + b\), with \(A\) an \(n×m\) matrix, \(n≥m\)

Parameters
class nutils.transform.Square(linear, offset)

Bases: nutils.transform.Matrix

Affine transformation \(x ↦ A x + b\), with \(A\) square

Parameters
class nutils.transform.Shift(offset)

Bases: nutils.transform.Square

Shift transformation \(x ↦ x + b\)

Parameters

offset (numpy.ndarray) – The offset \(b\).

class nutils.transform.Identity(ndims)

Bases: nutils.transform.Shift

Identity transformation \(x ↦ x\)

Parameters

ndims (int) – Dimension of \(x\).

class nutils.transform.Scale(scale, offset)

Bases: nutils.transform.Square

Affine transformation \(x ↦ a x + b\), with \(a\) a scalar

Parameters
class nutils.transform.Updim(linear, offset, isflipped)

Bases: nutils.transform.Matrix

Affine transformation \(x ↦ A x + b\), with \(A\) an \(n×(n-1)\) matrix

Parameters
class nutils.transform.Identifier(ndims, token)

Bases: nutils.transform.Identity

Generic identifier

This transformation serves as an element-specific or topology-specific token to form the basis of transformation lookups. Otherwise, the transform behaves like an identity.