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
8c30fc47
Commit
8c30fc47
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Removed h_max from the YAML file. Users can now specify a maximal number of top-level cells.
parent
a214d1a2
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!275
New h max definition
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/parameter_example.yml
+7
-7
7 additions, 7 deletions
examples/parameter_example.yml
src/space.c
+4
-1
4 additions, 1 deletion
src/space.c
src/space.h
+1
-0
1 addition, 0 deletions
src/space.h
with
12 additions
and
8 deletions
examples/parameter_example.yml
+
7
−
7
View file @
8c30fc47
...
...
@@ -8,11 +8,12 @@ InternalUnitSystem:
# Parameters for the task scheduling
Scheduler
:
nr_queues
:
0
# (Optional) The number of task queues to use. Use 0 to let the system decide.
cell_max_size
:
8000000
# (Optional) Maximal number of interactions per task if we force the split (this is the default value).
cell_sub_size
:
64000000
# (Optional) Maximal number of interactions per sub-task (this is the default value).
cell_split_size
:
400
# (Optional) Maximal number of particles per cell (this is the default value).
cell_max_count
:
10000
# (Optional) Maximal number of particles per cell allowed before triggering a sanitizing (this is the default value).
nr_queues
:
0
# (Optional) The number of task queues to use. Use 0 to let the system decide.
cell_max_size
:
8000000
# (Optional) Maximal number of interactions per task if we force the split (this is the default value).
cell_sub_size
:
64000000
# (Optional) Maximal number of interactions per sub-task (this is the default value).
cell_split_size
:
400
# (Optional) Maximal number of particles per cell (this is the default value).
cell_max_count
:
10000
# (Optional) Maximal number of particles per cell allowed before triggering a sanitizing (this is the default value).
max_top_level_cells
:
12
# (Optional) Maximal number of top-level cells per dimension. The number of top-level cells will be the cube of this.
# Parameters governing the time integration
TimeIntegration
:
...
...
@@ -43,9 +44,8 @@ Statistics:
SPH
:
resolution_eta
:
1.2348
# Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
delta_neighbours
:
0.1
# The tolerance for the targetted number of neighbours.
max_ghost_iterations
:
30
# (Optional) Maximal number of iterations allowed to converge towards the smoothing length.
max_smoothing_length
:
0.1
# Maximal smoothing length allowed (in internal units).
CFL_condition
:
0.1
# Courant-Friedrich-Levy condition for time integration.
max_ghost_iterations
:
30
# (Optional) Maximal number of iterations allowed to converge towards the smoothing length.
max_volume_change
:
2.
# (Optional) Maximal allowed change of kernel volume over one time-step
# Parameters related to the initial conditions
...
...
This diff is collapsed.
Click to expand it.
src/space.c
+
4
−
1
View file @
8c30fc47
...
...
@@ -1738,6 +1738,7 @@ void space_init(struct space *s, const struct swift_params *params,
s
->
dim
[
0
]
=
dim
[
0
];
s
->
dim
[
1
]
=
dim
[
1
];
s
->
dim
[
2
]
=
dim
[
2
];
const
double
dmax
=
max
(
max
(
dim
[
0
],
dim
[
1
]),
dim
[
2
]);
s
->
periodic
=
periodic
;
s
->
gravity
=
gravity
;
s
->
nr_parts
=
Npart
;
...
...
@@ -1746,7 +1747,9 @@ void space_init(struct space *s, const struct swift_params *params,
s
->
nr_gparts
=
Ngpart
;
s
->
size_gparts
=
Ngpart
;
s
->
gparts
=
gparts
;
s
->
cell_min
=
parser_get_param_double
(
params
,
"SPH:max_smoothing_length"
);
s
->
cell_min
=
dmax
/
parser_get_opt_param_int
(
params
,
"Scheduler:max_top_level_cells"
,
space_max_top_level_cells_default
);
s
->
nr_queues
=
1
;
/* Temporary value until engine construction */
/* Get the constants for the scheduler */
...
...
This diff is collapsed.
Click to expand it.
src/space.h
+
1
−
0
View file @
8c30fc47
...
...
@@ -42,6 +42,7 @@
#define space_maxsize_default 8000000
#define space_subsize_default 64000000
#define space_maxcount_default 10000
#define space_max_top_level_cells_default 12
#define space_stretch 1.10f
#define space_maxreldx 0.25f
...
...
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