GraviDy
1.0
Gravitational Dynamics N-body integrator
|
#include <iomanip>
#include <iostream>
#include <ctime>
#include <cstdio>
#include <omp.h>
#include <cmath>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
Go to the source code of this file.
Classes | |
struct | double4 |
Defining the «double4» structure based on the CUDA definition for the CPU version, which not include the CUDA headers. More... | |
struct | double3 |
Defining the «double3» structure based on the CUDA definition for the CPU version, which not include the CUDA headers. More... | |
struct | Distance |
Structure to handle the distance of the particles, to be able to identify them while sorted. More... | |
struct | Energy |
This structure contains all the energy variables of the system. More... | |
struct | options |
Options to handling printing options, like printing the snapshot on the screen instead of a file; print the informaton of all the particles (id, mass, position, velocity, acceleration, jerk, current timestep); calculating and printing the lagrange radii. More... | |
struct | Predictor |
This structure contains the predicted information of a particle in some moment of the integration. More... | |
struct | Forces |
This structure contains the information of the Forces of a particle in some moment of the integration. More... | |
struct | Gtime |
This structure contains different times of the internal integration process. More... | |
struct | file_data |
General structure to read the INPUT file. More... | |
Typedefs | |
typedef struct double4 | double4 |
Defining the «double4» structure based on the CUDA definition for the CPU version, which not include the CUDA headers. More... | |
typedef struct double3 | double3 |
Defining the «double3» structure based on the CUDA definition for the CPU version, which not include the CUDA headers. More... | |
typedef struct Energy | Energy |
typedef struct options | options |
typedef struct Predictor | Predictor |
typedef struct Forces | Forces |
typedef struct Gtime | Gtime |
typedef struct file_data | file_data |
Variables | |
const int | G = 1 |
Gravitational constant. More... | |
const int | J = 6 |
Amount of neighbours to calculate the center of density of the system (Casertano & Hut 1985) More... | |
const float | CORE_MASS = 0.1 |
Common mass percentage in the core of a globular cluster. More... | |
const float | LAGRANGE_RADII [] = {0.01, 0.05, 0.1, 0.2, 0.5, 0.75} |
const double | E = 1e-4 |
Softening parameter. More... | |
const double | E2 = 1e-8 |
Softening parameter squared. More... | |
const float | ETA_S = 0.01 |
Initial ETA parameter to calculate the first timestep of all the particles of the system. More... | |
const float | ETA_N = 0.01 |
Iteration ETA parameter to calculate new timestep of all the active particles of the system, in a certain integration time. More... | |
const double | D_TIME_MIN = 1.1920928955078125e-07 |
Lower boundary for the particles timesteps, ![]() | |
const double | D_MTIME_MIN = 7.450580596923828e-09 |
Lower boundary for the binary timesteps, ![]() | |
const double | D_TIME_MAX = 0.125 |
Upper boundary for the particles timesteps, ![]() | |
const double | KERNEL_GFLOP = 48e-9 |
Defining the «double3» structure based on the CUDA definition for the CPU version, which not include the CUDA headers.
Defining the «double4» structure based on the CUDA definition for the CPU version, which not include the CUDA headers.
const float CORE_MASS = 0.1 |
Common mass percentage in the core of a globular cluster.
const double D_MTIME_MIN = 7.450580596923828e-09 |
Lower boundary for the binary timesteps, .
const double D_TIME_MAX = 0.125 |
Upper boundary for the particles timesteps, .
const double D_TIME_MIN = 1.1920928955078125e-07 |
Lower boundary for the particles timesteps, .
const double E = 1e-4 |
Softening parameter.
const double E2 = 1e-8 |
Softening parameter squared.
const float ETA_N = 0.01 |
Iteration ETA parameter to calculate new timestep of all the active particles of the system, in a certain integration time.
Based on Aarseth formula
const float ETA_S = 0.01 |
Initial ETA parameter to calculate the first timestep of all the particles of the system.
Based on Aarseth formula
const int G = 1 |
Gravitational constant.
Since we are working in N-body units we set G as one.
const int J = 6 |
Amount of neighbours to calculate the center of density of the system (Casertano & Hut 1985)
const double KERNEL_GFLOP = 48e-9 |
const float LAGRANGE_RADII[] = {0.01, 0.05, 0.1, 0.2, 0.5, 0.75} |