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
0 votes
0 answers
34 views

Extending Matlab's pchip to 2D

In The Matlab Guide, chapter 3, section 4, Moler describes a piecewise cubic Hermite interpolator $i$ which Never leaves the data bounds on each subinterval, e.g. $t \in [t_k, t_{k+1}] \implies i(t) \...
user14717's user avatar
  • 2,155
1 vote
1 answer
139 views

Nodal functionals in finite element analysis

I have a quintic Hermite basis functions [-1,1] for FEM applications, I wanted to check if it's nodal functionals are proper. Could someone explain nodal functionals in details and give an example of ...
Nomad's user avatar
  • 65
0 votes
1 answer
146 views

Quintic Hermite shape functions

I am trying to use quintic Hermite basis functions for FEM applications, could someone please direct me to the general formula that would help me generate quintic Hermite shape functions? In natural ...
Nomad's user avatar
  • 65
1 vote
0 answers
66 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
98 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,155
0 votes
2 answers
136 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
  • 97
4 votes
2 answers
386 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
122 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
503 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
228 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
91 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,365
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
1k 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
  • 421
2 votes
1 answer
94 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
210 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,670
1 vote
2 answers
239 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
  • 421
0 votes
0 answers
101 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
455 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
297 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
  • 2,122
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,058
4 votes
2 answers
397 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
305 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
112 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
  • 333
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
  • 333
4 votes
2 answers
192 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
  • 333
5 votes
3 answers
243 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
237 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
235 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
259 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
61 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
548 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,510
1 vote
0 answers
130 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
140 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
287 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
48 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
171 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
162 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,155
1 vote
1 answer
472 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
  • 607
2 votes
2 answers
685 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
78 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
221 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
87 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,155
3 votes
1 answer
581 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
739 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
119 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
2k 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
161 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,155
2 votes
1 answer
178 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,048