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
820f2846
Commit
820f2846
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Fix old bug in the original linking of gas and gparts read in from the ICs.
parent
f0b6fa84
No related branches found
No related tags found
1 merge request
!516
More cosmology work
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/main.c
+3
-0
3 additions, 0 deletions
examples/main.c
src/common_io.c
+2
-2
2 additions, 2 deletions
src/common_io.c
src/scheduler.c
+2
-1
2 additions, 1 deletion
src/scheduler.c
with
7 additions
and
3 deletions
examples/main.c
+
3
−
0
View file @
820f2846
...
...
@@ -679,6 +679,9 @@ int main(int argc, char *argv[]) {
for
(
size_t
k
=
0
;
k
<
Ngpart
;
++
k
)
if
(
gparts
[
k
].
type
==
swift_type_gas
)
error
(
"Linking problem"
);
}
/* Check that the other links are correctly set */
part_verify_links
(
parts
,
gparts
,
sparts
,
Ngas
,
Ngpart
,
Nspart
,
1
);
#endif
/* Get the total number of particles across all nodes. */
...
...
This diff is collapsed.
Click to expand it.
src/common_io.c
+
2
−
2
View file @
820f2846
...
...
@@ -708,7 +708,7 @@ void io_duplicate_hydro_gparts_mapper(void* restrict data, int Ngas,
gparts
[
i
+
Ndm
].
type
=
swift_type_gas
;
/* Link the particles */
gparts
[
i
+
Ndm
].
id_or_neg_offset
=
-
i
;
gparts
[
i
+
Ndm
].
id_or_neg_offset
=
-
(
long
long
)(
offset
+
i
)
;
parts
[
i
].
gpart
=
&
gparts
[
i
+
Ndm
];
}
}
...
...
@@ -764,7 +764,7 @@ void io_duplicate_hydro_sparts_mapper(void* restrict data, int Nstars,
gparts
[
i
+
Ndm
].
type
=
swift_type_star
;
/* Link the particles */
gparts
[
i
+
Ndm
].
id_or_neg_offset
=
-
i
;
gparts
[
i
+
Ndm
].
id_or_neg_offset
=
-
(
long
long
)(
offset
+
i
)
;
sparts
[
i
].
gpart
=
&
gparts
[
i
+
Ndm
];
}
}
...
...
This diff is collapsed.
Click to expand it.
src/scheduler.c
+
2
−
1
View file @
820f2846
...
...
@@ -1435,7 +1435,8 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
switch
(
t
->
type
)
{
case
task_type_self
:
case
task_type_sub_self
:
if
(
t
->
subtype
==
task_subtype_grav
||
t
->
subtype
==
task_subtype_external_grav
)
if
(
t
->
subtype
==
task_subtype_grav
||
t
->
subtype
==
task_subtype_external_grav
)
qid
=
t
->
ci
->
super_gravity
->
owner
;
else
qid
=
t
->
ci
->
super_hydro
->
owner
;
...
...
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