#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <mpi.h>
#include "allvars.h"
#include "proto.h"
Go to the source code of this file.
Functions | |
void | compute_accelerations (int mode) |
Definition in file accel.c.
|
This routine computes the accelerations for all active particles. First, the long-range PM force is computed if the TreePM algorithm is used and a "big" PM step is done. Next, the gravitational tree forces are computed. This also constructs the tree, if needed. If gas particles are present, the density-loop for active SPH particles is carried out. This includes an iteration on the correct number of neighbours. Finally, the hydrodynamical forces are added. Definition at line 24 of file accel.c. References All, global_data_all_processes::CPU_Gravity, global_data_all_processes::CPU_Hydro, global_data_all_processes::CPU_PM, global_data_all_processes::CPU_Predict, density(), force_update_hmax(), gravity_forcetest(), gravity_tree(), hydro_force(), long_range_force(), global_data_all_processes::PM_Ti_endstep, second(), ThisTask, global_data_all_processes::Ti_Current, timediff(), global_data_all_processes::TotN_gas, and global_data_all_processes::TypeOfOpeningCriterion. Referenced by run(). |