mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-04 23:14:57 -04:00
Squashed 'boost/' content from commit b4feb19f2
git-subtree-dir: boost git-subtree-split: b4feb19f287ee92d87a9624b5d36b7cf46aeadeb
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Copyright 2011 Mario Mulansky
|
||||
# Copyright 2012 Karsten Ahnert
|
||||
# Distributed under the Boost Software License, Version 1.0. (See
|
||||
# accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
project
|
||||
: requirements
|
||||
<define>BOOST_ALL_NO_LIB=1
|
||||
;
|
||||
|
||||
exe lorenz_ublas : lorenz_ublas.cpp ;
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2011-2013 Mario Mulansky
|
||||
* Copyright 2012 Karsten Ahnert
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
#include <boost/numeric/ublas/vector.hpp>
|
||||
|
||||
typedef boost::numeric::ublas::vector< double > state_type;
|
||||
|
||||
void lorenz( const state_type &x , state_type &dxdt , const double t )
|
||||
{
|
||||
const double sigma( 10.0 );
|
||||
const double R( 28.0 );
|
||||
const double b( 8.0 / 3.0 );
|
||||
|
||||
dxdt[0] = sigma * ( x[1] - x[0] );
|
||||
dxdt[1] = R * x[0] - x[1] - x[0] * x[2];
|
||||
dxdt[2] = -b * x[2] + x[0] * x[1];
|
||||
}
|
||||
|
||||
using namespace boost::numeric::odeint;
|
||||
|
||||
//[ublas_main
|
||||
int main()
|
||||
{
|
||||
state_type x(3);
|
||||
x[0] = 10.0; x[1] = 5.0 ; x[2] = 0.0;
|
||||
typedef runge_kutta_dopri5< state_type > stepper;
|
||||
integrate_const( make_dense_output< stepper >( 1E-6 , 1E-6 ) , lorenz , x ,
|
||||
0.0 , 10.0 , 0.1 );
|
||||
}
|
||||
//]
|
||||
Reference in New Issue
Block a user