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
4a5121e0
Commit
4a5121e0
authored
1 year ago
by
Yves Revaz
Browse files
Options
Downloads
Patches
Plain Diff
fix a bug (?) in cooling_write_particles that was causing a segfault
parent
f352a18a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1803
fix a bug (?) in cooling_write_particles that was causing a segfault
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cooling/grackle/cooling_io.h
+6
-11
6 additions, 11 deletions
src/cooling/grackle/cooling_io.h
with
6 additions
and
11 deletions
src/cooling/grackle/cooling_io.h
+
6
−
11
View file @
4a5121e0
...
@@ -98,17 +98,15 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
...
@@ -98,17 +98,15 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
#endif
#endif
#if COOLING_GRACKLE_MODE >= 2
#if COOLING_GRACKLE_MODE >= 2
list
+=
num
;
list
[
6
]
=
list
[
0
]
=
io_make_output_field
(
"HM"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
io_make_output_field
(
"HM"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
cooling_data
.
HM_frac
,
"H- mass fraction"
);
cooling_data
.
HM_frac
,
"H- mass fraction"
);
list
[
1
]
=
list
[
7
]
=
io_make_output_field
(
"H2I"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
io_make_output_field
(
"H2I"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
cooling_data
.
H2I_frac
,
"H2I mass fraction"
);
cooling_data
.
H2I_frac
,
"H2I mass fraction"
);
list
[
2
]
=
list
[
8
]
=
io_make_output_field
(
"H2II"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
io_make_output_field
(
"H2II"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
cooling_data
.
H2II_frac
,
"H2II mass fraction"
);
cooling_data
.
H2II_frac
,
"H2II mass fraction"
);
...
@@ -116,20 +114,17 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
...
@@ -116,20 +114,17 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
#endif
#endif
#if COOLING_GRACKLE_MODE >= 3
#if COOLING_GRACKLE_MODE >= 3
list
+=
num
;
list
[
9
]
=
list
[
0
]
=
io_make_output_field
(
"DI"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
io_make_output_field
(
"DI"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
cooling_data
.
DI_frac
,
"DI mass fraction"
);
cooling_data
.
DI_frac
,
"DI mass fraction"
);
list
[
1
]
=
list
[
1
0
]
=
io_make_output_field
(
"DII"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
io_make_output_field
(
"DII"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
cooling_data
.
DII_frac
,
"DII mass fraction"
);
cooling_data
.
DII_frac
,
"DII mass fraction"
);
list
[
2
]
=
list
[
11
]
=
io_make_output_field
(
"HDI"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
io_make_output_field
(
"HDI"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
cooling_data
.
HDI_frac
,
"HDI mass fraction"
);
cooling_data
.
HDI_frac
,
"HDI mass fraction"
);
num
+=
3
;
num
+=
3
;
#endif
#endif
...
...
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