Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Bug in VTK interpolation? #2045

Open
kpamnany opened this issue Feb 18, 2021 · 1 comment
Open

Bug in VTK interpolation? #2045

kpamnany opened this issue Feb 18, 2021 · 1 comment

Comments

@kpamnany
Copy link
Contributor

Description

Discovered by @LenkaNovak running julia --project tutorials/Atmos/agnesi_hs_lin.jl --vtk 0.5shours --vtk-number-sample-points 1 --sim-time 15000:

...
┌ Info: Starting Agnesi_HS_LINEAR
│     dt              = 6.15284e-01
│     timeend         = 15000.00
│     number of steps = 24379
└     norm(Q)         = 1.0862508060259192e+11
ERROR: LoadError: ArgumentError: range(-1.0, stop=1.0, length=1): endpoints differ
Stacktrace:
 [1] _linspace1(::Type{Float64}, ::Float64, ::Float64, ::Int64) at ./twiceprecision.jl:681
 [2] _range(::Float64, ::Nothing, ::Float64, ::Int64) at ./twiceprecision.jl:598
 [3] _range at ./range.jl:420 [inlined]
 [4] #range#43 at ./range.jl:91 [inlined]
 [5] writevtk_helper(::String, ::Array{Float64,3}, ::Array{Float64,3}, ::DiscontinuousSpectralElementGrid{Float64,3,(4, 4, 4),125,CUDA.CuArray,Tuple{CUDA.CuArray{Float64,1},CUDA.CuArray{Float64,1},CUDA.CuArray{Float64,1}},Tuple{CUDA.CuArray{Float64,2},CUDA.CuArray{Float64,2},CUDA.CuArray{Float64,2}},CUDA.CuArray{Float64,3},CUDA.CuArray{Float64,4},CUDA.CuArray{Int64,1},CUDA.CuArray{Int64,2},CUDA.CuArray{Int64,3},StackedBrickTopology{3,Float64,2},Tuple{Array{Float64,2},Array{Float64,2},Array{Float64,2}},ClimateMachine.Mesh.Grids.MinNodalDistance{Float64}}, ::Array{String,1}, ::Array{Float64,3}, ::Array{String,1}; number_sample_points::Int64) at /central/home/kpamnany/ClimateMachine.jl/src/InputOutput/VTK/writevtk.jl:161
...

The range call in this line throws this error, and it appears that --vtk-number-sample-points 1 for any experiment will fail similarly. Is 2 the minimum number of sampling points intended @jkozdon?

@jkozdon
Copy link

jkozdon commented Feb 18, 2021

My bad, there is a check but I didn't protect against 1 🤦

see #2046

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants