Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
6d0cfd1c
Commit
6d0cfd1c
authored
Mar 31, 2016
by
Matthieu Schaller
Browse files
Moved the potential defition to the main src directory
parent
bd862b82
Changes
6
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
6d0cfd1c
...
...
@@ -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.
*
...
...
src/Makefile.am
View file @
6d0cfd1c
...
...
@@ -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.
...
...
src/engine.h
View file @
6d0cfd1c
...
...
@@ -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
{
...
...
src/
gravity/Default/
potentials.c
→
src/potentials.c
View file @
6d0cfd1c
File moved
src/
gravity/Default/
potentials.h
→
src/potentials.h
View file @
6d0cfd1c
#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 */
...
...
src/swift.h
View file @
6d0cfd1c
...
...
@@ -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"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment