splinepy.spline.Spline#
- class splinepy.spline.Spline(spline=None, **kwargs)[source]#
Bases:
SplinepyBase
,PySpline
Spline base class. Extends
PySpline
with documentation.Generally, all types of splines can be seen as mappings from a \(N_{param}\)-dimensional parametric domain \(\Omega_{param} \subset \mathbb{R}^{N_{param}}\) to a \(N_{phys}\)-dimensional physical domain \(\Omega_{phys} \subset \mathbb{R}^{N_{phys}}\), i.e.,
\[M : \Omega_{param} \to \Omega_{phys}\]splinepy
generally supports different combinations of embeddings, that is different combinations of dimensionalities \(N_{param}\) and \(N_{phys}\), up to dimension 10. The supported spline types differ in the way how the spline function \(M\) is defined. For an overview of the mathematical theories for the different types of supported splines, we refer to the documentation of the classesBSplineBase
andBezierBase
for a more in-depth discussion of the theory on B-Spline/Bezier families, as well as to their childrenBSpline
,NURBS
,Bezier
, andRationalBezier
for usage examples.- Parameters:
spline (Spline) – Initialize using another spline. Will SHARE core spline.
degrees ((para_dim,) array-like) – Keyword only parameter.
knot_vectors ((para_dim, n) list of array-like) – Keyword only parameter.
control_points ((m, dim) array-like) – Keyword only parameter.
weights ((m,) array-like) – Keyword only parameter.
- Return type:
None
Methods
Spline.basis
(queries[, nthreads])Returns basis function values on the supports of given queries.
Spline.basis_and_support
(queries[, nthreads])Returns basis function values and their support ids of given queries.
Spline.basis_derivative
(queries, orders[, ...])Returns derivative of basis functions evaluated on the supports of given queries.
Spline.basis_derivative_and_support
(queries, ...)Returns derivative of basis functions and their support ids of given queries.
Clears core spline and saved data
Spline.copy
([saved_data])Returns deepcopy of stored data and newly initialized self.
Spline.derivative
(queries, orders[, nthreads])Evaluates derivatives of spline.
Spline.elevate_degrees
(parametric_dimensions)Elevate degree.
Spline.evaluate
(queries[, nthreads])Evaluates spline.
Spline.export
(fname)Export spline.
Spline.greville_abscissae
([duplicate_tolerance])Returns greville abscissae.
Spline.jacobian
(queries[, nthreads])Evaluates jacobians on spline.
Spline.mapper
(reference)Retrieve a mapper that can be used to get physical derivatives such as a gradient or hessian in physical space
Spline.proximities
(queries[, ...])Given physical coordinate, finds a parametric coordinate that maps to the nearest physical coordinate.
Spline.reduce_degrees
(parametric_dimensions)Tries to reduce degree.
Spline.sample
(resolutions[, nthreads])Uniformly sample along each parametric dimensions from spline.
Spline.show
(**kwargs)Equivalent to
Spline.showable
(**kwargs)Equivalent to
Spline.support
(queries[, nthreads])Returns basis support ids of given queries.
Spline.todict
([tolist])Return current spline as dict.
Attributes
Returns spline checker.
Returns control mesh resolutions.
Returns bounds of control points.
Returns control points.
Returns control points.
Returns spline creator Can be used to create new splines using geometric relations.
Returns Degrees.
Returns physical dimension.
Returns Degrees.
Returns spline extractor.
Returns True iff spline has knot vectors.
Returns spline integrator.
Returns True iff spline is rational.
Returns knot multiplicities.
Returns knot vectors.
Returns knot vectors.
Easy control point / weights access using (unraveled) multi index.
Name of the spline provided by cpp side as a str.
Returns parametric dimension.
Returns bounds of parametric_space.
Returns required property of current spline.
Show option manager for splines.
Spline data helper for splines.
Returns unique knots.
Returns weights.
Answers a deep philosophical question of "what am i?"
Returns weights.