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
ebc096a6
Commit
ebc096a6
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Moved the compiled-time parameters of the EAGLE black hole model to a separate file for clarity.
parent
756d2fe4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Makefile.am
+1
-1
1 addition, 1 deletion
src/Makefile.am
src/black_holes/EAGLE/black_holes_iact.h
+14
-8
14 additions, 8 deletions
src/black_holes/EAGLE/black_holes_iact.h
src/black_holes/EAGLE/black_holes_parameters.h
+39
-0
39 additions, 0 deletions
src/black_holes/EAGLE/black_holes_parameters.h
with
54 additions
and
9 deletions
src/Makefile.am
+
1
−
1
View file @
ebc096a6
...
...
@@ -235,7 +235,7 @@ nobase_noinst_HEADERS = align.h approx_math.h atomic.h barrier.h cycle.h error.h
black_holes/Default/black_holes_struct.h
\
black_holes/EAGLE/black_holes.h black_holes/EAGLE/black_holes_io.h
\
black_holes/EAGLE/black_holes_part.h black_holes/EAGLE/black_holes_iact.h
\
black_holes/EAGLE/black_holes_properties.h
\
black_holes/EAGLE/black_holes_properties.h
black_holes/EAGLE/black_holes_parameters.h
\
black_holes/EAGLE/black_holes_struct.h
\
pressure_floor/GEAR/pressure_floor.h pressure_floor/none/pressure_floor.h
\
pressure_floor/GEAR/pressure_floor_iact.h pressure_floor/none/pressure_floor_iact.h
\
...
...
This diff is collapsed.
Click to expand it.
src/black_holes/EAGLE/black_holes_iact.h
+
14
−
8
View file @
ebc096a6
...
...
@@ -20,6 +20,7 @@
#define SWIFT_EAGLE_BH_IACT_H
/* Local includes */
#include
"black_holes_parameters.h"
#include
"gravity.h"
#include
"hydro.h"
#include
"random.h"
...
...
@@ -146,11 +147,13 @@ runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
/* Start by checking the repositioning criteria */
/*
Note the factor 9
is
ta
ken from EAGLE. Will be turned into a parameter
*/
/*
(Square of) Max repositioning d
ista
nce allowed based on the softening
*/
const
float
max_dist_repos2
=
kernel_gravity_softening_plummer_equivalent_inv
*
kernel_gravity_softening_plummer_equivalent_inv
*
9
.
f
*
grav_props
->
epsilon_baryon_cur
*
grav_props
->
epsilon_baryon_cur
;
kernel_gravity_softening_plummer_equivalent_inv
*
const_max_repositioning_distance_ratio
*
const_max_repositioning_distance_ratio
*
grav_props
->
epsilon_baryon_cur
*
grav_props
->
epsilon_baryon_cur
;
/* This gas neighbour is close enough that we can consider it's potential
for repositioning */
...
...
@@ -250,11 +253,13 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
const
float
v2_pec
=
v2
*
cosmo
->
a2_inv
;
/*
Note the factor 9
is
ta
ken from EAGLE. Will be turned into a parameter
*/
/*
(Square of) Max repositioning d
ista
nce allowed based on the softening
*/
const
float
max_dist_repos2
=
kernel_gravity_softening_plummer_equivalent_inv
*
kernel_gravity_softening_plummer_equivalent_inv
*
9
.
f
*
grav_props
->
epsilon_baryon_cur
*
grav_props
->
epsilon_baryon_cur
;
kernel_gravity_softening_plummer_equivalent_inv
*
const_max_repositioning_distance_ratio
*
const_max_repositioning_distance_ratio
*
grav_props
->
epsilon_baryon_cur
*
grav_props
->
epsilon_baryon_cur
;
/* This gas neighbour is close enough that we can consider it's potential
for repositioning */
...
...
@@ -285,10 +290,11 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
h
=
hj
;
}
/*
Note the factor 9
is
ta
ken from EAGLE. Will be turned into a parameter
*/
/*
(Square of) Max swallowing d
ista
nce allowed based on the softening
*/
const
float
max_dist_merge2
=
kernel_gravity_softening_plummer_equivalent_inv
*
kernel_gravity_softening_plummer_equivalent_inv
*
9
.
f
*
kernel_gravity_softening_plummer_equivalent_inv
*
const_max_merging_distance_ratio
*
const_max_merging_distance_ratio
*
grav_props
->
epsilon_baryon_cur
*
grav_props
->
epsilon_baryon_cur
;
const
float
G_Newton
=
grav_props
->
G_Newton
;
...
...
This diff is collapsed.
Click to expand it.
src/black_holes/EAGLE/black_holes_parameters.h
0 → 100644
+
39
−
0
View file @
ebc096a6
/*******************************************************************************
* This file is part of SWIFT.
* Coypright (c) 2019 Matthieu Schaller (schaller@strw.leidenuniv.nl)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_EAGLE_BLACK_HOLES_PARAMETERS_H
#define SWIFT_EAGLE_BLACK_HOLES_PARAMETERS_H
/* Configuration file */
#include
"config.h"
/**
* @file EAGLE/black_holes_parameters.h
* @brief Parameters of the EAGLE black holes
* model that need to be defined at compile time.
*/
/*! Maximal distance for merging particles in units of the (spline not Plummer)
* softening length. */
#define const_max_merging_distance_ratio 3.f
/*! Maximal distance for repositioning particles in units of the (spline not
* Plummer) softening length. */
#define const_max_repositioning_distance_ratio 3.f
#endif
/* SWIFT_EAGLE_BLACK_HOLES_PARAMETERS_H */
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