Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
6e82cd6b
Commit
6e82cd6b
authored
9 years ago
by
Tom Theuns
Browse files
Options
Downloads
Patches
Plain Diff
updated include file for external potentials
parent
5c14e1f2
No related branches found
No related tags found
1 merge request
!143
Gravity particles
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/const.h
+2
-10
2 additions, 10 deletions
src/const.h
src/gravity/Default/gravity.h
+1
-1
1 addition, 1 deletion
src/gravity/Default/gravity.h
src/gravity/Default/potentials.h
+14
-0
14 additions, 0 deletions
src/gravity/Default/potentials.h
src/part.h
+0
-2
0 additions, 2 deletions
src/part.h
with
17 additions
and
13 deletions
src/const.h
+
2
−
10
View file @
6e82cd6b
...
@@ -73,10 +73,8 @@
...
@@ -73,10 +73,8 @@
#define NO_SPH
#define NO_SPH
/* Gravity properties */
/* Gravity properties */
#define GRAVITY
/* valid choices EXTERNAL_POTENTIAL_POINTMASS */
/* valid choices DEFAULT_GRAVITY || EXTERNAL_POTENTIAL */
#define EXTERNAL_POTENTIAL_POINTMASS
#define EXTERNAL_POTENTIAL
//#define DEFAULT_GRAVITY
/* System of units */
/* System of units */
...
@@ -88,10 +86,4 @@
...
@@ -88,10 +86,4 @@
#define const_unit_time_in_cgs (const_unit_length_in_cgs / const_unit_velocity_in_cgs)
#define const_unit_time_in_cgs (const_unit_length_in_cgs / const_unit_velocity_in_cgs)
#define const_G ((NEWTON_GRAVITY_CGS*const_unit_mass_in_cgs/(const_unit_velocity_in_cgs*const_unit_velocity_in_cgs*const_unit_length_in_cgs)))
#define const_G ((NEWTON_GRAVITY_CGS*const_unit_mass_in_cgs/(const_unit_velocity_in_cgs*const_unit_velocity_in_cgs*const_unit_length_in_cgs)))
/* External Potential Constants */
#define External_Potential_X (50000 * PARSEC_IN_CGS / const_unit_length_in_cgs)
#define External_Potential_Y (50000 * PARSEC_IN_CGS / const_unit_length_in_cgs)
#define External_Potential_Z (50000 * PARSEC_IN_CGS / const_unit_length_in_cgs)
#define External_Potential_Mass (1e10 * SOLAR_MASS_IN_CGS / const_unit_mass_in_cgs)
#endif
/* SWIFT_CONST_H */
#endif
/* SWIFT_CONST_H */
This diff is collapsed.
Click to expand it.
src/gravity/Default/gravity.h
+
1
−
1
View file @
6e82cd6b
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
******************************************************************************/
******************************************************************************/
#include
<float.h>
#include
<float.h>
#include
"potentials.h"
/**
/**
* @brief Computes the gravity time-step of a given particle
* @brief Computes the gravity time-step of a given particle
*
*
...
...
This diff is collapsed.
Click to expand it.
src/gravity/Default/potentials.h
0 → 100644
+
14
−
0
View file @
6e82cd6b
#ifndef SWIFT_GRAVITY_CONST_H
#define SWIFT_GRAVITY_CONST_H
/* External Potential Constants */
/* Properties of Point Mass */
#ifdef EXTERNAL_POTENTIAL_POINTMASS
#define External_Potential_X (50000 * PARSEC_IN_CGS / const_unit_length_in_cgs)
#define External_Potential_Y (50000 * PARSEC_IN_CGS / const_unit_length_in_cgs)
#define External_Potential_Z (50000 * PARSEC_IN_CGS / const_unit_length_in_cgs)
#define External_Potential_Mass (1e10 * SOLAR_MASS_IN_CGS / const_unit_mass_in_cgs)
#endif
#endif
/* SWIFT_GRAVITY_CONST_H */
This diff is collapsed.
Click to expand it.
src/part.h
+
0
−
2
View file @
6e82cd6b
...
@@ -51,9 +51,7 @@
...
@@ -51,9 +51,7 @@
#error "Invalid choice of SPH variant"
#error "Invalid choice of SPH variant"
#endif
#endif
#if defined(GRAVITY)
#include
"./gravity/Default/gravity_part.h"
#include
"./gravity/Default/gravity_part.h"
#endif
#ifdef WITH_MPI
#ifdef WITH_MPI
void
part_create_mpi_type
(
MPI_Datatype
*
part_type
);
void
part_create_mpi_type
(
MPI_Datatype
*
part_type
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment