From c5575483f3e8cb16d063fffd3797f4578666b836 Mon Sep 17 00:00:00 2001 From: Knut Andreas Meyer Date: Tue, 12 Mar 2024 16:11:46 +0100 Subject: [PATCH] Ensure that vector_residual specializes --- src/utils.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.jl b/src/utils.jl index b2c742e..02dbb2f 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -69,7 +69,7 @@ The input `x` and output `r` of `rf` should have the same type, `RT`, and suppor The approach was adopted from https://github.com/kimauth/MaterialModels.jl """ -function vector_residual!(rf::Function, r_vector::AbstractVector{T}, x_vector::AbstractVector{T}, x) where T +function vector_residual!(rf::F, r_vector::AbstractVector{T}, x_vector::AbstractVector{T}, x) where {F<:Function, T} x_tensor = frommandel(baseof(x), x_vector) r_tensor = rf(x_tensor) tomandel!(r_vector, r_tensor)