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
163fcac7
Commit
163fcac7
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Updated the i/o routine of the gravity mode with potentials to use the new style.
parent
54d752f9
No related branches found
No related tags found
1 merge request
!876
Black holes repositioning
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gravity/Potential/gravity_io.h
+17
-8
17 additions, 8 deletions
src/gravity/Potential/gravity_io.h
with
17 additions
and
8 deletions
src/gravity/Potential/gravity_io.h
+
17
−
8
View file @
163fcac7
...
...
@@ -108,15 +108,24 @@ INLINE static void darkmatter_write_particles(const struct gpart* gparts,
/* List what we want to write */
list
[
0
]
=
io_make_output_field_convert_gpart
(
"Coordinates"
,
DOUBLE
,
3
,
UNIT_CONV_LENGTH
,
gparts
,
convert_gpart_pos
);
"Coordinates"
,
DOUBLE
,
3
,
UNIT_CONV_LENGTH
,
1
.
f
,
gparts
,
convert_gpart_pos
,
"Co-moving position of the particles"
);
list
[
1
]
=
io_make_output_field_convert_gpart
(
"Velocities"
,
FLOAT
,
3
,
UNIT_CONV_SPEED
,
gparts
,
convert_gpart_vel
);
list
[
2
]
=
io_make_output_field
(
"Masses"
,
FLOAT
,
1
,
UNIT_CONV_MASS
,
gparts
,
mass
);
list
[
3
]
=
io_make_output_field
(
"ParticleIDs"
,
ULONGLONG
,
1
,
UNIT_CONV_NO_UNITS
,
gparts
,
id_or_neg_offset
);
list
[
4
]
=
io_make_output_field
(
"Potentials"
,
FLOAT
,
1
,
UNIT_CONV_POTENTIAL
,
gparts
,
potential
);
"Velocities"
,
FLOAT
,
3
,
UNIT_CONV_SPEED
,
0
.
f
,
gparts
,
convert_gpart_vel
,
"Peculiar velocities of the stars. This is a * dx/dt where x is the "
"co-moving position of the particles."
);
list
[
2
]
=
io_make_output_field
(
"Masses"
,
FLOAT
,
1
,
UNIT_CONV_MASS
,
0
.
f
,
gparts
,
mass
,
"Masses of the particles"
);
list
[
3
]
=
io_make_output_field
(
"ParticleIDs"
,
ULONGLONG
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
gparts
,
id_or_neg_offset
,
"Unique ID of the particles"
);
list
[
4
]
=
io_make_output_field
(
"Potentials"
,
FLOAT
,
1
,
UNIT_CONV_POTENTIAL
,
-
1
.
f
,
gparts
,
potential
,
"Co-moving gravitational potential at position of the particles"
);
}
#endif
/* SWIFT_POTENTIAL_GRAVITY_IO_H */
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