Skip to content
Snippets Groups Projects
Commit 6d0cfd1c authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Moved the potential defition to the main src directory

parent bd862b82
Branches
Tags
1 merge request!143Gravity particles
......@@ -45,25 +45,12 @@
/* Local headers. */
#include "swift.h"
#include "gravity/Default/potentials.h"
/* Engine policy flags. */
#ifndef ENGINE_POLICY
#define ENGINE_POLICY engine_policy_none
#endif
#if defined(MINIMAL_SPH) || defined(GADGET2_SPH) || defined(DEFAULT_SPH)
#define ENGINE_HYDRO engine_policy_hydro
#else
#define ENGINE_HYDRO 0
#endif
#if defined(EXTERNAL_POTENTIAL)
#define ENGINE_EXTERNAL_GRAVITY engine_policy_external_gravity
#else
#define ENGINE_EXTERNAL_GRAVITY 0
#endif
/**
* @brief Main routine that loads a few particles and generates some output.
*
......
......@@ -36,13 +36,13 @@ endif
include_HEADERS = space.h runner.h queue.h task.h lock.h cell.h part.h const.h \
engine.h swift.h serial_io.h timers.h debug.h scheduler.h proxy.h parallel_io.h \
common_io.h single_io.h multipole.h map.h tools.h partition.h clocks.h parser.h \
physical_constants.h physical_constants_cgs.h
physical_constants.h physical_constants_cgs.h potentials.h
# Common source files
AM_SOURCES = space.c runner.c queue.c task.c cell.c engine.c \
serial_io.c timers.c debug.c scheduler.c proxy.c parallel_io.c \
units.c common_io.c single_io.c multipole.c version.c map.c \
kernel.c tools.c part.c partition.c clocks.c parser.c gravity/Default/potentials.c \
kernel.c tools.c part.c partition.c clocks.c parser.c potentials.c \
physical_constants.c
# Include files for distribution, not installation.
......
......@@ -40,7 +40,7 @@
#include "task.h"
#include "partition.h"
#include "physical_constants.h"
#include "gravity/Default/potentials.h"
#include "potentials.h"
/* Some constants. */
enum engine_policy {
......
File moved
#ifndef SWIFT_POTENTIALS_H
#define SWIFT_POTENTIALS_H
#include "physical_constants_cgs.h"
#include "physical_constants.h"
#include "units.h"
......@@ -22,8 +23,7 @@ struct external_potential{
#define External_Potential_Mass (1e10 * SOLAR_MASS_IN_CGS / const_unit_mass_in_cgs)
__attribute__((always_inline)) INLINE static float external_gravity_pointmass_timestep(const struct phys_const* phys_const,
struct gpart* g) {
__attribute__((always_inline)) INLINE static float external_gravity_pointmass_timestep(const struct phys_const* phys_const, struct gpart* g) {
const double G_newton = phys_const->newton_gravity;
/* Currently no limit is imposed */
......
......@@ -41,6 +41,7 @@
#include "part.h"
#include "partition.h"
#include "physical_constants.h"
#include "potentials.h"
#include "queue.h"
#include "runner.h"
#include "scheduler.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment