Skip to content

Commit

Permalink
Recover style
Browse files Browse the repository at this point in the history
  • Loading branch information
termi-official committed Jan 7, 2025
1 parent 3a0b78a commit 96320ce
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/deprecations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,30 @@ function FacetValues(
end

function value(ip::Interpolation, ξ::Vec)
throw(DeprecationError("value(ip::Interpolation, ξ::Vec) is deprecated, use `[reference_shape_value(ip, ξ, i) for i in 1:getnbasefunctions(ip)]` or `reference_shape_values!(N, ip, ξ)` with preallocated `N` instead"))
io = _iobuffer()
printstyled(io, "`value(ip::Interpolation, ξ::Vec)`", color = :red)
print(io, " is deprecated, use ")
printstyled(io, "`[reference_shape_value(ip, ξ, i) for i in 1:getnbasefunctions(ip)]`", color = :green)
print(io, " or ")
printstyled(io, "`reference_shape_values!(N, ip, ξ)`", color = :green)
print(io, " with preallocated ")
printstyled(io, "`N`", color = :green)
print(io, " instead.")

throw(DeprecationError(takestring(io)))
end
function derivative(ip::Interpolation, ξ::Vec)
throw(DeprecationError("derivative(ip::Interpolation, ξ::Vec) is deprecated, use `[reference_shape_gradient(ip, ξ, i) for i in 1:getnbasefunctions(ip)]` or `reference_shape_gradients!(dNdξ, ip, ξ)` with preallocated `dNdξ` instead"))
io = _iobuffer()
printstyled(io, "`derivative(ip::Interpolation, ξ::Vec)`", color = :red)
print(io, " is deprecated, use ")
printstyled(io, "`[reference_shape_gradient(ip, ξ, i) for i in 1:getnbasefunctions(ip)]`", color = :green)
print(io, " or ")
printstyled(io, "`reference_shape_gradients!(dNdξ, ip, ξ)`", color = :green)
print(io, " with preallocated ")
printstyled(io, "`dNdξ`", color = :green)
print(io, " instead.")

throw(DeprecationError(takestring(io)))
end
function value(ip::Interpolation, i::Int, ξ::Vec)
throw(DeprecationError("value(ip::Interpolation, i::Int, ξ::Vec)" => "reference_shape_value(ip, ξ, i)"))
Expand Down

0 comments on commit 96320ce

Please sign in to comment.