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
4
votes
2answers
211 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,...
1
vote
1answer
54 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 ...
1
vote
2answers
165 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}...
1
vote
1answer
90 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+...
4
votes
2answers
166 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 ...
5
votes
3answers
164 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 ...
0
votes
0answers
101 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 ...
0
votes
1answer
133 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 ...
0
votes
2answers
451 views

How to interpolate a set of points with a continuous closed B-spline curve?

I have been learining the NURBS theory by the classical textbook "The NURBS Book" this year. In the chapter 9, the author introduced the method of non-rational B-spline curve interpolation ...
1
vote
1answer
104 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 ...
8
votes
5answers
271 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}...
0
votes
1answer
41 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 ...
1
vote
0answers
52 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$ ...
3
votes
1answer
126 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 ...
0
votes
1answer
107 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 ...
1
vote
0answers
40 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 ...
2
votes
1answer
660 views

Interpolation using compactly supported radial basis function

I have been struggling for two days with the following problem. I would like to do a $d$-dimensional interpolation over some data. I tried first to use polyharmonic splines, but when the size of data ...
1
vote
0answers
69 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 ...
3
votes
4answers
140 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 ...
1
vote
1answer
152 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} + ...
1
vote
1answer
123 views

Interpolating the gradient of a cylindrically symmetric potential field that's 'supposed to' obey the Laplace equation?

The script below tries to implement a Jacobi iterative relaxation of a potential field for an electrostatic lens. It's hot-off-the-press and I've just started to debug and look for things to test it ...
2
votes
2answers
228 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 ...
1
vote
1answer
824 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 ...
5
votes
2answers
2k views

Minimal surface solution in Python

Note: this question was also posted in StackOverflow and math.stackexchange. I have a set of 3D points defining a 3D contour, as shown below. The points in this contour lie in their best-fit plane ...
11
votes
1answer
199 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 ...
1
vote
0answers
72 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 ...
6
votes
2answers
11k views

Linear interpolation in Fortran

Is there a Fortran subroutine which performs linear interpolation in one-dimenional data? I need something similar to MATLAB function interp1.
1
vote
1answer
57 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 $...
1
vote
3answers
403 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 ...
3
votes
2answers
113 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 = \...
3
votes
1answer
395 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(\...
4
votes
1answer
493 views

Interpolating a mathematical function using a Hermite Cubic Finite Element Space

I have a Hermite Cubic Finite Element Space on a computer in the form of Matlab m-files. More specifically, I can evaluate four "shape functions" $N_1, N_2, N_3,$ and $N_4$, for which the following ...
2
votes
2answers
962 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 ...
3
votes
0answers
140 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 ...
1
vote
1answer
3k views
0
votes
0answers
43 views

extrapolation/interpolation in fmincg.m

Can you tell me these equations come from where in MATLAB fmincg.m? ...
0
votes
1answer
86 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 ...
0
votes
1answer
176 views

Creating an Interpolation of a w = f(x,y,z) function

I am trying to finish a series of interpolation functions. The problem is more related with organizing the data than how to do the interpolations. Using the RegularGridInterpolator, I created this ...
0
votes
1answer
2k views

Problems with python's interp 2D

I am writing some functions to interpolate data. While using interp2D, somehow, a sample matrix works but when I change the size of the matrix, it returns an error. ...
1
vote
0answers
90 views

Grid Data Interpolation

What are the most sophisticated methods for interpolating a scalar field say Electric or Magnetic Field on a 3-D grid? I have scalar data on a meshgrid with equal spacing. I would like to use an ...
0
votes
0answers
39 views

Cardinal B-Splines with derivative information

Have Schoenberg's cardinal B-splines been extended to accept derivative information at each knot, similar to how Lagrange interpolation can be improved by Hermite interpolation?
3
votes
0answers
118 views

WENO5 scheme in a staggered grid

I'm trying to use the finite-difference WENO scheme to solve the 2D density conservation law with axial symmetry (coordinates $r,z$): $\frac{\partial \rho}{\partial t}+\nabla \cdot (\rho \vec{v}) = \...
6
votes
1answer
1k views

Grid mapping from an unstructured triangular mesh to a regular rectangular mesh

I am modeling fracture propagation using a 2-D dynamic unstructured grid. As the fracture propagates over time, the elements move accordingly. For a given time step, I would like to interpolate the ...
1
vote
1answer
229 views

Line integral along the edge of an isoparametrically mapped quadrilateral

I need to integrate a function along the edge of a quadrilateral (boundary integral). For example, the function is $f(x,y)=x^3+y^3$, the quadrilateral coordinates are $(0,0),(2,-1),(3,2),(1,3)$ and ...
3
votes
2answers
233 views

Given x,y,z data of a periodic object, calculate the period of the object (if possible)

So the problem I am working on is as such. Given the x,y,z data of a periodic object over time (from the origin in 3d space) (need not be uniform), calculate the period of the object (if the data ...
0
votes
2answers
240 views

How to represent CFD result when I use grid-centered FVM?

My variables are stored at the center of the cells. How can I transfer these values to grid points? If I calculate the algebraic average value there may be a shock.
16
votes
6answers
2k views

Example of a continuous function that is difficult to approximate with polynomials

For teaching purposes I'd need a continuous function of a single variable that is "difficult" to approximate with polynomials, i.e. one would need very high powers in a power series to "fit" this ...
5
votes
2answers
1k views

Interpolation by Solving a Minimization Problem (Optimization)

I will try to give the motivation behind this problem and later the math formality. Given a grayscale image (1 Channel - $M \times N$ Matrix). Someone marks some pixels as anchors. Now, you need to ...
5
votes
0answers
698 views

Cressman interpolation and objective analysis

I have read this question and answer – Interpolation of scattered data to a regular grid in python and I am doing something similar as I have temperature values of the atmosphere at different heights ...
5
votes
2answers
178 views

Polynomial approximation spaces

I often see people using products of 1-D polynomials to do interpolation or projection of smooth multivariate functions over grids or cells because it is intuitive and simple to implement. What are ...