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
23ae1c60
Commit
23ae1c60
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Reinstate the debugging checks
parent
8e34e0fa
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1077
Improved multipole acceptance criterion (MAC)
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/EAGLE_low_z/EAGLE_6/eagle_6.yml
+8
-6
8 additions, 6 deletions
examples/EAGLE_low_z/EAGLE_6/eagle_6.yml
src/multipole_accept.h
+2
-2
2 additions, 2 deletions
src/multipole_accept.h
src/runner_doiact_grav.c
+10
-2
10 additions, 2 deletions
src/runner_doiact_grav.c
with
20 additions
and
10 deletions
examples/EAGLE_low_z/EAGLE_6/eagle_6.yml
+
8
−
6
View file @
23ae1c60
...
...
@@ -53,12 +53,14 @@ Statistics:
# Parameters for the self-gravity scheme
Gravity
:
eta
:
0.025
# Constant dimensionless multiplier for time integration.
MAC
:
adaptive
epsilon_fmm
:
0.01
theta_cr
:
0.7
# Opening angle (Multipole acceptance criterion)
mesh_side_length
:
16
dithering
:
0
eta
:
0.025
# Constant dimensionless multiplier for time integration.
MAC
:
adaptive
epsilon_fmm
:
0.001
theta_cr
:
0.7
# Opening angle (Multipole acceptance criterion)
use_tree_below_softening
:
0
allow_truncation_in_MAC
:
1
mesh_side_length
:
16
dithering
:
0
comoving_DM_softening
:
0.0026994
# Comoving DM softening length (in internal units).
max_physical_DM_softening
:
0.0007
# Max physical DM softening length (in internal units).
comoving_baryon_softening
:
0.0026994
# Comoving DM softening length (in internal units).
...
...
This diff is collapsed.
Click to expand it.
src/multipole_accept.h
+
2
−
2
View file @
23ae1c60
...
...
@@ -59,8 +59,8 @@ __attribute__((nonnull, pure)) INLINE static int gravity_M2L_accept(
const
float
rho_B
=
use_rebuild_sizes
?
B
->
r_max_rebuild
:
B
->
r_max
;
#ifdef SWIFT_DEBUG_CHECKS
//
if (rho_A == 0.) error("Size of multipole A is 0!");
//
if (rho_B == 0.) error("Size of multipole B is 0!");
if
(
rho_A
==
0
.)
error
(
"Size of multipole A is 0!"
);
if
(
rho_B
==
0
.)
error
(
"Size of multipole B is 0!"
);
#endif
/* Compute the error estimator (without the 1/M_B term that cancels out) */
...
...
This diff is collapsed.
Click to expand it.
src/runner_doiact_grav.c
+
10
−
2
View file @
23ae1c60
...
...
@@ -538,7 +538,11 @@ static INLINE void runner_dopair_grav_pm_full(
const
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
// MATTHIEU: Do we want a check that the particle can indeed use M2P?
#ifdef SWIFT_DEBUG_CHECKS
if
(
!
gravity_M2P_accept
(
e
->
gravity_properties
,
&
gparts_i
[
pid
],
cj
->
grav
.
multipole
,
r2
*
1
.
01
,
periodic
))
error
(
"use_mpole[i] set when M2P accept fails"
);
#endif
/* Interact! */
float
f_x
,
f_y
,
f_z
,
pot_ij
;
...
...
@@ -670,7 +674,11 @@ static INLINE void runner_dopair_grav_pm_truncated(
const
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
// MATTHIEU: Do we want a check that the particle can indeed use M2P?
#ifdef SWIFT_DEBUG_CHECKS
if
(
!
gravity_M2P_accept
(
e
->
gravity_properties
,
&
gparts_i
[
pid
],
cj
->
grav
.
multipole
,
r2
*
1
.
01
,
/*periodic=*/
1
))
error
(
"use_mpole[i] set when M2P accept fails"
);
#endif
/* Interact! */
float
f_x
,
f_y
,
f_z
,
pot_ij
;
...
...
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