Appearance
Load Structure
microstructure.vti
This is a xml based VTK file format. Here is an example:
cpp
<VTKFile type="ImageData"><!--This file is generated by NIO VTK_RectilinearGrid_write-->
<ImageData WholeExtent="0 109 0 109 0 109" Origin="0 0 0" Spacing="1 1 1">
<Piece Extent="0 109 0 109 0 109">
<PointData Scalars="scalar_data_0">
<DataArray type="Int32" Name="scalar_data_0" format="ascii">
0 0 0
....
....
</DataArray>
</PointData>
</Piece>
</ImageData>
</VTKFile>
To prepare a vti file by yourself, first, you need to change the WholeExtent and Extent attribute of the ImageData and Piece element to the correct simulation dimension you want. Second, within the scalar_data_0 DataArray element, you need to fill in the 3D phase index data. The data is in x-y-z order, which means when you write the data using three loops, x should be the inner loop and z should be the outer loop.
microstructure.in
This is a XYZ data file. Here is an example:
cpp
110 110 110
1 1 1 0
1 1 2 0
1 1 3 0
1 1 4 0
1 1 5 0
1 1 6 0
.....
.....
110 110 110 0
The first line of the data file is three integers, specifying the x, y, and z dimension of the data defined in this file. Each of the following lines determine one data point. There are four columns, representing the x coordinate, y coordinate, z coordinate and the phase index data at such location. Here the sequence of data is z-y-x, which means when you write the data using three loops, z should be the inner loop and x should be the outer loop.
Updated on 2023-03-18 at 16:45:26 -0400