Ordering of vertices in triangulate
I am trying to interpolate some experimental data. I have this data as an array of coordinates and the data associated to that point: [x_i,y_i, data_i]
I tried to do a triangulation and then associated the data to the degrees of freedom. I got stuck because when I give the points to generate the triangulation the resulting mesh has the same vertices (of course) but with a completely different order. Why is this so and how can I retrieve the original order?
Here is a sample code:
from dolfin import *
import numpy
x = numpy.random.
y = numpy.random.
data = numpy.array(
# triangulate data
num_points = x_data.size
data_points = [Point(x_data[k], y_data[k], 0.0) for k in range(num_points)]
# Create empty Mesh
mesh = Mesh()
# Triangulate points in 2D and plot mesh
Triangulate.
print mesh.coordinates()
print numpy.array(
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Artur Palha
- Solved:
- Last query:
- Last reply: