Skip to content

Enhance type flexibility for PoincareMap & Add a Bigfloat test#239

Merged
Datseris merged 3 commits into
JuliaDynamics:mainfrom
hibiki-kato:poincare-bigfloat-support
Nov 12, 2025
Merged

Enhance type flexibility for PoincareMap & Add a Bigfloat test#239
Datseris merged 3 commits into
JuliaDynamics:mainfrom
hibiki-kato:poincare-bigfloat-support

Conversation

@hibiki-kato

Copy link
Copy Markdown
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.

@Datseris Datseris left a comment

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, do you mind incrementing patch version number in Project.toml?

Comment thread test/poincare.jl Outdated
@Datseris

Copy link
Copy Markdown
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