5
votes
If FEM is exact at the nodes, why do first and second-order elements give very different results?
They should both converge to the same limit solution, but are expected to do so at different rates of convergence.
The best way to verify the convergence rates is to use a test-setting with known ...
5
votes
Which way is the right way to compute the integrals in finite element methods?
Quadrature and replacing the integrand by a polynomial are identical. That is how quadrature rules are derived.
To see why this is true remember that quadrature evaluates the integrand at only a ...
4
votes
Interpolation of 1D solution from an original grid to a new grid
A "better technique" is rather subjective. You mean faster, more accurate, easier to program, something else??
Since it's only 1-D, the numerical cost is small (compared to 2D/3D) and there ...
4
votes
Accepted
Chebyshev/Lagrange polynomials in spectral methods
Your understanding is perfectly fine, except for the last statement that Lagrange polynomials turn out to be a more suitable choice. In fact, both methods, the modal and the nodal expansion, have ...
3
votes
Chebyshev/Lagrange polynomials in spectral methods
To complete david's answer:
References: Canuto et al., Spectral Methods
Fundamentals in Single Domains
We consider the Burgers equation
\begin{align}
\text{advective form}: \qquad \frac{\partial u}{\...
3
votes
Accepted
Fitting a monotonically increasing spline function
A smoothing spline might be good enough in your case. For example, scipy.interpolate.UnivariateSpline implements this.
You can use it in the following way:
...
3
votes
If FEM is exact at the nodes, why do first and second-order elements give very different results?
The finite element solution is not, in general, exact at nodes. Perhaps this misunderstanding is caused by the fact that in some rare special cases the finite element solution can, in fact, be exact ...
3
votes
If FEM is exact at the nodes, why do first and second-order elements give very different results?
It is not true that the finite element solution is exact a nodes.
2
votes
Accepted
Finding weighted average of curves
I promised you an answer in the other question, and was just about to edit it in. Now I see you spend another 100 points as a bounty ... seems quite a serious topic to you. I'll post my promised ...
2
votes
Conservative interpolation from a 1D grid to another 1D grid
I'll add some thoughts and terminology.
First, your question doesn't make that much sense or is a bit underspecified. You are given a function values on a grid $\{x_i\}$, and you want the ...
1
vote
Conservative interpolation from a 1D grid to another 1D grid
You can't do this with interpolation. Imagine for example that you are representing the function $f(x)=x^2$ on the interval $[-1,1]$ on a mesh $X_{old}$ with a very small mesh width. This ...
1
vote
Interpolating 2D data on a hemisphere in order to have $C^2$ function but no overshoot
You may have a look at Monoton Preserving Cubic $C^1$ or Quintic Hermite $C^2$ interpolants, here.
A 1D version is available via pchip method in Matlab, here.
See also the 2D makima variant here (not ...
1
vote
Is 'natural neighbor' interpolation better than linear for unstructured function interpolation?
The main advantage of this interpolation technique is that it's independent of whatever meshing you'd have to pick for linear interpolation.
A typical extreme example would be a perfect square, where ...
1
vote
Which way is the right way to compute the integrals in finite element methods?
Personally I typically use 1, and something similar to 2/3 though it'd be more correct to say that I decompose $f$ into a polynomial series of degree $k$ and then integrate that multiplied by $p$ ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
interpolation × 194finite-element × 22
python × 21
numerics × 19
polynomials × 15
b-spline × 13
scipy × 11
finite-difference × 10
matlab × 9
integration × 8
numpy × 8
quadrature × 8
error-estimation × 7
optimization × 6
algorithms × 6
grid × 6
ode × 5
computational-physics × 5
discontinuous-galerkin × 5
multigrid × 5
linear-algebra × 4
pde × 4
fluid-dynamics × 4
c++ × 4
computational-geometry × 4