Skip to content

fixes for SolveIVP implementation#61

Open
soypat wants to merge 1 commit into
gonum:masterfrom
soypat:solveivp-fix
Open

fixes for SolveIVP implementation#61
soypat wants to merge 1 commit into
gonum:masterfrom
soypat:solveivp-fix

Conversation

@soypat

@soypat soypat commented Jun 3, 2023

Copy link
Copy Markdown
Contributor

Please take a look. Fixes issue raised in mail group: https://groups.google.com/g/gonum-dev/c/_B0R3518KNI

also adds initial conditions as part of result vector returned by SolveIVP as that seems reasonably intuitive.

@kortschak

Copy link
Copy Markdown
Member

What is the fix?

Comment thread ode/ode.go
if nx == 0 {
return nil, errors.New("state vector length can not be equal to zero. Has ivp been set?")
}
solver.Init(p)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@kortschak Forgot to initialize the integrator. This was the pressing problem that caused the crash since it meant some fields were nil upon attempting to integrate.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, that was my suspcion. Can you make a note of that in the commit message?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

alright!

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.

2 participants