Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cubic (mixing) optimization #55

Merged
merged 12 commits into from
Nov 24, 2021
Merged

Cubic (mixing) optimization #55

merged 12 commits into from
Nov 24, 2021

Conversation

longemen3000
Copy link
Member

the cubic rewrite gave us unseen flexibility, but we lost some speed in the progress. this pr aims to get some of that speed back.

  • allocations are eliminated on VdWf1 and Kay and all mixing that does not require an activity. calling activity methods incurs in allocations, but that is another front of optimization.
  • for VTPR and UMRPR, there are some custom "pre" mixing rules for b, that is, they use a diferent bij that the returned by lorentz-bertelot. to acomodate this, a new function ab_premixing(Type{Model},mixing,Tc,pc,k), so we can dispatch on. that function is now used by VdW, PR, and RK models

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2021

Codecov Report

Merging #55 (dcd9ff0) into master (c956aa1) will increase coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   83.79%   83.94%   +0.14%     
==========================================
  Files         109      109              
  Lines        6875     6913      +38     
==========================================
+ Hits         5761     5803      +42     
+ Misses       1114     1110       -4     
Impacted Files Coverage Δ
src/Clapeyron.jl 100.00% <ø> (ø)
src/models/eos/cubic/translation/MT.jl 100.00% <ø> (ø)
src/models/eos/cubic/PR/PR.jl 100.00% <100.00%> (ø)
src/models/eos/cubic/RK/RK.jl 97.72% <100.00%> (-0.19%) ⬇️
src/models/eos/cubic/equations.jl 93.65% <100.00%> (+0.79%) ⬆️
src/models/eos/cubic/mixing/Kay.jl 96.66% <100.00%> (+4.35%) ⬆️
src/models/eos/cubic/mixing/LCVM.jl 100.00% <100.00%> (ø)
src/models/eos/cubic/mixing/MHV1.jl 100.00% <100.00%> (ø)
src/models/eos/cubic/mixing/MHV2.jl 100.00% <100.00%> (ø)
src/models/eos/cubic/mixing/PSRK.jl 100.00% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c956aa1...dcd9ff0. Read the comment docs.

@longemen3000 longemen3000 merged commit 65539bf into master Nov 24, 2021
@longemen3000 longemen3000 deleted the cubic-optimization branch November 24, 2021 00:45
pw0908 pushed a commit that referenced this pull request Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants