Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not constrain version #59

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions src/ReadVTK.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Hold all relevant information about a VTK XML file that has been read in.
- `filename`: original path to the VTK file that has been read in
- `xml_file`: object that represents the XML file
- `file_type`: currently only `"UnstructuredGrid"` or `"ImageData"` are supported
- `version`: VTK XML file format version (v1.0 or later)
- `version`: VTK XML file format version
- `byte_order`: can be `LittleEndian` or `BigEndian` and must currently be the same as the system's
- `compressor`: can be empty (no compression) or `vtkZLibDataCompressor`
- `appended_data`: in case of appended data (see XML documentation), the data is stored here for
Expand Down Expand Up @@ -62,7 +62,7 @@ mutable struct VTKFile
end
end

# Header type is hardcoded and corresponds to VTK XML version 1.0
# Header type is hardcoded
header_type(::VTKFile) = UInt64

# Return true if data is compressed (= XML attribute `compressor` is non-empty in VTK file)
Expand Down Expand Up @@ -124,9 +124,6 @@ function VTKFile(filename)
error("Unsupported file type: ", file_type)
end

# Ensure correct version
@assert version >= v"1.0"

# Ensure matching byte order
is_little_endian = ENDIAN_BOM == 0x04030201
@assert ((byte_order == "LittleEndian" && is_little_endian) ||
Expand Down Expand Up @@ -213,7 +210,7 @@ Hold all relevant information about a Parallel VTK XML file that has been read i
- `filename`: original path to the PVTK file that has been read in
- `xml_file`: xml info
- `file_type`: currently only `"PRectilinearGrid"` or `"PImageData"` are supported
- `version`: VTK XML file format version (v1.0 or later)
- `version`: VTK XML file format version
- `vtk_filenames`: vector with strings that contain the filenames of each of the parallel files
- `vtk_files`: vector with `VTKFile` data that contains the info about each of the files
"""
Expand Down Expand Up @@ -257,9 +254,6 @@ function PVTKFile(filename; dir = "")
error("Unsupported file type: ", file_type)
end

# Ensure correct version
@assert version >= v"1.0"

# Extract names of files & load the data
pieces = root[file_type][1]["Piece"]
n_pieces = length(pieces)
Expand Down Expand Up @@ -322,9 +316,6 @@ function PVDFile(filename)
error("Unsupported PVD file type: ", file_type)
end

# Ensure correct version
@assert version >= v"1.0"

# Extract names of files & load the data
pieces = root[file_type][1]["DataSet"]
n_pieces = length(pieces)
Expand Down
Loading