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

feat: MTK Jacobian for CoupledDEs #229

Merged
merged 8 commits into from
Dec 2, 2024
Merged

Conversation

oameye
Copy link
Member

@oameye oameye commented Nov 23, 2024

resolves #228

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.43%. Comparing base (6c98239) to head (95e9738).
Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
ext/src/CoupledSDEs.jl 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #229      +/-   ##
==========================================
+ Coverage   82.00%   86.43%   +4.42%     
==========================================
  Files          15       17       +2     
  Lines         717      936     +219     
==========================================
+ Hits          588      809     +221     
+ Misses        129      127       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

test/jacobian.jl Outdated Show resolved Hide resolved
test/jacobian.jl Outdated Show resolved Hide resolved
test/jacobian.jl Outdated Show resolved Hide resolved
@Datseris
Copy link
Member

sorry for the late reply!

@@ -130,9 +133,11 @@ deterministic part of `ds`.
"""
function DynamicalSystemsBase.CoupledODEs(
sys::CoupledSDEs; diffeq=DEFAULT_DIFFEQ, t0=0.0)
prob = referrenced_sciml_prob(sys)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be nothing if the system is not constructed through MTK. Doesn't this break normal systems? You cna't do prob.f then.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It think you are confused with referrenced_sciml_model. Every ContineousTimeDynamicalSystem is made through a DEProblem. See

function CoupledODEs(f, u0, p = SciMLBase.NullParameters(); t0 = 0, diffeq = DEFAULT_DIFFEQ)
IIP = isinplace(f, 4) # from SciMLBase
s = correct_state(Val{IIP}(), u0)
T = eltype(s)
prob = ODEProblem{IIP}(f, s, (T(t0), T(Inf)), p)
return CoupledODEs(prob, diffeq)
end

@Datseris Datseris merged commit 30d09de into JuliaDynamics:main Dec 2, 2024
2 checks passed
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.

CoupledSDEs not a CoreDynamicalSystem?
3 participants