Skip to content
Snippets Groups Projects
Commit 431b13da authored by lhausamm's avatar lhausamm
Browse files

Change output fields structure to PartType%i

parent 72b924d4
Branches
Tags
1 merge request!520Select io
OutputFields: # Gas
PartType0:
Coordinates: 1 # Request to write output
Masses: 1
Velocities: 1
SmoothingLenght: 1
Entropy: 1
ParticleIDs: 1
Density: 1
InternalEnergy: 0 # Request to not write output
Pressure: 0
Potential: 0
# Dark Matter
PartType1:
Coordinates: 1 Coordinates: 1
Masses: 0 Velocities: 1
SmoothingLenght: 1 Masses: 1
\ No newline at end of file ParticleIDs: 1
Potential: 0
# Stars
PartType2:
Coordinates: 1
Velocities: 1
Masses: 1
ParticleIDs: 1
\ No newline at end of file
...@@ -827,8 +827,8 @@ void write_output_single(struct engine* e, const char* baseName, ...@@ -827,8 +827,8 @@ void write_output_single(struct engine* e, const char* baseName,
/* Write everything */ /* Write everything */
for (int i = 0; i < num_fields; ++i) { for (int i = 0; i < num_fields; ++i) {
char field[200] = "OutputFields:"; char field[200];
strcat(field, list[i].name); sprintf(field, "ParticleType%i:%s", i, list[i].name);
int should_write = parser_get_opt_param_int(output_fields, field, int should_write = parser_get_opt_param_int(output_fields, field,
list[i].default_output); list[i].default_output);
if (should_write) if (should_write)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment