The exact form of this function depends on the particular element topology and the number of integration points but it is often similar to the shape functions used for the element. Then this function can beĮvaluated at each of the element nodes. Is, for each element, to fit a parametric function to the integration point data. stresses) at the element integration points.īut, typically, for plotting purposes, the result quantities are needed at the nodes. It is common in finite element methods to calculate results (e.g. The way finite element integration point results is often dealt with is described below: No topology associated with that type of cell. It is not surprising that VTK can't generate a volume rendering for the poly_vertex cell type since there is Paraview is able to volumetrically plot this. Constructed a VTK file where each cell is a tetrahedron from the spatial Delaunay triangulation on each element. The triangulation is fast since there aren't that many points even for a high-order finite element.Ģ. Performed a spatial Delaunay triangulation on each of my finite elements (the numerical solution is known at the nodes of each finite element). Update: I took heed of the accepted answer below and did the following:ġ. Writer = vtk.vtkXMLUnstructuredGridWriter() Points, data = get_random_points_and_data(10) """ adds a set of polyvertices meant to represent a finite element """ (pv.GetCellType(), pv.GetPointIds())Īnd the calling code: def test_vtkPolyVertexCloud_writeToFile(): In calling points: numpy array of 3d point coords - points.shape = (npoints, data: scalar-valued data belonging to each point - data.shape = (npoints,)Īssert(points.shape = 3) # make sure 3d points passed inĪssert(data.shape = npts) # make sure same number of data, points ().SetScalars(self.values)ĭef add_polyVertex_cell(self, points, data):Īdds points according to user-supplied numpy arrays, for convenience and to eliminate loops """ save each finite element as a set of polyvertices, but lose cell information """ I imagine the finite element community must commonly render unstructured volume data, so this is surprising.Īnd the source code used to write out the VTK file in Python: class VtkPolyVertCloud(object): However, I seem to be unable to find documentation for how to do this. I am looking for paraview to linearly interpolate the solution between the points for each cell, the way it would if I provide an Image (Uniform Rectilinear Grid) from a data file: However, when I choose the "Volume" representation, rather than points, the points simply disappear, without any volume rendering. I can load the file into Paraview and view the output as points: These are meant to represent points where the value of the numerical solution is known in space (quadrature points for a finite element, for example). I have built a *.vtu VTK unstructured grid file containing 2 cells consisting of 10 PolyVertex objects with scalar data associated with each point. I would like to volumetrically render 3D scalar data in Paraview, and I'm not sure if my inability to do so is incorrect usage of VTK or Paraview.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |