Skip to content

Reading large .pvts files has extremely high memory consumption compared to Paraview #57

@FR13ndSDP

Description

@FR13ndSDP

I have a large structured .pvts file, and when I read it with the following code, I was surprised to find that the memory always overflows, but Paraview runs normally. It seems that getting the coordinates is very memory expensive:

using ReadVTK

fname = "./plt-100.pvts"

vtk = PVTKFile(fname)

# point data
p_data = get_point_data(vtk)

# mesh cordinate
x,y,z = get_coordinate_data(vtk)
Nx, Ny, Nz = size(x)

# variables
p = get_data_reshaped(p_data["p"])
u = get_data_reshaped(p_data["u"])
v = get_data_reshaped(p_data["v"])
T = get_data_reshaped(p_data["T"])
ρ = get_data_reshaped(p_data["rho"])

File metadata:

<?xml version="1.0" encoding="utf-8"?>
<VTKFile type="PStructuredGrid" version="1.0" byte_order="LittleEndian">
  <PStructuredGrid GhostLevel="0" WholeExtent="0 2799 0 599 0 599">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions