Skip to content

Commit

Permalink
Rename variable prop to property
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Apr 21, 2020
1 parent a06fb18 commit 57a566a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Collections.jl
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ end

# Miscellaneous
if VERSION >= v"1.3"
(eos::EquationOfState)(prop::PhysicalProperty) = v -> _evaluate(eos, prop, v)
(eos::EquationOfState)(property::PhysicalProperty) = v -> _evaluate(eos, property, v)
else
for T in (
:Murnaghan,
Expand All @@ -688,7 +688,7 @@ else
:Shanker,
)
eval(quote
(eos::$T)(prop::PhysicalProperty) = v -> _evaluate(eos, prop, v)
(eos::$T)(property::PhysicalProperty) = v -> _evaluate(eos, property, v)
end)
end # Julia 1.0-1.2 does not support adding methods to abstract types.
end
Expand Down
4 changes: 2 additions & 2 deletions src/NonlinearFitting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ Fit an equation of state using least-squares fitting method (with the Levenberg-
and [tutorial](https://julianlsolvers.github.io/LsqFit.jl/latest/tutorial/).
"""
function lsqfit(f, xdata, ydata; kwargs...)
eos, prop = fieldvalues(f)
eos, property = fieldvalues(f)
T = constructorof(typeof(eos)) # Get the `UnionAll` type
params, xdata, ydata = _preprocess(eos, xdata, ydata)
model = (x, p) -> map(T(p...)(prop), x)
model = (x, p) -> map(T(p...)(property), x)
fit = curve_fit(model, xdata, ydata, params; kwargs...)
return _postprocess(T(fit.param...), eos)
end # function lsqfit
Expand Down

0 comments on commit 57a566a

Please sign in to comment.