File indexing completed on 2025-01-18 09:42:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_MAKE_DENSE_OUTPUT_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_MAKE_DENSE_OUTPUT_HPP_INCLUDED
0020
0021 namespace boost {
0022 namespace numeric {
0023 namespace odeint {
0024
0025
0026
0027 template< class Stepper > struct get_dense_output { };
0028
0029
0030
0031
0032 template< class Stepper , class DenseOutput >
0033 struct dense_output_factory
0034 {
0035 DenseOutput operator()(
0036 typename Stepper::value_type abs_error ,
0037 typename Stepper::value_type rel_error ,
0038 const Stepper &stepper )
0039 {
0040 return DenseOutput( abs_error , rel_error , stepper );
0041 }
0042
0043 DenseOutput operator()(
0044 typename Stepper::value_type abs_error ,
0045 typename Stepper::value_type rel_error ,
0046 typename Stepper::time_type max_dt ,
0047 const Stepper &stepper )
0048 {
0049 return DenseOutput( abs_error , rel_error , max_dt , stepper );
0050 }
0051 };
0052
0053
0054
0055 namespace result_of
0056 {
0057 template< class Stepper >
0058 struct make_dense_output
0059 {
0060 typedef typename get_dense_output< Stepper >::type type;
0061 };
0062 }
0063
0064
0065
0066 template< class Stepper >
0067 typename result_of::make_dense_output< Stepper >::type make_dense_output(
0068 typename Stepper::value_type abs_error ,
0069 typename Stepper::value_type rel_error ,
0070 const Stepper &stepper = Stepper() )
0071 {
0072 typedef Stepper stepper_type;
0073 typedef typename result_of::make_dense_output< stepper_type >::type dense_output_type;
0074 typedef dense_output_factory< stepper_type , dense_output_type > factory_type;
0075 factory_type factory;
0076 return factory( abs_error , rel_error , stepper );
0077 }
0078
0079
0080 template< class Stepper >
0081 typename result_of::make_dense_output< Stepper >::type make_dense_output(
0082 typename Stepper::value_type abs_error ,
0083 typename Stepper::value_type rel_error ,
0084 typename Stepper::time_type max_dt ,
0085 const Stepper &stepper = Stepper() )
0086 {
0087 typedef Stepper stepper_type;
0088 typedef typename result_of::make_dense_output< stepper_type >::type dense_output_type;
0089 typedef dense_output_factory< stepper_type , dense_output_type > factory_type;
0090 factory_type factory;
0091 return factory( abs_error , rel_error , max_dt, stepper );
0092 }
0093
0094
0095 }
0096 }
0097 }
0098
0099
0100 #endif