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
42ffbf1d
Commit
42ffbf1d
authored
Nov 20, 2017
by
Matthieu Schaller
Browse files
Version that works but needs to call engine_marktasks instead of engine_unskip()
parent
de21792d
Changes
3
Hide whitespace changes
Inline
Side-by-side
examples/UniformDMBox/uniformBox.yml
View file @
42ffbf1d
...
...
@@ -9,9 +9,9 @@ InternalUnitSystem:
# Parameters governing the time integration
TimeIntegration
:
time_begin
:
0.
# The starting time of the simulation (in internal units).
time_end
:
1.
# The end time of the simulation (in internal units).
time_end
:
1
00
.
# The end time of the simulation (in internal units).
dt_min
:
1e-6
# The minimal time-step size of the simulation (in internal units).
dt_max
:
1
e-3
# The maximal time-step size of the simulation (in internal units).
dt_max
:
1
.
# The maximal time-step size of the simulation (in internal units).
Scheduler
:
max_top_level_cells
:
8
...
...
@@ -26,8 +26,8 @@ Snapshots:
# Parameters for the self-gravity scheme
Gravity
:
eta
:
0.025
# Constant dimensionless multiplier for time integration.
theta
:
0.
7
# Opening angle (Multipole acceptance criterion)
epsilon
:
0.0
0001
# Softening length (in internal units).
theta
:
0.
8
# Opening angle (Multipole acceptance criterion)
epsilon
:
0.0
1
# Softening length (in internal units).
# Parameters governing the conserved quantities statistics
Statistics
:
...
...
@@ -35,4 +35,4 @@ Statistics:
# Parameters related to the initial conditions
InitialConditions
:
file_name
:
./uniformDMBox_
50
.hdf5
# The file to read
file_name
:
./uniformDMBox_
16
.hdf5
# The file to read
src/engine.c
View file @
42ffbf1d
...
...
@@ -3564,9 +3564,14 @@ void engine_prepare(struct engine *e) {
/* Do we need rebuilding ? */
if
(
e
->
forcerebuild
)
engine_rebuild
(
e
,
0
);
/* Unskip active tasks and check for rebuild */
engine_unskip
(
e
);
message
(
"Rebuild done"
);
space_print_cells
(
e
->
s
);
/* Unskip active tasks and check for rebuild */
//engine_unskip(e);
engine_marktasks
(
e
);
/* Re-rank the tasks every now and then. */
if
(
e
->
tasks_age
%
engine_tasksreweight
==
1
)
{
scheduler_reweight
(
&
e
->
sched
,
e
->
verbose
);
...
...
@@ -4156,7 +4161,7 @@ void engine_step(struct engine *e) {
e
->
timeStep
=
(
e
->
ti_current
-
e
->
ti_old
)
*
e
->
timeBase
;
e
->
step_props
=
engine_step_prop_none
;
space_print_cells
(
e
->
s
);
//
space_print_cells(e->s);
//message("nr cells: %d %d", e->s->nr_cells, e->s->tot_cells);
message
(
"ti_current=%lld ti_old=%lld"
,
e
->
ti_current
,
e
->
ti_old
);
...
...
src/gravity/Default/gravity.h
View file @
42ffbf1d
...
...
@@ -78,7 +78,13 @@ gravity_compute_timestep_self(const struct gpart* const gp,
const
float
epsilon
=
gravity_get_softening
(
gp
);
/* Note that 0.66666667 = 2. (from Gadget) / 3. (Plummer softening) */
const
float
dt
=
sqrtf
(
0
.
66666667
f
*
grav_props
->
eta
*
epsilon
*
ac_inv
);
float
dt
=
sqrtf
(
0
.
66666667
f
*
grav_props
->
eta
*
epsilon
*
ac_inv
);
if
(
gp
->
id_or_neg_offset
==
1
)
{
dt
/=
1000
.;
message
(
"lower dt %e"
,
dt
);
}
return
dt
;
}
...
...
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