|
pure-cpp 1.0.0
A C++ physics simulation benchmark comparing performance with Python implementations
|
N-body simulation space with gravitational interaction and collision response. More...
#include <omp.h>#include <chrono>#include <cstddef>#include <memory>#include <optional>#include <stdexcept>#include <vector>#include "body.hpp"#include "config.hpp"#include "constants.hpp"#include "kdtree.hpp"

Go to the source code of this file.
Classes | |
| struct | Model::CollisionContext |
| A data container to hold all relevant information for a single collision event. More... | |
| class | Model::Space |
| Class describing a space in which move several bodies. More... | |
N-body simulation space with gravitational interaction and collision response.
This file defines the Space class, which manages the state and dynamics of all bodies in the simulation. The physics model includes:
This file is part of the pure C++ benchmark.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Definition in file space.hpp.