Opened 7 years ago

Closed 5 years ago

#11452 closed Feature Requests (invalid)

[feature] Make odeint works with std::tuple and boost::units

Reported by: pierre blavy <blavy@…> Owned by: karsten
Milestone: To Be Determined Component: odeint
Version: Boost 1.57.0 Severity: Not Applicable
Keywords: odeint, units Cc:

Description

Dear developper, here is a patch that

  • make odeint work with std::tuple.
  • make odeint work with boost::units tuple.
  • patch std::numeric limits for boost::units::qunatity, by delegating limits to the underlying type. That's important as, without this patch, std::numeric_limits silently return stupid values with boost::units::quantity.

I'm not a boost developper and I realy had trouble to understand the documentation, so I'm not sure that the things I've done are correct or doens't break an other part of boost, so please, carefully review this code. I post it in the hope that it will be usefull for you.

Attachments (1)

Ode_boost_tuple.hpp (33.1 KB ) - added by pierre blavy <blavy@…> 7 years ago.
make odeint work with std::tuple

Download all attachments as: .zip

Change History (4)

by pierre blavy <blavy@…>, 7 years ago

Attachment: Ode_boost_tuple.hpp added

make odeint work with std::tuple

comment:1 by viboes, 7 years ago

Component: Noneodeint
Owner: set to karsten

comment:2 by anonymous, 7 years ago

Hi,

sorry for the very late reply. I think boost::tuple and std::tuple should already work with the fusion_algebra. This algebra is intended to work with heterogeneous containers like boost::fusion::vector<>, boost::tuple<>, std::tuple<> . Maybe one needs to specialize the fusion_algebra_dispatcher to work with with boost::tuple and std::tuple but in principle it should work. I will try to write a minimal example with std::tuple.

comment:3 by mariomulansky, 5 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.