简体   繁体   English

使用 parvaiew/vtk 分析树状结构

[英]Using parvaiew/vtk to analyze a tree like structure

I have a Newton optimizer and I am exporting some data in the form of a HDF5.我有一个牛顿优化器,我正在以 HDF5 的形式导出一些数据。 The HDF5 file contains the results of the optimization process, which are triangle meshes, so I am loading them in paraview. HDF5 文件包含优化过程的结果,它们是三角形网格,因此我将它们加载到 paraview 中。

In addition, the HDF5 file contains information about how the optimization went, so I have a json like structure with information about the number of newton iterations, the newton error.此外,HDF5 文件包含有关优化过程的信息,因此我有一个类似 json 的结构,其中包含有关牛顿迭代次数、牛顿误差的信息。 For each Newton iteration I store the number of iterations of the inner linear solver and the number of iterations of a line search process and so on.对于每次牛顿迭代,我存储内部线性求解器的迭代次数和线搜索过程的迭代次数等。 Basically, I have a tree like structure where each node in the tree may contain different amounts of attributes.基本上,我有一个树状结构,树中的每个节点可能包含不同数量的属性。

Since I am already using paraview to read the geometric data, I was looking for an appropiate VTK structure to store the rest of the data in the HDF5 file.因为我已经在使用 paraview 读取几何数据,所以我一直在寻找合适的 VTK 结构来将其余数据存储在 HDF5 文件中。 I have looked into VTKTree, but apparently, all the nodes contains the same amount of attributes.我查看了 VTKTree,但显然,所有节点都包含相同数量的属性。

Is there any VTK structure which I can use to parse this type of information?是否有任何 VTK 结构可用于解析此类信息?

Hierarchical storage of unrelated meshes (ie meshes with differents attributes) can be done through vtkMultiBlockDataSet or vtkPartionedDataSetCollection .不相关网格(即具有不同属性的网格)的分层存储可以通过vtkMultiBlockDataSetvtkPartionedDataSetCollection完成。

Also note that if you have miscellaneous data associated to a mesh, you can stock them in thevtkFieldData of the vtkDataObject containg your mesh.另请注意,如果您有与网格关联的杂项数据,则可以将它们存储在包含网格的vtkDataObjectvtkDataObject中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM