You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For every model that we test we manually write directional derivative tests like shown below. This can most likely be unified in a little test suite implemented within ACE.Testing.
import Base.*struct __TestSVec{T}
val::Tend*(a::Number, u::__TestSVec) = a * u.val
*(a::SMatrix, u::__TestSVec) = a * u.val
*(a::SArray{Tuple{N1,N2,N3}}, u::__TestSVec) where {N1, N2,N3} =reshape(reshape(a, Size(N1*N2, N3)) * u.val, Size(N1, N2))
Us =__TestSVec.(randn(SVector{3, Float64}, length(Xs)))
C =randn(typeof(φ.val), length(basis))
F = t ->sum( sum(c .* b.val)
for (c, b) inzip(C, ACE.evaluate(basis, ACEConfig(Xs + t[1] * Us))) )
dF = t -> [ sum( sum(c .* db)
for (c, db) inzip(C, ACE.evaluate_d(basis, ACEConfig(Xs + t[1] * Us)) * Us) ) ]
fdtest(F, dF, [0.0], verbose=true)
The text was updated successfully, but these errors were encountered:
For every model that we test we manually write directional derivative tests like shown below. This can most likely be unified in a little test suite implemented within
ACE.Testing
.The text was updated successfully, but these errors were encountered: