mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-29 21:09:37 +00:00
Added type template to interpolate function and added test for interpolate
This commit is contained in:
@@ -25,11 +25,11 @@ basis :: Function
|
||||
ip :: Array{Number, 1}
|
||||
Point to interpolate
|
||||
""" ->
|
||||
function interpolate(field::Array{Float64,1}, basis::Function, ip)
|
||||
function interpolate{T<:Real}(field::Array{T,1}, basis::Function, ip)
|
||||
result = dot(field, basis(ip))
|
||||
return result
|
||||
end
|
||||
function interpolate(field::Array{Float64,2}, basis::Function, ip)
|
||||
function interpolate{T<:Real}(field::Array{T,2}, basis::Function, ip)
|
||||
m, n = size(field)
|
||||
bip = basis(ip)
|
||||
tmp = size(bip)
|
||||
|
||||
Reference in New Issue
Block a user