-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add function to save the solution #214
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #214 +/- ##
==========================================
+ Coverage 49.82% 49.91% +0.08%
==========================================
Files 31 31
Lines 8086 7920 -166
==========================================
- Hits 4029 3953 -76
+ Misses 4057 3967 -90 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good to me. Should we add a read function to go with the save function?
src/Simulation.jl
Outdated
function save(syss::T, save_name::String) where {T<:SystemSimulation} | ||
df = DataFrame(syss.sol) | ||
for sim in syss.sims | ||
rename!(df, names(df)[sim.domain.indexes[1]:sim.domain.indexes[2]] .=> sim.names) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for us to have a name collision if for example you have water in gas phase and liquid phase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I postfixed the phase name to the species names in the new push.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you squash the fix in here?
I rebased with main. @mjohnson541 can you review & merge after the tests pass? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple comments.
src/TestReactors.jl
Outdated
@@ -4,36 +4,36 @@ using Sundials | |||
|
|||
@testset "Test Reactors" begin | |||
|
|||
phaseDict = readinput("../src/testing/liquid_phase.rms") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to create nasty merge conflicts with other PRs can we hold off on this until right before v1.0.0?
src/Simulation.jl
Outdated
function save(syss::T, save_name::String) where {T<:SystemSimulation} | ||
df = DataFrame(syss.sol) | ||
for sim in syss.sims | ||
rename!(df, names(df)[sim.domain.indexes[1]:sim.domain.indexes[2]] .=> sim.names) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you squash the fix in here?
I don't think it makes sense to add it into this PR, but I agree it would be nice to have a load function. We can open up an issue for that. |
postfix the phase name to species name when saving
@mjohnson541 I addressed the comments! |
src/TestReactors.jl
Outdated
@@ -608,15 +610,79 @@ end; | |||
|
|||
inter,pinter = FragmentBasedReactiveFilmGrowthInterfaceConstantT(domainfilm,domainliq,interfacerxns); | |||
|
|||
react,y0,p = Reactor((domainfilm,domainliq),(y0film,y0liq),(0.0,0.1),(inter,),(pfilm,pliq,pinter)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are all these other changes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops probably something went wrong when I rebased this. Will fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
No description provided.