Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine tensor transform interface #170

Merged
merged 16 commits into from
Nov 16, 2023
Merged

Refine tensor transform interface #170

merged 16 commits into from
Nov 16, 2023

Conversation

dlfivefifty
Copy link
Member

This refines the tensor transform interface. In particular:

  1. grid(P) and grid(P,n::Int) return just a vector of points
  2. grid(P, (n,)), grid(P, (m,n)) etc. return a tuple of vectors of points in each dimension.
  3. Similar for plan_grid_transform.

Thus one can do a 1D transform that gets out at least 5 coefficients via eg:

x = grid(P, 5)
P = plan_transform(P, 5)
P * f.(x)

or a 2D transform

x,y = grid(P, (5,6))
P = plan_transform(P, (5,6))
P * f.(x, y')

Note the "1D" and "2D" don't necessarily mean dimension of the geometry, eg, when combined with MultivariateOrthogonalPolynomials.jl the interface of a tensor product of disks would be:

Z = Zernike()
x,y = grid(Z, (Block(5),Block(6)))
P = plan_transform(Z, (Block(5),Block(6)))
P * f.(x, y')

@TSGut this might be of use for you.

@dlfivefifty
Copy link
Member Author

Now only overload plan_transform and grid: plan_grid_transform won't be used anymore.

A consequence is that the default fallback transform of using Vandermonde+LeastSquares creates the grid twice. Whooptydoo.

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (5bcf055) 91.59% compared to head (88f606e) 91.69%.
Report is 8 commits behind head on master.

Files Patch % Lines
ext/ContinuumArraysMakieExt.jl 0.00% 3 Missing ⚠️
src/maps.jl 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #170      +/-   ##
==========================================
+ Coverage   91.59%   91.69%   +0.10%     
==========================================
  Files          11       11              
  Lines         761      783      +22     
==========================================
+ Hits          697      718      +21     
- Misses         64       65       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dlfivefifty dlfivefifty merged commit c42fedf into master Nov 16, 2023
6 checks passed
@dlfivefifty dlfivefifty deleted the dl/newgid branch November 16, 2023 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant