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.

learn more… | top users | synonyms

0
votes
0answers
12 views

Convergence criterion for overset grids

If there are two overset grids, how do you decide whether convergence is reached or not? What I did was, after interpolating from one grid to another, I check the rms of conservative variables and if ...
2
votes
1answer
97 views

Is there a Gauss-Laguerre integration routine in Python?

I am reading the book "Numerical Recipes in Fortran 77: The Art of Scientific Computing" (Second Edition) and I came across some methods for numerical integration of 1D functions. More specifically ...
5
votes
1answer
88 views

What spline functions are used in Section 13.9 of “Numerical Recipes in C”?

I asked a similar question on MathSE but with more added fluff, but didn't really get any straight answers, so I figured I'd ask here. Computing Fourier coefficients of a function using the FFT is ...
0
votes
0answers
39 views

Interpolation using two chebyshev grid points

I want to do the interpolation on a interval. I can do it using with one chebyshev grid points, but i want to do it using two chebyshev grids on each half of this interval. I can do it separately for ...
1
vote
1answer
84 views

How to minimize the artefact of a cartesian to polar transform followed by a polar to cartesian transform?

I'm transforming cartesian images into polar images. (x,y) => (angle, radius) I fill the polar image by iterating on each of its pixels and filling them by doing the reverse polar transform. For a ...
0
votes
0answers
102 views

Fast way to compute barycentric lagrange interpolation

Is there any fast way to compute the barycentric Lagrange interpolation using matlab? something more faster than using repmat instead of for loops
0
votes
2answers
59 views

Interpolating irregular data on a sphere

I am trying to interpolate irregular data $f(\theta, \phi)$ on a sphere and I have so far tried a scipy approach using Kd-Trees and inverse distance weighting, which works ok - however I was wondering ...
1
vote
0answers
41 views

NURBS surface fitting for a closed region on mesh

I'm developing a tool that allows users to select a closed boundary (a polygon) on the triangle mesh and then from this boundary, generate a NURBS surface fitting the original mesh surface. My idea ...
0
votes
1answer
36 views

interpolating a periodic time series

I have a bunch of readings that run every 4 hours, however each sensor has a different offset. One sensor might read at $t = 0,4,8,12,16,20$ and another senor reads at $t = 1,5,9,13,17,21$. This ...
1
vote
1answer
246 views

How do I integrate this function in python?

Essentially this is the problem: $\hat{F}(\omega) = \int_0^{\infty} f(s)e^{-i\omega s}ds$ The function $f$ is in general complex valued. I know this looks like the fourier transform but I don't want ...
4
votes
2answers
45 views

Fitting a surface to scalar functions given on the edges of a triangulation

Given a triangle mesh $\mathcal{T}$ with vertices $V=\{\mathbf{v}_i\}_{i=1}^n$ in $\mathbb{R}^3$ and triangles $T_{ijk}=[\mathbf{v}_i, \mathbf{v}_j, \mathbf{v}_k]$. For each vertex $\mathbf{v}_i$, I ...
6
votes
1answer
156 views

Help deciding between cubic and quadratic interpolation in line search

I'm performing a line search as part of a quasi-Newton BFGS algorithm. In one step of the line search I use a cubic interpolation to move closer to the local minimizer. Let $f : R \rightarrow R, f ...
0
votes
0answers
26 views

Mass-conservative reprojection (on a sphere)

I have a 2D distribution of mass on a sphere given as a matrix of masses in latitude-longitude grid cells. I need these masses projected to another grid on the same sphere with different location of ...
2
votes
2answers
259 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 by N Matrix). Someone marks some pixels as anchors. Now, you need to ...
5
votes
0answers
78 views

Integrating highly oscillatory functions

I have a logarithmic grid, upon which i have two functions that are similar to this one (this is only the last 100 points): These are essentially very similar to a Sin function at this point. I ...
2
votes
1answer
98 views

How do I do Chebyshev interpolation in multi-dimentional space?

This topic is used in spectral methods, for collocation grid. Literature mentions Chebyshev interpolation on a grid (defined by $\xi_j = cos(\pi \cdot j/N)$, $x_j = (\xi_j+1) L/2$, $j=0,...,N$) ...
4
votes
0answers
67 views

How do I perform chebyshev interpolation from a to b with custom angle range?

Typically Chebyshev interpolation from $-1$ to $1$ with angle from $0$ to $\pi$: $\xi_j=\cos \left ({\pi j \over N}\right )$ $x_j=(1+\xi_j) * {L \over 2}$ $w$: $w_0=\pi/(2N)$ ...
4
votes
1answer
924 views

Fortran, making a more efficient bilinear interpolation

I'm trying to write an efficient bilinear (2D)-interpolation, after reading some recipes, as a fortran-mex for Matlab that is used extensively throughout a long algorithm of solar image processing, ...
0
votes
0answers
41 views

bivariate spline class

Ken, Thanks for the answer on bivariate spline class at stackexchange, it helped me. I am newly in python, currently need to do a 2D interpolation. I used interpolate.interp2d from scipy, but I think ...
5
votes
1answer
158 views

Adaptive Table Lookup for Expensive Function Evaluation

I have a function that is expensive to evaluate whose inputs are n-dimensional (n is the order of a dozen or two). I need the output of this function at each node and each time step for a PDE ...
1
vote
1answer
252 views

Newton's method in interpolation

I've seen that in Newton's method for interpolating polynomials, the coefficients can be found algorithmically using (in Python-ish): ...
2
votes
1answer
2k views

How does Matlab's “interp2” compute bicubic interpolation?

Computational Science people: The title is the question: exactly how does Matlab's "interp2" command (with the "cubic" option) perform bicubic interpolation? I tried the Mathworks documentation ...
5
votes
2answers
107 views

Continuation procedure to solve for a 2D curve that satisfies f(x,y) = 0

I have some function of $R^2$, that must be numerically computed. For instance, I might be interested in a real-valued contour integral that begins from (x,y) = 0. $$ f(x,y) = \Re\left[\int_0^{x + ...
1
vote
1answer
32 views

Adding data with different abscissas

This question may be better suited for an Astronomy Stack Exchange site, but I figured I'd ask here. Say I have measurements of something as a function of radius for a number of objects. Here's an ...
4
votes
1answer
96 views

Surface interpolation from two lines

Sorry if this is a basic problem but I don't know where to start looking (mainly because being an outsider I don't know the terms and nomenclature). Imagine two perpendicular lines ("profiles") in a ...
5
votes
0answers
73 views

Full Multigrid Prolongation Operator

I am looking into full multigrid, FMG, and several sources, including these slides, that a lot of people are referring to, state that the prolongation operator used in FMG the first time you visit a ...
2
votes
0answers
69 views

How do I implement thin plate splines with barriers?

I want to implement thin spline interpolation of scattered elevation data $ \{z_i(x_i,y_i)\}_{i=1..n} $ in C++. This seems fairly simple using Radial Basis Functions: $$ z(x,y) = p(x,y) + \sum_i ...
5
votes
2answers
290 views

Do RBF kernel matrices tend to be ill-conditioned?

I use RBF kernel function to implement one kernel based machine learning algorithm(KLPP), the resulting kernel matrix $K$ $$K(i,j)= \exp\left({\frac{-(x_{i}-x_{j})^2}{ \sigma_{m}^2}}\right)$$ is ...
5
votes
2answers
359 views

Intermediate values (interpolation) after Runge-Kutta calculation

I have a numerical ODE simulation that I computed at fixed time step $h$ using a 4-th order Runge-Kutta method (RK4), producing a series of results $(x_1,y_1), ...
1
vote
0answers
20 views

Combining trend estimation and constrained Marquart fit

This title certainly needs some clarification: I need to compute parameters $a_i$ for a helper function $f(\vec{a};k)$ (for grid interpolation) which is fitted to a number of values $y_k$ which are ...
3
votes
1answer
346 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 ...
3
votes
2answers
173 views

How to properly use polynomial projection to get values at visualization nodes?

I am trying to implementing a nodal discontinuous Galerkin spectral element method for linear and non-linear systems of equations. The solution at each time step is given at ...
5
votes
2answers
2k views

SciPy interpolation with Univariate Splines

I have coded a routine for interpolation with B-splines, only to discover later that this functionality is already included in Python's SciPy. However, I do not understand one parameter in the SciPy ...
17
votes
2answers
387 views

Why do equi-spaced points behave badly?

Description of experiment: In Lagrange interpolation, the exact equation is sampled at $N$ points (polynomial order $N - 1$) and it is interpolated at 101 points. Here $N$ is varied from 2 to 64. ...
0
votes
1answer
43 views

Clarification on interpolation equalities given by Briggs

Briggs, "A Multigrid Tutorial" (pg. 35) has the following expressed as 2-D interpolation: \begin{align*} v^h_{2i,2j} &= v_{i,j}^{2h}\\ v^h_{2i+1,2j} &= 0.5\cdot(v_{i,j}^{2h} + ...
2
votes
1answer
264 views

Prolongation/Restriction Operator in Multigrid

In Multigrid, using Poisson's equation, does the equality below always hold regardless of what type of boundary conditions you use? $$ R= c\cdot I^T, \text{ for some constant }c $$ where $R$ and $I$ ...
2
votes
1answer
49 views

Integrating from tabular data, in particular steam tables

I'd like to be able to view in graph form the volume and pressure of steam produced from heating water in a sealed vessel, starting from room temperature water. Important variables, such as the ...
2
votes
0answers
33 views

Propogated Error in Mesh Interpolation

I am working with a code that solves diffusion/reaction equations on a 2D unstructured mesh. Due to the stiffness of some of the processes, I start with time steps near 1e-13, and end with a final ...
3
votes
1answer
243 views

restriction and interpolation in multigrid method

I need detailed explanation of the formula below A2=I1*A1*I2 I suppose this formula computes matrix A2 on a coarse grid and here A1 is original matrix on fine ...
0
votes
1answer
239 views

ENO/WENO vs monotone Hermite interpolation

I have see the method PCHIP in matlab that implements the monotone Hermite interpolation method which was originally proposed by Carlson in 1980s. It seem to accomplish the goal of preventing the ...
4
votes
1answer
116 views

What is the most efficient approach to interpolate values between two FEM meshes in 2D?

I am looking for efficient algorithm to interpolate values from one unstructured 2D mesh grid to another. Both grids are constructed using the same type of elements (triangles or quadrilaterals). Both ...
4
votes
1answer
422 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 ...
6
votes
1answer
117 views

interpolation combined with methods of characteristics can cause oscillations for the transport equation?

I would like to know about the effect of using a higher order interpolator for the methods of characteristics. I am solving $$u_t+a(x,t)u_x=0$$ with some nonsmooth initial data $u_0(x)$ by the method ...
9
votes
4answers
392 views

When we use Bernstein polynomials in application

When it is preferable to use Bernstein polynomials to approximate a continuous function instead of using the only following preliminary Numerical Analysis methods: "Lagrange Polynomials", "Simple ...
1
vote
0answers
79 views

Resampling of values between body fitted and cartesian grids

Assuming there exist two 2D grids on the same domain, one of them is a cartesian one while the other is curvilinear (body fitted regular grid, with curved coordinate lines). I am looking for a way to ...
3
votes
2answers
823 views

Piecewise polynomial interpolation: Hermite vs Lagrange

I am a bit confused of the qualitative behavior of the two methods. Consider quadratic case, start by having points $x_i$, where I know the value and points $y_j$, where the values to be found. If I ...
8
votes
1answer
567 views

Fast (approximate) evaluation of Chebyshev polynomial

Is there a preferred way how to implement a fast (approximate) evaluation of the Chebyshev interpolation polynomial on uniform grid (given the function values at the Chebyshev nodes)? My problem is ...
5
votes
2answers
273 views

Interpolation schemes to move data between cells and nodes

I work on non-graded quadtree grids where the entire grid is a hierarchy of cells specified using a quadtree data structure, where, in general, there is no constraint regarding the relative size of ...
2
votes
2answers
315 views

error of linear interpolation

I have two points $x_1, x_2$ between which I would like to have a linear interpolation $P_1$. Those two points are just points where I know the value of the underlying function $f$. I know that the ...
8
votes
4answers
1k views

Efficient interpolation method for unstructured grids?

I would like to know a good method for interpolating data between two unstructured grids, where one grid is a coarser version of the other. Efficiency is very important to me since I'm solving a ...