This repository was archived by the owner on Jul 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Improve control point indexing #77
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The current status
There currently are 2 types of control point objects:
DefaultControlPoints, which is a thin wrapper around anNin+1dimensional array. This object can be indexed in the same way as the underlying array;LocallyRefinedControlPoints, which is much less structured, and can only be indexed as a matrix of size(n_control_points, Nout).
This difference in indexing can lead to confusion and messy code (as is for instance already the case in SplineGrids.plot_basis!.
Apart from indexing there is also the function obtain, which yields an Nin+1 dimensional array for any control point object (which is not allocated but exists within the control points object).
To do
- Should what is now called
obtainactually be made methods ofBase.collect? That seems sort of intuitive, althoughBase.collectI think often allocates a new array for the output. This requires some investigation into the precise intention ofBase.collect. On the other hand, it would make intuitive sense to add a call toevaluate!for the control points when callingBase.collect, but that should not be part ofobtainfor more control and avoiding unnecessary calculations. - Should all control points objects have the same indexing behavior, i.e. as if it were an array of size
(n_control_points, Nout)?
I think it makes most sense to have:
- Indexing for accessing all degrees of freedom, i.e. the active control points of each level, for all control point types as an
(n_control_points, Nout)shaped array obtainused internally for obtaining the control point grid for spline grid evaluationBase.collectfor obtaining a copy of the control point grid for spline grid evaluation with an internall call toevaluate!on the control points beforehand.- A dedicated section in the docs for control point indexing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request