Skip to content

Commit a8d59d6

Browse files
feat: allow specifying floating point type in get_temporary_value
1 parent c814779 commit a8d59d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/problem_utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,12 +535,12 @@ function (f::UpdateInitializeprob)(initializeprob, prob)
535535
f.setvals(initializeprob, f.getvals(prob))
536536
end
537537

538-
function get_temporary_value(p)
538+
function get_temporary_value(p, floatT = Float64)
539539
stype = symtype(unwrap(p))
540540
return if stype == Real
541-
zero(Float64)
541+
zero(floatT)
542542
elseif stype <: AbstractArray{Real}
543-
zeros(Float64, size(p))
543+
zeros(floatT, size(p))
544544
elseif stype <: Real
545545
zero(stype)
546546
elseif stype <: AbstractArray

0 commit comments

Comments
 (0)