Skip to content

Commit

Permalink
cached split model
Browse files Browse the repository at this point in the history
  • Loading branch information
longemen3000 committed Aug 9, 2021
1 parent 42428ac commit 227ee9b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/models/eos/cached/CachedEoS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ function crit_pure(model::CachedEoS)
end
end

function split_model(model::CachedEoS)
if haskey(model.cache,:split_model)
return model.cache[:split_model]
else
primal_splitted_model = split_model(model.model)
res = [CachedEoS(modeli,sat_pure_aprox = model.sat_pure_aprox) for modeli in primal_splitted_model]
model.cache[:split_model] = res
return res
end
end

function acentric_factor(model::CachedEoS)
if haskey(model.cache,:acentric_factor)
return model.cache[:acentric_factor]
Expand Down

0 comments on commit 227ee9b

Please sign in to comment.