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
0fd1bbd4
Commit
0fd1bbd4
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Moved the new time-step bin constant to the timeline.h file.
parent
43b0648f
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!956
Fully implement the timestep limiter (non MPI)
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/const.h
+0
-3
0 additions, 3 deletions
src/const.h
src/timeline.h
+4
-0
4 additions, 0 deletions
src/timeline.h
src/timestep.h
+2
-2
2 additions, 2 deletions
src/timestep.h
with
6 additions
and
5 deletions
src/const.h
+
0
−
3
View file @
0fd1bbd4
...
...
@@ -26,9 +26,6 @@
/* Time-step limiter maximal difference in signal velocity */
#define const_limiter_max_v_sig_ratio 4.1f
/* Maximal difference in time-bins between neighbouring particles */
#define const_timestep_limiter_max_delta_bin 2
/* I/O Constant; this determines the relative tolerance between the value of
* redshift read from the snapshot, and the value from the parameter file. This
* current value asserts that they must match within 0.1%. */
...
...
This diff is collapsed.
Click to expand it.
src/timeline.h
+
4
−
0
View file @
0fd1bbd4
...
...
@@ -50,6 +50,10 @@ typedef int8_t timebin_t;
/*! Fictitious time-bin for particles woken up */
#define time_bin_awake (-1)
/* Maximal difference in time-bins between neighbouring particles */
#define time_bin_neighbour_max_delta_bin 2
/**
* @brief Returns the integer time interval corresponding to a time bin
*
...
...
This diff is collapsed.
Click to expand it.
src/timestep.h
+
2
−
2
View file @
0fd1bbd4
...
...
@@ -31,7 +31,7 @@
* @brief Compute a valid integer time-step form a given time-step
*
* We consider the minimal time-bin of any neighbours and prevent particles
* to differ from it by a fixed constant `
const_timestep_limite
r_max_delta_bin`.
* to differ from it by a fixed constant `
time_bin_neighbou
r_max_delta_bin`.
*
* If min_ngb_bin is set to `num_time_bins`, then no limit from the neighbours
* is imposed.
...
...
@@ -53,7 +53,7 @@ make_integer_timestep(const float new_dt, const timebin_t old_bin,
/* Are we allowed to use this bin given the neighbours? */
timebin_t
new_bin
=
get_time_bin
(
new_dti
);
new_bin
=
min
(
new_bin
,
min_ngb_bin
+
const_timestep_limite
r_max_delta_bin
);
new_bin
=
min
(
new_bin
,
min_ngb_bin
+
time_bin_neighbou
r_max_delta_bin
);
new_dti
=
get_integer_timestep
(
new_bin
);
/* Current time-step */
...
...
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