Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Jun 27, 2024
1 parent 0048880 commit 1bbd71b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ nh = length(offsets)
J = judiExtendedJacobian(F(model0), q, offsets)

ssodm = J'*dD
@test size(ssodm, 1) == nh
@test size(ssodm, 3) == nh

ssor = zeros(Float32, size(ssodm)...)
for h=1:size(ssor, 1)
ssor[h, :, :] .= dm.data
for h=1:size(ssor, 3)
ssor[:, :, h] .= dm.data
end

dDe = J*ssor
Expand All @@ -76,4 +76,4 @@ a, b = dot(dD, dDe), dot(ssodm[:], ssor[:])
@test (a-b)/(a+b) 0 atol=sqrt(eps(1f0)) rtol=0

# Make sure zero offset is the rtm, remove the sumpadding
@test norm(rtm.data - ssodm[div(nh, 2)+1, :, :])/norm(rtm) 0f0 atol=1f-5 rtol=0
@test norm(rtm.data - ssodm[:, :, div(nh, 2)+1])/norm(rtm) 0f0 atol=1f-5 rtol=0

0 comments on commit 1bbd71b

Please sign in to comment.