|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57899 - in sandbox/odeint: boost/numeric/odeint libs/numeric/odeint/examples
From: karsten.ahnert_at_[hidden]
Date: 2009-11-24 14:12:44
Author: karsten
Date: 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
New Revision: 57899
URL: http://svn.boost.org/trac/boost/changeset/57899
Log:
next_step to do_step and try_step
Binary files modified:
sandbox/odeint/boost/numeric/odeint/stepper_rk5_ck.hpp
Text files modified:
sandbox/odeint/boost/numeric/odeint/controlled_stepper_standard.hpp | 4 ++--
sandbox/odeint/boost/numeric/odeint/integrator_adaptive_stepsize.hpp | 2 +-
sandbox/odeint/boost/numeric/odeint/integrator_constant_stepsize.hpp | 4 ++--
sandbox/odeint/boost/numeric/odeint/stepper_euler.hpp | 6 +++---
sandbox/odeint/boost/numeric/odeint/stepper_half_step.hpp | 20 ++++++++++----------
sandbox/odeint/boost/numeric/odeint/stepper_midpoint.hpp | 6 +++---
sandbox/odeint/boost/numeric/odeint/stepper_rk4.hpp | 6 +++---
sandbox/odeint/boost/numeric/odeint/stepper_rk4_classical.hpp | 6 +++---
sandbox/odeint/boost/numeric/odeint/stepper_rk_generic.hpp | 12 ++++++------
sandbox/odeint/libs/numeric/odeint/examples/harmonic_oscillator.cpp | 4 ++--
sandbox/odeint/libs/numeric/odeint/examples/lorenz_cmp_rk4_rk_generic.cpp | 8 ++++----
sandbox/odeint/libs/numeric/odeint/examples/lorenz_stepper.cpp | 4 ++--
12 files changed, 41 insertions(+), 41 deletions(-)
Modified: sandbox/odeint/boost/numeric/odeint/controlled_stepper_standard.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/controlled_stepper_standard.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/controlled_stepper_standard.hpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -101,7 +101,7 @@
is returned.
*/
template< class DynamicalSystem >
- controlled_step_result next_step(
+ controlled_step_result try_step(
DynamicalSystem &system,
container_type &x,
time_type &t,
@@ -111,7 +111,7 @@
x_tmp = x; // copy current state
system( x, dxdt, t ); // compute dxdt
- m_stepper.next_step(system, x, dxdt, t, dt, x_err ); // do step forward with error
+ m_stepper.do_step(system, x, dxdt, t, dt, x_err ); // do step forward with error
iterator x_start = x_tmp.begin();
iterator dxdt_start = dxdt.begin();
Modified: sandbox/odeint/boost/numeric/odeint/integrator_adaptive_stepsize.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/integrator_adaptive_stepsize.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/integrator_adaptive_stepsize.hpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -48,7 +48,7 @@
while( t < end_time )
{
// do a controlled step
- result = stepper.next_step( system, state, t, dt_ );
+ result = stepper.try_step( system, state, t, dt_ );
if( result != step_size_decreased )
{ // we actually did a step forward (dt was small enough)
Modified: sandbox/odeint/boost/numeric/odeint/integrator_constant_stepsize.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/integrator_constant_stepsize.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/integrator_constant_stepsize.hpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -39,7 +39,7 @@
while( start_time < end_time )
{
observer( start_time , state , system );
- stepper.next_step( system , state , start_time , dt );
+ stepper.do_step( system , state , start_time , dt );
start_time += dt;
++iteration;
}
@@ -93,7 +93,7 @@
while( iteration < num_of_steps )
{
observer( start_time , state , system );
- stepper.next_step( system , state , start_time , dt );
+ stepper.do_step( system , state , start_time , dt );
start_time += dt;
++iteration;
}
Modified: sandbox/odeint/boost/numeric/odeint/stepper_euler.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/stepper_euler.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/stepper_euler.hpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -77,7 +77,7 @@
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
const container_type &dxdt ,
time_type t ,
@@ -88,14 +88,14 @@
}
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
time_type t ,
time_type dt )
{
m_resizer.adjust_size( x , m_dxdt );
system( x , m_dxdt , t );
- next_step( system , x , m_dxdt , t , dt );
+ do_step( system , x , m_dxdt , t , dt );
}
};
Modified: sandbox/odeint/boost/numeric/odeint/stepper_half_step.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/stepper_half_step.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/stepper_half_step.hpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -71,28 +71,28 @@
}
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
container_type &dxdt ,
time_type t ,
time_type dt )
{
- m_stepper.next_step( system , x , dxdt , t , dt );
+ m_stepper.do_step( system , x , dxdt , t , dt );
}
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
time_type t ,
time_type dt )
{
- m_stepper.next_step( system , x , t , dt );
+ m_stepper.do_step( system , x , t , dt );
}
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
container_type &dxdt ,
time_type t ,
@@ -104,9 +104,9 @@
m_xtemp = x;
time_type dt2 = static_cast<time_type>(0.5) * dt;
- next_step( system , m_xtemp , dxdt , t , dt );
- next_step( system , x , dxdt , t , dt2 );
- next_step( system , x , t+dt2 , dt2 );
+ do_step( system , m_xtemp , dxdt , t , dt );
+ do_step( system , x , dxdt , t , dt2 );
+ do_step( system , x , t+dt2 , dt2 );
detail::it_algebra::assign_diff( xerr.begin() ,
xerr.end() ,
@@ -117,7 +117,7 @@
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
time_type t ,
time_type dt ,
@@ -125,7 +125,7 @@
{
m_resizer.adjust_size( x , m_dxdt );
system( x , m_dxdt , t );
- next_step( system , x , m_dxdt , t , dt , xerr );
+ do_step( system , x , m_dxdt , t , dt , xerr );
}
};
Modified: sandbox/odeint/boost/numeric/odeint/stepper_midpoint.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/stepper_midpoint.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/stepper_midpoint.hpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -85,7 +85,7 @@
}
template< class DynamicalSystem >
- void next_step(
+ void do_step(
DynamicalSystem &system ,
container_type &x ,
container_type &dxdt ,
@@ -135,7 +135,7 @@
template< class DynamicalSystem >
- void next_step(
+ void do_step(
DynamicalSystem &system ,
container_type &x ,
time_type t ,
@@ -144,7 +144,7 @@
{
m_resizer.adjust_size(x, m_dxdt);
system( x, m_dxdt, t );
- next_step( system , x, m_dxdt, t, dt, n );
+ do_step( system , x, m_dxdt, t, dt, n );
}
Modified: sandbox/odeint/boost/numeric/odeint/stepper_rk4.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/stepper_rk4.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/stepper_rk4.hpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -82,7 +82,7 @@
order_type order() const { return 4; }
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
container_type &dxdt ,
time_type t ,
@@ -134,14 +134,14 @@
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
time_type t ,
time_type dt )
{
m_resizer.adjust_size( x , m_dxdt );
system( x , m_dxdt , t );
- next_step( system , x , m_dxdt , t , dt );
+ do_step( system , x , m_dxdt , t , dt );
}
Modified: sandbox/odeint/boost/numeric/odeint/stepper_rk4_classical.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/stepper_rk4_classical.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/stepper_rk4_classical.hpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -77,7 +77,7 @@
order_type order() const { return 4; }
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
container_type &dxdt ,
time_type t ,
@@ -116,14 +116,14 @@
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
time_type t ,
time_type dt )
{
m_resizer.adjust_size( x , m_dxdt );
system( x , m_dxdt , t );
- next_step( system , x , m_dxdt , t , dt );
+ do_step( system , x , m_dxdt , t , dt );
}
Modified: sandbox/odeint/boost/numeric/odeint/stepper_rk5_ck.hpp
==============================================================================
Binary files. No diff available.
Modified: sandbox/odeint/boost/numeric/odeint/stepper_rk_generic.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/stepper_rk_generic.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/stepper_rk_generic.hpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -200,7 +200,7 @@
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
container_type &dxdt ,
time_type t ,
@@ -242,14 +242,14 @@
}
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
time_type t ,
time_type dt )
{
m_resizer.adjust_size(x, m_xtmp);
system(x, m_xtmp, t);
- next_step( system, x, m_xtmp, t, dt);
+ do_step( system, x, m_xtmp, t, dt);
}
};
@@ -384,7 +384,7 @@
order_type order() const { return m_q; }
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
container_type &dxdt ,
time_type t ,
@@ -430,14 +430,14 @@
template< class DynamicalSystem >
- void next_step( DynamicalSystem &system ,
+ void do_step( DynamicalSystem &system ,
container_type &x ,
time_type t ,
time_type dt )
{
m_resizer.adjust_size(x, m_xtmp);
system(x, m_xtmp, t);
- next_step( system, x, m_xtmp, t, dt);
+ do_step( system, x, m_xtmp, t, dt);
}
};
Modified: sandbox/odeint/libs/numeric/odeint/examples/harmonic_oscillator.cpp
==============================================================================
--- sandbox/odeint/libs/numeric/odeint/examples/harmonic_oscillator.cpp (original)
+++ sandbox/odeint/libs/numeric/odeint/examples/harmonic_oscillator.cpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -186,10 +186,10 @@
r_error_rms += pow(r_error, 2);
// Advance the solvers
- euler.next_step(harm_osc::harmonic_oscillator,
+ euler.do_step(harm_osc::harmonic_oscillator,
x_euler, t, harm_osc::dt);
- rk4.next_step(harm_osc::harmonic_oscillator,
+ rk4.do_step(harm_osc::harmonic_oscillator,
x_rk4, t, harm_osc::dt);
}
Modified: sandbox/odeint/libs/numeric/odeint/examples/lorenz_cmp_rk4_rk_generic.cpp
==============================================================================
--- sandbox/odeint/libs/numeric/odeint/examples/lorenz_cmp_rk4_rk_generic.cpp (original)
+++ sandbox/odeint/libs/numeric/odeint/examples/lorenz_cmp_rk4_rk_generic.cpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -93,7 +93,7 @@
t = 0.0;
start= clock();
for( size_t oi=1 ; oi<olen ; ++oi,t+=dt ) {
- stepper_rk4.next_step( lorenz , x1 , t , dt );
+ stepper_rk4.do_step( lorenz , x1 , t , dt );
if( oi < 5 )
cout << "x after step "<<oi<<": "<<x1[0]<<tab<<x1[1]<<tab<<x1[2]<<endl;
@@ -108,7 +108,7 @@
t = 0.0;
start= clock();
for( size_t oi=1 ; oi<olen ; ++oi,t+=dt ) {
- stepper_generic4.next_step( lorenz , x2 , t , dt );
+ stepper_generic4.do_step( lorenz , x2 , t , dt );
if( oi < 5 )
cout << "x after step "<<oi<<": "<<x2[0]<<tab<<x2[1]<<tab<<x2[2]<<endl;
}
@@ -122,7 +122,7 @@
t = 0.0;
start= clock();
for( size_t oi=1 ; oi<olen ; ++oi,t+=dt ) {
- stepper_generic4_ptr.next_step( lorenz , x3 , t , dt );
+ stepper_generic4_ptr.do_step( lorenz , x3 , t , dt );
if( oi < 5 )
cout << "x after step "<<oi<<": "<<x3[0]<<tab<<x3[1]<<tab<<x3[2]<<endl;
}
@@ -137,7 +137,7 @@
t = 0.0;
start= clock();
for( size_t oi=1 ; oi<olen ; ++oi,t+=dt ) {
- stepper_rk4_classical.next_step( lorenz , x3 , t , dt );
+ stepper_rk4_classical.do_step( lorenz , x3 , t , dt );
if( oi < 5 )
cout << "x after step "<<oi<<": "<<x3[0]<<tab<<x3[1]<<tab<<x3[2]<<endl;
}
Modified: sandbox/odeint/libs/numeric/odeint/examples/lorenz_stepper.cpp
==============================================================================
--- sandbox/odeint/libs/numeric/odeint/examples/lorenz_stepper.cpp (original)
+++ sandbox/odeint/libs/numeric/odeint/examples/lorenz_stepper.cpp 2009-11-24 14:12:43 EST (Tue, 24 Nov 2009)
@@ -78,7 +78,7 @@
start= clock();
t = 0.0;
for( size_t oi=0 ; oi<olen ; ++oi,t+=dt )
- stepper1.next_step( lorenz1 , x1 , t , dt );
+ stepper1.do_step( lorenz1 , x1 , t , dt );
end = clock();
cout << "vector : " << double ( end - start ) / double( CLOCKS_PER_SEC ) << endl;
cout << "x: "<<x1[0]<<tab<<x1[1]<<tab<<x1[2]<<endl;
@@ -87,7 +87,7 @@
start= clock();
t = 0.0;
for( size_t oi=0 ; oi<olen ; ++oi,t+=dt )
- stepper2.next_step( lorenz2 , x2 , t , dt );
+ stepper2.do_step( lorenz2 , x2 , t , dt );
end = clock();
cout << "array : " << double ( end - start ) / double( CLOCKS_PER_SEC ) << endl;
cout << "x: "<<x2[0]<<tab<<x2[1]<<tab<<x2[2]<<endl;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk