# in Finite Element, which approximation requires less number of unknowns: B-splines vs Shape functions vs Spectral Elements

In Finite Element Analysis, one requires to approximate the solution in terms of basis functions. My questions is, which method in general is better? by 'better', I mean which involves less number of unknowns to yield a certain accuracy? Let the solution of the problem be continuous and smooth in the domain of interest. I know this depends on the function which is to be approximated, But in general one of the methods should be superior. My guess is that B-splines require less number of unknowns because they do not require the all higher derivatives of the approximation be continuous as opposed to spectral elements. See e.g.

https://web.njit.edu/~vb82/Teaching/SPRING2016/MATH340Lab/Lab7/html/Lab7Solution_withfuncs.html

• The least number of unknowns is for constant elements (one per element), which is essentially finite volumes or discontinuous galerkin. However the asymptotic convergence of those is not very good. Higher order polynomials have more degrees of freedom (e.g. in 2D: 1, 3, 6, 10, 15) and thus result in more unknowns, but at the same time they offer better convergence as the size of the elements decreases. So there is no "best", it depends on your setting. Aug 23, 2023 at 10:36
• @lightxbulb I mean, the total number of unknowns in the whole domain, not the number of unknowns per element. Aug 23, 2023 at 12:01
• Just counting DoFs is not a useful metric. If that's your goal, use a global Fourier basis. What matters more is how long it actually takes you to compute something with the basis you choose. Aug 23, 2023 at 19:38
• @HoseinJavanmardi Choosing basis functions that aren't (as) almost-orthogonal (e.g. for higher order continuity) would make a tangent matrix more dense, which increases the computational effort to solve the system even if the the number of unknowns are unchanged. This is just to say that your definition of "better/superior" by just counting DOFs isn't typically what anyone else would care about, but rather how long it takes to solve. Aug 23, 2023 at 22:27
• For a steady-state linear problem that discretizes to a system $Ax=b$, solving a $1{,}000\times1{,}000$ dense system will take far more time than even a $10{,}000\times10{,}000$ system that is very sparse. This is because the typical algorithms for solving these systems in PDE applications rely only on computing the matrix-vector products $Av$ instead of constructing $A^{-1}$ directly, so the biggest bottleneck is how fast you can compute $Av$, which is faster if $A$ is sparse. Aug 24, 2023 at 15:19

However the reason for choosing higher order polynomials is to get a better decrease rate of the error with the decrease of the size of the elements, so the goal for choosing higher order elements is slightly different. A fairer comparison there would be to compare linear elements on a mesh with $$n$$ vertices vs quadratic element on a mesh where the number of vertices plus edges sums up to $$n$$. Then you would expect the latter to get closer to the true solution as you decrease the element size.
In FEM if you have $$m$$ Dirichlet nodes and $$(n-m)$$ independent nodes, you get $$n-m$$ unknowns, and a (sparse) matrix that is $$(n-m)\times (n-m)$$. While you can grow the number of unknowns in order to get a better approximation, this generally also makes the solving process slower. If $$m\ll n$$ then you may opt to use Green's functions for the solution instead, which result in systems of size $$m\times m$$. These systems are typically dense, but as long as $$m$$ is small enough you can use a direct solver on those. The main practical issue there is whether you can construct the Green's functions efficiently. For example one can do so for the Poisson equation on a rectangular domain with a regular grid and with zero Dirichlet, reflecting, or periodic boundary conditions at the rectangle's boundaries, by using respectively the discrete sine, cosine, or Fourier transform (then the resulting solution strategy is typically termed fast Poisson solver. In the general case one has to compute columns of the generalised inverse of the non-reduced FDM/FEM/FVM matrix in order to get the Green's functions, so this can be more expensive than just running an iterative solver on the sparse formulation.