Questions tagged [odeint]

Odeint is a modern C++ library for numerically solving Ordinary Differential Equations.

Odeint is designed in a very flexible way such that the algorithms are completely independent of the underlying containers and even from the basic algebraic computations. That means odeint works not only with the standard containers like vector< double > or array< double , N > but also nicely cooperates with many other libraries.

Odeint can solve ODEs on GPUs by using nVidia's CUDA technology.

512 questions
0
votes
1 answer

Integrating ODEs on the GPU using boost and python

I posted here not too long ago about a model I am trying to build using pycuda which solves About 9000 coupled ODEs. My model is too slow however and an SO member suggested that memory transfers from host to GPU is probably the culprit. Right now…
0
votes
1 answer

Set current state in odeint

I would like to set the current_state of a stepper in boost::odeint. I have the following MWE: #include #include #include typedef std::array< double , 2 > state_type; void eqsys(const state_type &x,…
Richard
  • 56,349
  • 34
  • 180
  • 251
-1
votes
1 answer

Solve system of differential equation in python

I'm trying to solve a system of differential equations in python. I have a system composed by two equations where I have two variables, A and B. The initial condition are that A0=1e17 and B0=0, they change simultaneously. I wrote the following code…
-1
votes
1 answer

How do I fix np.float64 not callable error in scipy's odeint function?

So I'm trying to solve a coupled set of ODE-s with the scipy odeint function, and the error: 'numpy.float64' object is not callable keeps popping up. I have some experience with this function already, but I can't figure out which part is wrong. Here…
TGBS
  • 1
  • 1
-1
votes
1 answer

ODE Pendulum using odeint

I am trying to solve a simple mechanical problem, which is the non linear simple pendulum issue. For this, I have to use odeint from scipy. For a reminder, I have to solve the non linar ODE which is: theta'' + w²*sin(theta) = 0 Here is what I have…
Geo573
  • 142
  • 1
  • 10
-1
votes
1 answer

A loop to write equations to be used with odeint

I have an initial value problem that needs to be solved; the differential equations are derived from a dictionary that looks like: eqs = {'a': array([-1., 2., 4., 0., ...]), 'b': array([ 1., -10., 0., 0., ...]), 'c': array([ 0., 3., -4., …
DPdl
  • 723
  • 7
  • 23
-1
votes
1 answer

Writing functions from dictionaries to be used with solve_ivp

I am trying to solve a large system of differential equations using solve_ivp. from scipy import integrate def dXdt(X,t): return np.array([dadt(X,t), dbdt(X,t), dcdt(X,t), dddt(X,t]) sol = integrate.solve_ivp(dXdt, (0,100),…
DPdl
  • 723
  • 7
  • 23
-1
votes
1 answer

Issue with odeint from scipy.integrate when I start the range not at 0

I am writing a program to solve a differential equation in the form x''(t) + w^2(t)*x(t) = 0 so i used odeint. However, whenever it doesn't start from 0, it puts the first point as to what 0 should have been sin(t) when starting from t = -1 sin(t)…
-1
votes
1 answer

How can i simplify the codes?

I plotted the some graph based on the codes. But I think this is too complicate. How could I simplify the odeint, array and print codes. Do i need to use for, in codes? Although I already tried to use for, in codes to simplify the codes, I couldn't…
pochune
  • 13
  • 2
-1
votes
1 answer

TypeError: can't convert expression to floatv

I am trying to access the elements of a matrix to use them as expressions when I call another function that will calculate some differential equations for me. However, in the line that I have "dydt = odeint(model,[0,0],t) #(model, initial…
Charles Wagner
  • 103
  • 1
  • 2
  • 10
-1
votes
1 answer

Can't use implicit solver from OdeInt properly in Xcode 7.3.1

I have to solve some stiff ordinary differential equations, so I informed myself about the implicit methods that Odeint provides. However, when I copy and complie in Xcode the example in the documentation of…
Flori
  • 1
  • 2
-1
votes
2 answers

ODEINT output to txt file instead of console

Is there a way to write the outputs of t and x of this example to a txt file instead of the console. Thanks! This is the example I copied from Odeint website. #include #include using namespace std; using…
hn.phuong
  • 835
  • 6
  • 15
  • 24
-1
votes
1 answer

How can one use scipy odeint to obtain multiple solutions?

I am learning how to use odeint in Scipy to solve ODEs. Now I am trying to solve Schrodinger equation with a semi-infinite potential well: V(x) = -v (x<0) V(x) = 0 (x>0) v > 0 -f''(x)/2 +V(x)f(x) = energy*f(x) -v < energy < 0 So the exact solution…
Kala
  • 43
  • 6
-1
votes
1 answer

How to set a numpy array in loop and plot

I'm trying to modify a code from the scipy cookbook The scipy cookbook solves some state equations then prints them: wsol = odeint(two_springs.vectorfield, w0, t, args=(p,), atol=abserr, rtol=relerr) for t1, w1 in zip(t, wsol): …
amchugh89
  • 1,276
  • 1
  • 14
  • 33
-2
votes
1 answer

Do I need to install Boost to build odeint?

I am trying to solve ODE by using odeint package. The odeint website provides a download on their package. I downloaded the zip file included it in my project but it doesn't work. I understand that if I download the whole boost package, it…
drbombe
  • 609
  • 7
  • 15
1 2 3
34
35