Cadabra
Computer algebra system for field theory problems
Loading...
Searching...
No Matches
NDSolver.hh
Go to the documentation of this file.
1#pragma once
2
3#include "Storage.hh"
4#include "Exceptions.hh"
5
6namespace cadabra {
7
21
22 class NDSolver {
23 public:
24 NDSolver();
25
26 typedef std::vector<double> state_type;
27
28 // Integration function.
29 void operator()(const state_type &x, state_type &dxdt, const double t);
30
31 // Observer function.
32 void operator()( const state_type &x , double t );
33
34 // Set and check ODE(s).
35 void set_ODEs(const Ex&);
36
37 // Entry point.
38 void integrate();
39
40 private:
41 // Exception used by the observer function to terminate
42 // iteration in case an event happens.
43
44 class EventException : public CadabraException {
45 public:
46 EventException(std::string="");
47 };
48
49 std::vector< state_type > states;
50 std::vector< double > times;
51
52 Ex ODEs;
53 };
54
55};
Definition Exceptions.hh:7
Functions to handle the exchange properties of two or more symbols in a product.
Definition Adjform.cc:83
void set(rset_t::iterator &num, multiplier_t fac)
Definition Storage.cc:1063