Skip to content

Conversation

@hibiki-kato
Copy link
Contributor

Resolves #237

This PR adds flexibility for data types in Poincaré mapping, especially enabling its use with BigFloat.

In DynamicalSystems.jl, the type of time variable t is inherited from the type of the state variable u0.
However, in the current implementation, the PoincareMap struct hard-codes Float64 for its arguments Tmax and tcross.

As a result, constructing a dynamical system with BigFloat (for example, to compute a high-precision Poincaré section) leads to a type error, which also limits the achievable numerical precision.

This PR generalizes the struct by introducing a type parameter for flexibility.

The included test demonstrates that, with Roots.jl, the BigFloat-based system now works correctly, and the Poincaré section can be obtained with high precision.

Copy link
Member

@Datseris Datseris left a comment

Choose a reason for hiding this comment

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

Thanks, do you mind incrementing patch version number in Project.toml?

@Datseris
Copy link
Member

error is unrelated, thanks for your contqribution!

@Datseris Datseris merged commit 6f02500 into JuliaDynamics:main Nov 12, 2025
1 of 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.

Is there a specific reason why Float64 was enforced in PoincareMap?

2 participants