All Questions
4 questions
2
votes
1
answer
143
views
Euler method in c++; Values getting too big too fast
i am trying to solve the equation of motion for a particle with mass m attached to a spring with a spring constant k. Both are set to 1 however.
The algorithm looks like this:
My (attempted) solution,...
1
vote
1
answer
247
views
Why does my solution for the quantum harmonic oscillator blow up?
I am using odeint to solve for the energy levels of the QHO (Griffiths problem 2.55).
I am integrating from x=0 to x=3. When I plot the results, I expect to see half of a gaussian with a tail that ...
1
vote
0
answers
434
views
Implementing the Lanczos algorithm into C++ for a quantum anharmonic oscillator
Firstly, I would like to mention that I am a complete beginner when it comes to coding, let alone C++, so bear with me, as I need complete guidance. My task is to implement the Lanczos algorithm for ...
14
votes
2
answers
5k
views
N body simulation in C++
I am trying to implement an OpenMP version of the 2-dimensional n-body simulation.
But there is a problem: I assume each particle's initial velocity and acceleration are zero. When the particles ...