B-spline basis functions to interpolate nodal values (control points) in 1d

47 views
Skip to first unread message

Simon

unread,
Feb 15, 2023, 8:50:19 AM2/15/23
to deal.II User Group
Dear all,

my objective is to do an 1d-approximation
F(x) = N_i(x) P_i
where N_i are cubic B-spline basis functions and P_i known nodal values (control points).
To assemble my linear system, I have to compute the first and second derivatives of F at the quadrature points of the triangulation.
Since the number of control points P_i is quite moderate (less than 20), I think it is reasonable to evaluate all basis functions N_i in lieu of implementing an entire finite element class.

I scanned the dealii manual but could only find a CSpline class.
Just to make sure:
B-Spline (basis) functions are not implemented in dealii yet, right?

So I probably will have to rely on an external library.
Can someone make a library recommendation?
I read about tinyspline and splinelib, but have no knowledge regarding their performance, or if they are appropriate for usage in a dealii-program.

As I said, I mainly want to
(i) interpolate control points with B-spline basis functions and
(ii) evaluate first and second derivatives at arbitrary points in the knot interval.

Best
Simon

Wolfgang Bangerth

unread,
Feb 19, 2023, 2:45:38 PM2/19/23
to dea...@googlegroups.com
On 2/15/23 06:50, Simon wrote:
>
> my objective is to do an 1d-approximation
> F(x) = N_i(x) P_i
> where N_i are cubic B-spline basis functions and P_i known nodal values
> (control points).
> To assemble my linear system, I have to compute the first and second
> derivatives of F at the quadrature points of the triangulation.
> Since the number of control points P_i is quite moderate (less than 20), I
> think it is reasonable to evaluate all basis functions N_i in lieu of
> implementing an entire finite element class.
>
> I scanned the dealii manual but could only find a CSpline class
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fcurrent%2Fdoxygen%2Fdeal.II%2FclassFunctions_1_1CSpline.html&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C9ac052e12d814289384108db0f5b957c%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638120658249146546%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NqcY%2FpN5QJnuhVYWG3BiLLKxYUZIZNyYDCKKEDq3iYI%3D&reserved=0>.
> Just to make sure:
> B-Spline (basis) functions are not implemented in dealii yet, right?

Simon -- that is correct. I suspect (but don't know) that you also want to use
spline basis functions that span across more than one cell; that is an
uncommon operation for finite element libraries and there is not much support
implemented for these kinds of things -- in particular, there are none of the
spline basis functions one might use for this.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Luca Heltai

unread,
Feb 20, 2023, 3:43:07 AM2/20/23
to Deal.II Users
Simon,

If you are willing to do some work, Bernstein basis functions are implemented in deal.II (which are B-spline basis with C0 continuity).

You could exploit BezierExtractor

https://onlinelibrary.wiley.com/doi/full/10.1002/nme.2968

and use the facilities of deal.II to work with cubic B-Splines. This is implemented in deal.II, and available with poor documentation, here:

https://github.com/mathLab/IGA-dealii

You can learn about the data structures by looking at

https://iris.sissa.it/retrieve/dd8a4bf7-09b3-20a0-e053-d805fe0a8cb0/1963_35160_Tezzele_tesi.pdf

Let me know if you need assistance in using the relative classes.

There are two examples that solve a poisson problem and an obstacle problem. We’ll try to make this a gallery example to make it more accessible.

L.
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
> --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/94d2fa54-291e-97dd-189d-01826aa687a2%40colostate.edu.

Reply all
Reply to author
Forward
0 new messages