2
0
mirror of https://github.com/boostorg/odeint.git synced 2026-01-26 06:42:23 +00:00

Merge branch 'master' of github.com:headmyshoulder/odeint-v2

This commit is contained in:
Mario Mulansky
2011-07-20 09:56:53 +02:00
8 changed files with 49 additions and 13 deletions

8
TODO
View File

@@ -1,9 +1,9 @@
* REFACTORING AND CLEANUP
* check if everywhere static_cast< value_type > is used
* check header guards
* check copyright note
* describe every file in the preamble
* check spacings, not tabs
OK * check header guards
OK * check copyright note
OK * describe every file in the preamble
OK * check spacings, not tabs
* DOCUMENTATION
* Tutorials

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -10,6 +10,8 @@
[include tutorial_special_topics.qbk]
[include tutorial_thrust_cuda.qbk]
[section Odeint in detail]
Different steppers

View File

@@ -107,19 +107,29 @@ It is quite easy but the compilation time might take very long. Furthermore, the
[units_observer]
The full cpp file for this example can be found here [@../../examples/harmonic_oscillator_units.cpp]
The full cpp file for this example can be found here [@../../examples/harmonic_oscillator_units.cpp].
[endsect]
[section Using Cuda and Thrust]
blah blah
[endsect]
[section Using matrices as state types]
Expanding resizing
[import ../examples/two_dimensional_phase_lattice.cpp]
odeint works well with a variety of different state types. It is not restricted to pure vector-wise types, like `vector< double >`, `array< double , N >`, `fusion::vector< double , double >`, etc. but also works with types having a different topology then simple vectors. Here, we show how odeint can be used with matrices as states type, in the next section we will show how can be used to solve ODEs defined on complex networks.
By default, odeint can be used with `ublas::matrix< T >` as state type for matrices. A simple example is a two-dimensional lattice of coupled phase oscillators. We like phas oscillators, they are extremly easy and might serve for different demonstration purposes. Other matrix types like `mtl::dense_matrix` or blitz arrays and matrices can used as well but need some kind of activation in order to work with odeint. This activation is described in following sections,
The definition of the system is
[two_dimensional_phase_lattice_definition]
This is in principle all. Please note, that the above code is far from being optimal. Better performance can be achieved if every interaction is only calculated once and iterators for columns and rows are used. Below are some visualizations of the evolution of this lattice equation.
[$phase_lattice_2d_0000.jpg] [$phase_lattice_2d_0100.jpg] [$phase_lattice_2d_1000.jpg]
The full cpp for this example can be found here [@../../examples/two_dimensional_phase_lattice.cpp].
[endsect]

View File

@@ -0,0 +1,21 @@
[section Using Cuda and Thrust]
[section Solving large systems]
phase oscillator ensemble
phase oscillator lattice
blah blah
[endsect]
[section Parameter studies and bifurcations]
Bifurcations in the lorenz system
alternativ lattice with many different disorder realizations
[endsect]
[endsect]

View File

@@ -29,7 +29,8 @@
using namespace std;
using namespace boost::numeric::odeint;
typedef boost::numeric::ublas::matrix< double , boost::numeric::ublas::basic_row_major<> , boost::numeric::ublas::unbounded_array< double > > state_type;
//[ two_dimensional_phase_lattice_definition
typedef boost::numeric::ublas::matrix< double > state_type;
struct two_dimensional_phase_lattice
{
@@ -63,6 +64,8 @@ struct two_dimensional_phase_lattice
double m_gamma;
};
//]
struct write_for_gnuplot
{