All Questions
39
questions
2
votes
1
answer
78
views
How can I make my force calculations better?
I am making a simple physics solver (haven't gotten to collision resolution or detection yet, just finished making it mt'ed), and when I apply forces through "W", "A", "S"...
0
votes
1
answer
77
views
Temperature of a Lennard-Jones system
Are the formulas used in getTemperature() and setTemperature() correct?
...
1
vote
2
answers
162
views
Minimalistic implementation of Leapfrog integration algorithm (2)
Please review this C++ listing of an implementation of Leapfrog integration.
This C++ listing is rewritten according to this review.
...
3
votes
1
answer
131
views
Improving execution time of physics, data acquisition triggering system simulation
Background
I'm attempting to write a physics simulation code, one portion of which involves simulating the triggering system of some equipment. The equipment works as follows: environmental noise (...
2
votes
1
answer
161
views
Simulation of a real capacitor to calculate its capacitance
The goal is to simulate a real flat plate capacitor in 2D. The potential of the armature is fixed to +V and -V, on the edges of the simulation cell the potential is zero. Between the plates of the ...
10
votes
1
answer
922
views
High performance physics simulation - core class design
Below is some stripped down code from a physics simulation. The classes Vector2, Line and ...
3
votes
1
answer
503
views
Barnes-Hut \$n\$-body simulation (3D) in C++
I have implemented the Barnes-Hut algorithm for \$n\$-body-simulations (in this case "sort-of" 3D-gravity - see below). I'd appreciate any comments for improving my code (especially ...
4
votes
2
answers
432
views
Clebsch-Gordan Coefficients Implementation
In scientific programming I often come into the position of needing to implement a rather obscure and complicated formula. Clebsch-Gordan coefficients are such a thing.
I'm mainly seeking advice on ...
8
votes
4
answers
2k
views
Simulation of a falling ball
I made a simple simulation of a falling ball. Is it possible to somehow improve or optimize this code? What tips can you give for development?
...
1
vote
1
answer
47
views
Optimize narrow phase contact detection for phyiscs simulation code
I'm trying to optimize the narrow phase of the contact detection in my code. I'm using OpenMP for multithreading.
That is the starting code:
...
13
votes
2
answers
5k
views
A Flappy bird Game
Here is a project that I have been working on for the past few days.
I have used the SFML library in C++ to make a flappy bird game of my own. I made this as a ...
3
votes
1
answer
78
views
Dynamical system animation framework
Introduction
I am developing a dynamical system simulation/animation framework, which
provides three abstract base classes, DynamicalSystem, ...
3
votes
1
answer
216
views
Molecular dynamics simulation
I'm looking for some fresh ideas on how to optimize a couple of functions in my C++ code. I run the code through a profiler and it shows that they take 20% and 40% of the time respectively. The ...
4
votes
2
answers
493
views
Modelling solar system, Runge-kutta 4 (n-Body problem)
I have a program that simulations all planets, where the forces due to each planet is considered during each time step.I'm looking to see where I could make some improvements.
main.cpp
...
33
votes
9
answers
8k
views
Simple n-body class in C++
As part of my training, I implemented a n-body class in C++ to simulate gravitational interaction of bodies and to get more familiar with features that C++ offers such as object oriented programming.
...