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
42b07bad
Commit
42b07bad
authored
6 years ago
by
Matthieu Schaller
Committed by
James Willis
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Also take the stars into account when computing the linking length
parent
753dd968
No related branches found
No related tags found
1 merge request
!543
Fof
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/main.c
+1
-1
1 addition, 1 deletion
examples/main.c
examples/main_fof.c
+1
-1
1 addition, 1 deletion
examples/main_fof.c
src/fof.c
+2
-2
2 additions, 2 deletions
src/fof.c
src/fof.h
+1
-1
1 addition, 1 deletion
src/fof.h
with
5 additions
and
5 deletions
examples/main.c
+
1
−
1
View file @
42b07bad
...
...
@@ -941,7 +941,7 @@ int main(int argc, char *argv[]) {
talking
,
restart_file
);
/* Initialise the FOF parameters. */
if
(
with_fof
)
fof_init
(
&
s
,
N_total
[
0
],
N_total
[
1
]);
if
(
with_fof
)
fof_init
(
&
s
,
N_total
[
0
],
N_total
[
1
]
,
N_total
[
2
]
);
if
(
myrank
==
0
)
{
clocks_gettime
(
&
toc
);
...
...
This diff is collapsed.
Click to expand it.
examples/main_fof.c
+
1
−
1
View file @
42b07bad
...
...
@@ -936,7 +936,7 @@ int main(int argc, char *argv[]) {
talking
,
restart_file
);
/* Initialise the FOF parameters. */
fof_init
(
&
s
,
N_total
[
0
],
N_total
[
1
]);
fof_init
(
&
s
,
N_total
[
0
],
N_total
[
1
]
,
N_total
[
2
]
);
if
(
myrank
==
0
)
{
clocks_gettime
(
&
toc
);
...
...
This diff is collapsed.
Click to expand it.
src/fof.c
+
2
−
2
View file @
42b07bad
...
...
@@ -46,7 +46,7 @@ MPI_Datatype group_length_mpi_type;
size_t
node_offset
;
/* Initialises parameters for the FOF search. */
void
fof_init
(
struct
space
*
s
,
long
long
Ngas
,
long
long
Ngparts
)
{
void
fof_init
(
struct
space
*
s
,
long
long
Ngas
,
long
long
Ngparts
,
long
long
Nstars
)
{
struct
engine
*
e
=
s
->
e
;
...
...
@@ -78,7 +78,7 @@ void fof_init(struct space *s, long long Ngas, long long Ngparts) {
/* Calculate the particle linking length based upon the mean inter-particle
* spacing of the DM particles. */
const
int
total_nr_dmparts
=
Ngparts
-
Ngas
;
const
long
long
total_nr_dmparts
=
Ngparts
-
Ngas
-
Nstars
;
double
l_x
=
l_x_scale
*
(
s
->
dim
[
0
]
/
cbrt
(
total_nr_dmparts
));
l_x
=
parser_get_opt_param_double
(
e
->
parameter_file
,
"FOF:absolute_linking_length"
,
l_x
);
...
...
This diff is collapsed.
Click to expand it.
src/fof.h
+
1
−
1
View file @
42b07bad
...
...
@@ -62,7 +62,7 @@ struct cell_pair_indices {
}
SWIFT_STRUCT_ALIGN
;
/* Function prototypes. */
void
fof_init
(
struct
space
*
s
,
long
long
Ngas
,
long
long
Ngparts
);
void
fof_init
(
struct
space
*
s
,
long
long
Ngas
,
long
long
Ngparts
,
long
long
Nstars
);
void
fof_search_cell
(
struct
space
*
s
,
struct
cell
*
c
);
void
fof_search_pair_cells
(
struct
space
*
s
,
struct
cell
*
ci
,
struct
cell
*
cj
);
void
fof_search_pair_cells_foreign
(
struct
space
*
s
,
struct
cell
*
ci
,
struct
cell
*
cj
,
int
*
link_count
,
struct
fof_mpi
**
group_links
,
int
*
group_links_size
);
...
...
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