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
ba67300e
Commit
ba67300e
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Print the description of the output fields as comments in the output list yaml file.
parent
20e2cd54
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!824
Add a description and a scale-factor exponent to each individual array written to the snapshots.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/black_holes/Default/black_holes_part.h
+2
-0
2 additions, 0 deletions
src/black_holes/Default/black_holes_part.h
src/common_io.c
+8
-1
8 additions, 1 deletion
src/common_io.c
src/gravity/Default/gravity_io.h
+2
-2
2 additions, 2 deletions
src/gravity/Default/gravity_io.h
with
12 additions
and
3 deletions
src/black_holes/Default/black_holes_part.h
+
2
−
0
View file @
ba67300e
...
...
@@ -22,6 +22,8 @@
/* Some standard headers. */
#include
<stdlib.h>
#include
"timeline.h"
/**
* @brief Particle fields for the black hole particles.
*
...
...
This diff is collapsed.
Click to expand it.
src/common_io.c
+
8
−
1
View file @
ba67300e
...
...
@@ -25,6 +25,7 @@
#include
"common_io.h"
/* Local includes. */
#include
"black_holes_io.h"
#include
"chemistry_io.h"
#include
"engine.h"
#include
"error.h"
...
...
@@ -1819,6 +1820,10 @@ void io_write_output_field_parameter(const char* filename) {
stars_write_particles
(
NULL
,
list
,
&
num_fields
);
break
;
case
swift_type_black_hole
:
black_holes_write_particles
(
NULL
,
list
,
&
num_fields
);
break
;
default:
break
;
}
...
...
@@ -1830,7 +1835,9 @@ void io_write_output_field_parameter(const char* filename) {
/* Write all the fields of this particle type */
for
(
int
i
=
0
;
i
<
num_fields
;
++
i
)
fprintf
(
file
,
" %s_%s: 1
\n
"
,
list
[
i
].
name
,
part_type_names
[
ptype
]);
fprintf
(
file
,
" %s_%s: %*d
\t
# %s
\n
"
,
list
[
i
].
name
,
part_type_names
[
ptype
],
(
int
)(
28
-
strlen
(
list
[
i
].
name
)),
1
,
list
[
i
].
description
);
fprintf
(
file
,
"
\n
"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/gravity/Default/gravity_io.h
+
2
−
2
View file @
ba67300e
...
...
@@ -116,8 +116,8 @@ INLINE static void darkmatter_write_particles(const struct gpart* gparts,
list
[
3
]
=
io_make_output_field
(
"ParticleIDs"
,
ULONGLONG
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
gparts
,
id_or_neg_offset
,
""
);
list
[
4
]
=
io_make_output_field
(
"GroupIDs"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
gparts
,
group_id
,
""
);
list
[
4
]
=
io_make_output_field
(
"GroupIDs"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
gparts
,
group_id
,
""
);
}
#endif
/* SWIFT_DEFAULT_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