Questions tagged [interpolation]

Interpolation is the process of estimating the values of a function, when the function's values are known only at a particular set of points. Questions on interpolation in one or more dimensions, as well as algorithms for doing so, should have this tag.

Filter by
Sorted by
Tagged with
1 vote
0 answers
59 views

shape functions of interpolating a piecewise polynomial with continuous 0-th and 1-st derivatives

shape functions are the basis functions that interpolate a function in a subdomain using polynomials. linear interpolation is probably the most convenient approach which results in so-called "...
Hosein Javanmardi's user avatar
3 votes
0 answers
83 views

Why weighted harmonic mean for pchip slopes leads to monotone interpolator

In Fritsch and Carlson's paper on monotone interpolation, they identify numerous conditions under which a cubic Hermite interpolator will be monotone. For example: On the subinterval $[t_i, t_{i+1}]$ ...
user14717's user avatar
  • 2,125
0 votes
2 answers
111 views

Conservative interpolation from a 1D grid to another 1D grid

I am given with a function $f(x)$ on a grid $X_{old}\in \{x_{min},x_{max}\}$ with a non uniform spacing. I need to interpolate that function on a new log-spaced grid $X_{new}\in\{x^{\prime}_{min},x^{\...
Sayan's user avatar
  • 87
4 votes
2 answers
267 views

Chebyshev/Lagrange polynomials in spectral methods

I am currently trying to familiarise myself with (Pseudo-)Spectral Methods for solving differential equations. Now, I am struggling to understand some obviously crucial concept of this approach. The ...
Octavius's user avatar
  • 185
3 votes
1 answer
116 views

Interpolating 2D data on a hemisphere in order to have $C^2$ function but no overshoot

I am interpolating a 2D dataset on a hemisphere, and I am currently using scipy.Rbf that I like for its simplicity. I am defining the norm of the interpolator with ...
Balfar's user avatar
  • 63
1 vote
3 answers
315 views

If FEM is exact at the nodes, why do first and second-order elements give very different results?

I'm looking at the solution to a structural mechanics problem that is modeled with first-order elements and then as a comparison with second-order elements. It is clear that the first-order elements ...
Tepa's user avatar
  • 31
0 votes
1 answer
148 views

Is 'natural neighbor' interpolation better than linear for unstructured function interpolation?

Natural neighbor interpolation is defined here, it is an intriguing method that uses voronoi diagrams. Notably it is smooth almost everywhere whereas linear interpolation is only piecewise linear. I ...
Sam Christensen's user avatar
2 votes
0 answers
88 views

Modal representations of nodal tensor product Galerkin elements

Nodal discontinuous Galerkin methods on simplices, like those described in Hesthaven and Warburton, have the nice property that the number of nodes is equal to the minimum number needed to represent a ...
Aurelius's user avatar
  • 2,345
1 vote
0 answers
41 views

Integral from function approximations

I have some data which I cannot manage to model and fit with a known function, so let’s say that they are a sample from the unknow function $f(x)$, which look a sort of skewed bell-shaped distribution....
Stefano Barone's user avatar
0 votes
1 answer
770 views

Fitting a monotonically increasing spline function

I want to fit a monotonically increasing smooth spline function for a dataset Code: ...
Natasha's user avatar
  • 491
2 votes
1 answer
84 views

Interpolation of 1D solution from an original grid to a new grid

I have a solution of a 1D wave on a grid (tangent hyperbolic variation) and now I want to interpolate the obtained solution to a new grid with the same number of points as the previous grid but the ...
Avii's user avatar
  • 121
5 votes
2 answers
202 views

Which way is the right way to compute the integrals in finite element methods?

Finite element methods involve integrals of functions that are not polynomials, and these integrals must be computed numerically. For example, suppose that $f$ is the right-hand side of a Poisson ...
shuhalo's user avatar
  • 3,590
1 vote
2 answers
203 views

Finding weighted average of curves

This is related to my previous post here I have a dataset with values of multiple curves. An example plot is shown below. I want to scale the curves (move up/down) so that all curves overlap. The ...
Natasha's user avatar
  • 491
0 votes
0 answers
84 views

Advance a Interpolation

Note; No special knowledge of Pykrige is needed to answer the question, as I already mention examples in the question! Hi I would like to use Universal Kriging in my code. For this I have data that ...
Weiss's user avatar
  • 1
2 votes
0 answers
364 views

How can I reduce the artifact in "Thin Plate Spline" interpolation?

At the Top "right", there is the 2D-density plot of the recorded data (actual), fewer in number. Recorded data has been sampled a on the 8 arms of a regular octagon. These 8 arms are placed ...
Subhadip Saha's user avatar
1 vote
0 answers
75 views

Generate polynomial basis through a sequence of SVD

I need help to understand how to use the result given by an algorithm for constructing an orthonormal polynomial basis over $L^{2}(X)$, where $X\subset\mathbb{R}^2$, with respect to the inner product $...
Raibyo's user avatar
  • 219
2 votes
1 answer
221 views

Prolongation and restriction operators in multigrid for high order PDEs

If I have the Poisson equation $\Delta u = f$ a standard transfer operator (for a regular grid) is the full weighting/bilinear interpolation scheme: $$K = \frac{1}{4}\begin{bmatrix}\frac{1}{4} & \...
lightxbulb's user avatar
0 votes
0 answers
176 views

Interpolation question

I have a set of data $(x_i,y_i,y'_i)$, $i=1,\dots,N$ and I want to fit an interpolating curve $f(x)$ which matches both the data $y_i$ and the first derivatives $y'_i$ at the nodes $x_i$, \begin{align}...
vibe's user avatar
  • 1,038
4 votes
2 answers
365 views

Storing large amounts of interpolation data

Overview and Prior Research I am looking for a way store a (in principle arbitrarily) large "3D-table" for interpolation/ lookup in combination with python. I have considered CSV files, but,...
Phteven's user avatar
  • 41
1 vote
1 answer
236 views

QUICK scheme derivation

I am reading about QUICK scheme for calculating the value of unknown variable $\phi$ in finite volume method. Given a locally one dimensional flow, we assume the value of $\phi$ is computed as a 2nd ...
Algo's user avatar
  • 304
1 vote
1 answer
102 views

Classical global estimate for $H^1$ error

I'm having lots of troubles in understanding the proof the estimation of the classical $H^1$ error using finite elements of degree $r$. $$||u-u_h||_{H^1(\Omega)} \leq \frac{M}{\alpha} C h^r |u|_{H^{r+...
FEGirl's user avatar
  • 261
1 vote
2 answers
177 views

Sum of norms over elements is not equal to norm over the whole $\Omega$

In my finite element notes, after the proof of the global estimate for the interpolation error, assuming a regular triangulation with triangles $T_m$: $$\sum_m|v - \Pi_h^r v|_{s,p,T_m} \leq \sigma^{-s}...
FEGirl's user avatar
  • 261
4 votes
2 answers
188 views

What is the difference between $u_h$ and $I_h(u)$ in finite element literature?

In finite element books, we have estimates for $$||u-u_h||$$ and also estimates for $$||u - I_h(u)||$$ where $I_h(u): V \mapsto V_h$ projects a function from the infinite dimensional space to the ...
FEGirl's user avatar
  • 261
5 votes
3 answers
226 views

Automatic finite differences

Given numbers $x, y \in \mathbb{R}$ where $$\frac{|y-x|}{|x|}$$ is small, and code that implements the function $f$ with a sequence of arithmetic operations, I would like to compute to high accuracy ...
Federico Poloni's user avatar
0 votes
0 answers
212 views

How to interpolate stress at unknown points from the stress values available based on geometrical position for constant load?

I am working on a combined contact, bending, and torsion problem. I have data on geometrical points and their instantaneous stress components. However, based on the available data, I have to ...
Srikumar Gopalakrishnan's user avatar
0 votes
1 answer
208 views

What are the benefits of using machine learning for interpolation over traditional interpolation methods?

I am trying to get a better understanding of the application of function approximation with machine learning. My question is simple, how does function approximation with ML compare to traditional ...
Frosty's user avatar
  • 27
1 vote
1 answer
217 views

Shape function for quarter point element from degenerate quadrilateral

I want an element as the one shown following. Nodes 6 and 8 are in the quarter position. Whether eight node quadrilateral element or six node triangle function can be used directly? If not, how to ...
sgzslg's user avatar
  • 19
0 votes
1 answer
50 views

Projecting nodal solution to gauss points with certain accuracy

I am having a problem that was also mentioned at the accepted answer to this question by Wolfgang Bangerth. I need to calculate, as it was specified at the question at the link, F1 integral and for ...
noname 's user avatar
8 votes
5 answers
488 views

Polynomial interpolation on a regular hexagon

Background We know a function $f$ on the vertices of a regular hexagon, as follows $$\left( 1, \ 0, \ f_{0}\right), \ \left( \frac{1}{2}, \ \frac{\sqrt{3}}{2}, \ f_{1}\right), \ \left( - \frac{1}...
nicoguaro's user avatar
  • 8,312
1 vote
0 answers
123 views

Spline interpolation for vector-valued data in 3D space

I have output from a 3D linear elasticity finite element simulation which uses linear tetrahedral elements, such that the displacement is continuous over the nodes but the gradient is not ($C_0$ ...
Charlie S's user avatar
  • 661
3 votes
1 answer
135 views

At which stage to interpolate?

Assume I have a multidimensional grid $G$. I consider two functions $f(x)$ and $g(x)$. I have solved the values for the functions over all grid points $x \in G$. Let me now be interested in some third ...
fes's user avatar
  • 141
0 votes
1 answer
237 views

Finite element interpolation

I have a finite element solver that I implemented in MATLAB. I am calculating a specific potential function that is constant in each tetrahedral element. The question is, I want to be able to ...
strahd's user avatar
  • 11
1 vote
0 answers
46 views

Interpolate location based on triangular sensor array

There are 3 sensors (A, B, C) on a plane, located in the corners of a (known) equilateral triangle. I want to calculate the (2D) location of an object (X) inside that triangle. One sensor returns one ...
Prima's user avatar
  • 11
1 vote
0 answers
148 views

Interpolation of a Concave Mesh

I would like to have an algorithm that interpolates the values attached to nodes in a concave mesh mesh. To be me precise, assume we have a point cloud P (e.g. in 3 dimensions) and a list of edges E ...
ls.'s user avatar
  • 119
4 votes
4 answers
161 views

Getting torsion and curvature out of ODE solution skeleton

Suppose I have solved an ODE $v'(t) = f(t,x)$ via some adaptive stepper, such as RK4 or Dormand-Prince, generating a list of points $\{(t_i, v_i, v_i' = f(t_i, v_i))\}_{i=0}^{n-1}$. I wish to use this ...
user14717's user avatar
  • 2,125
1 vote
1 answer
423 views

Factorization of cubic spline interpolation matrix

In cubic spline interpolation, we use the set of knots and function values $(x_i,y_i),i=1,...,n$ to construct a (tridiagonal) system of equations for the unknowns $\sigma_i$: $$ h_{i-1}\sigma_{i-1} + ...
IPribec's user avatar
  • 454
2 votes
2 answers
529 views

What are the best ways to interpolate a vector field inside (convex) polygons?

I want to interpolate a vector field inside convex polygons in a polygonal mesh. For triangular meshes the scheme uses a piecewise constant interpolation in the triangle, discretized at the center of ...
allo's user avatar
  • 607
1 vote
1 answer
2k views

What is the relationship between shape functions, interpolation functions, and degrees of freedom?

I am a newbie in FEM. I would like to get clarity regarding a few questions on shape functions in this post (please use as simple language as possible). What is the relation between Shape function ...
ArbitraryConstant's user avatar
1 vote
0 answers
77 views

How to approach geographic data interpolation by distance?

let's say I have a set of geographic locations (lat, lng) resulting from a query. Those locations have some kind of internal ranking, my set is sorted by this number in a descending order. Now I'm ...
poindls's user avatar
  • 11
11 votes
1 answer
214 views

Implications of thermodynamic inconsistency in CFD calculations

During my PhD work, I had to use tabulated values of thermodynamic properties of gases in some Computational Fluid Dynamics (CFD in short) simulations. My tables are discretized in temperature and ...
iterrate's user avatar
  • 111
1 vote
1 answer
81 views

Monotonicity preserving interpolant in 1D

I have a dataset $\{x_i, y_i\}_{i=0}^{n-1}$ where $x_0 < x_1 < \cdots x_{n-1}$ (not uniformly spaced), and, in addition $y_0 < y_1 < \cdots y_{n-1}$. So it feels natural to assume that $...
user14717's user avatar
  • 2,125
3 votes
1 answer
549 views

Get the roots of a Hermite interpolating polynomial

I am using Python 3.7 to write a program that requires me to calculate the root of the Hermite interpolating polynomial, given two points $\epsilon_0$, $\epsilon_1$, the function ($d(\epsilon_0)$,$d(\...
Mainak's user avatar
  • 181
1 vote
3 answers
656 views

Bilinear interpolation for large grids

I need to make a bilinear interpolation of a function $Y(i,j)$ tabulated on a $100\times 100$ grid. I tried to do it with the Fortran polin2.f and ...
user32191's user avatar
3 votes
2 answers
117 views

How to reconstruct a 2D field from its integral?

General question I work on the plane where I have a two-dimensional shape $V$ that is cut in a collection of parts $\{V_i\}$ that do not overlap $ V_i ~~\text{s.t.}~~ \bigcup_i \overline{V}_i = \...
Gael Lorieul's user avatar
3 votes
2 answers
1k views

Interpolation vs. Neural network

I am seeking knowledge from the community. I am solving a transport PDE (conservation of solute mass) using COMSOL. At each Newton-Raphson iteration, I need to update a constant called $Kd$ for some ...
Daniel's user avatar
  • 99
3 votes
0 answers
155 views

Derivative of Whittaker-Shannon interpolant

Last time we looked at how to improve the accuracy of Whittaker-Shannon interpolation, where user njuffa demonstrated that judicious use of sin_pi could greatly ...
user14717's user avatar
  • 2,125
2 votes
1 answer
161 views

Interpolating the gradient of a cylindrically symmetric potential field expected obey the Laplace equation, especially near/across r=0

The script below tries to implement a Jacobi iterative relaxation of a potential field for an electrostatic lens. In order to plot electric field lines and calculate trajectories for charged particles,...
uhoh's user avatar
  • 1,016
2 votes
1 answer
7k views

Gnuplot: How can I fit a range of points (out of the entire data) to a function?

I have a set of data obtained for the I-V characteristics of an LED. ...
ntk47's user avatar
  • 91
0 votes
0 answers
49 views

extrapolation/interpolation in fmincg.m

Can you tell me these equations come from where in MATLAB fmincg.m? ...
lightmoon2076's user avatar
0 votes
1 answer
96 views

Interpolation of function onto mesh gives different results, depending on mesh density

I wanted to test the numerical accuracy of my program. For that I wanted to interpolate the function $$f=I_0\exp\left(-100x^2\right)\exp(-100y^2)$$ onto a grid, defined on $$\Omega=[0,1]^2$$ by using ...
arc_lupus's user avatar
  • 543