Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
henry2004y committed Jul 15, 2024
1 parent 5d670b1 commit 4ce9b49
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ function readtecdata(file::AbstractString; verbose::Bool=false)
data = Array{Float32,2}(undef, length(VARS), nNode)

if nDim == 3
connectivity = Array{Int32,2}(undef,8,nCell)
connectivity = Array{Int32,2}(undef, 8, nCell)
elseif nDim == 2
connectivity = Array{Int32,2}(undef,4,nCell)
connectivity = Array{Int32,2}(undef, 4, nCell)

Check warning on line 172 in src/io.jl

View check run for this annotation

Codecov / codecov/patch

src/io.jl#L172

Added line #L172 was not covered by tests
end

IsBinary = false
Expand Down Expand Up @@ -432,9 +432,9 @@ end

"Read binary format coordinates and data values."
function getbinary!(x::Array{T, 2}, w, fileID::IOStream) where T
dimlast = 2
read!(fileID, x)
skip(fileID, 2*TAG)
dimlast = 2
@inbounds for iw in axes(w, dimlast)
read!(fileID, selectdim(w, dimlast, iw))
skip(fileID, 2*TAG)
Expand All @@ -444,9 +444,9 @@ function getbinary!(x::Array{T, 2}, w, fileID::IOStream) where T
end

function getbinary!(x::Array{T, 3}, w, fileID::IOStream) where T
dimlast = 3
read!(fileID, x)
skip(fileID, 2*TAG)
dimlast = 3
@inbounds for iw in axes(w, dimlast)
read!(fileID, selectdim(w, dimlast, iw))
skip(fileID, 2*TAG)
Expand All @@ -456,9 +456,9 @@ function getbinary!(x::Array{T, 3}, w, fileID::IOStream) where T
end

function getbinary!(x::Array{T, 4}, w, fileID::IOStream) where T
dimlast = 4
read!(fileID, x)
skip(fileID, 2*TAG)
dimlast = 4
@inbounds for iw in axes(w, dimlast)
read!(fileID, selectdim(w, dimlast, iw))
skip(fileID, 2*TAG)
Expand Down

0 comments on commit 4ce9b49

Please sign in to comment.