Closed jiaqiwang969 closed 2 years ago
Hi @jiaqiwang969, could you please provide some more context? From which format are you importing? Can you show a comparison between what you expect and how it actually looks like? Best, Andre
I am using the openfoam form, which is similar to of_cyliner_binary.
I have checked that Tricontour cannot deal with quadrilateral mesh but with smooth Delaunay method, which make the mistake from my case.
The dataloaders give you access to points (vertices) and field values defined in those vertices. In the case of OpenFOAM, the mesh topology is completely ignored, so it doesn't matter what type of cells the mesh is made of. What you get from loader.vertices
is a tensor containing all cell centers. The easiest way to visualize a field defined in an unstructured set of points is to triangulate the points and interpolate the field values within the triangles. That's what tricontourf does (triangulation and interpolation).
Edit: if you want to take a look at the vertices, use scatter instead of plot. Let's say you have a 2D mesh in the x-y-plane. Then you would do something like:
vertices = loader.vertices
plt.scatter(vertices[:, 0], vertices[:, 1], s=5)
plt.show()
Best, Andre
Hi, sir I am trying to use this package. When quadrilateral mesh is imported, the map is not exactly right.
Thanks