Skip to content

Commit

Permalink
Fix: Let ComputeVolume return pressure, too
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Nov 20, 2023
1 parent ce2db48 commit bcf78b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/EquationOfState/actions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ end
action(pressure, PressureEquation(parameters))
function (action::ComputeVolume)(pressure::Pressure, eos::PressureEquation)
possible_volumes = vsolve(eos, pressure)
return if length(possible_volumes) > 1
volume = if length(possible_volumes) > 1
_choose(possible_volumes, pressure, eos)
else
only(possible_volumes)
end
return volume, pressure
end

struct CreateInput{T} <: Action{T}
Expand Down

0 comments on commit bcf78b8

Please sign in to comment.