This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

How to compute 3D interpolation from data at points not on the mesh ?

+3 votes

Suppose I have a set of points (x,y,z) and data at these points ( not a function written in math expression).

x y z F
-10 2 4 10.24
-10 2 6 5.98
and so on.

These points fill the whole domain (say a 3D box) but they are not the nodes of elements in the mesh. The question is can FEniCS find 3D function f(x,y,z) that interpolates the data? (I am going to use this function later for the PDE I want to solve). How do I do that?

asked Jul 23, 2013 by rockyroad FEniCS Novice (300 points)

1 Answer

+1 vote
 
Best answer

Create (Delaunay) tetrahedronation of these points. Define CG1 function with your values on these points. Project to your new mesh. Note that projection on non-matching mesh (last step) does not work in parallel.

answered Jul 23, 2013 by Jan Blechta FEniCS Expert (51,420 points)
selected Jul 24, 2013 by Garth N. Wells

That's a concept you need to program. You may need to utilize external mesh generator for the first step.

...