-
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
fix bug with normalization of transitory sensitivities with interfaces #226
Conversation
@ChrisBNEU can you test if this solves your problem? |
e5e0c9a
to
b61fe28
Compare
src/TransitorySensitivities.jl
Outdated
@@ -163,6 +163,11 @@ function normalizefulltransitorysensitivities!(dSdt,ssys::SystemSimulation,t) | |||
@views ns = y[sim.domain.indexes[1]:sim.domain.indexes[2]] | |||
@views dSdt[sim.domain.indexes[1]:sim.domain.indexes[2],:] ./= ns | |||
end | |||
for (i,inter) in enumerate(ssys.interfaces) | |||
if isa(inter,AbstractReactiveInternalInterface) |
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 add blank after comma
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.
added
src/TransitorySensitivities.jl
Outdated
for (i,inter) in enumerate(ssys.interfaces) | ||
if isa(inter,AbstractReactiveInternalInterface) |
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 add blanks after the commas 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.
added
src/TransitorySensitivities.jl
Outdated
dSdt .*= ssys.p[ind] | ||
for sim in ssys.sims | ||
if sim.domain.parameterindexes[1]+length(sim.species) < ind && sim.domain.parameterindexes[2] > ind | ||
dSdt .*= ssys.p[ind] | ||
end | ||
@views ns = y[sim.domain.indexes[1]:sim.domain.indexes[2]] |
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.
Should revert this because we should only apply this correction to rate. The old way of implement will only happen once if the ind is within the particular simulation.
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.
Done
b61fe28
to
b3d12d8
Compare
b3d12d8
to
be40355
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #226 +/- ##
==========================================
- Coverage 49.70% 49.65% -0.05%
==========================================
Files 31 31
Lines 8138 8146 +8
==========================================
Hits 4045 4045
- Misses 4093 4101 +8 ☔ View full report in Codecov by Sentry. |
Should fix #223