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
No related branches found
No related tags found
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
Masses: 0
SmoothingLenght: 1
\ No newline at end of file
Velocities: 1
Masses: 1
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,
/* Write everything */
for (int i = 0; i < num_fields; ++i) {
char field[200] = "OutputFields:";
strcat(field, list[i].name);
char field[200];
sprintf(field, "ParticleType%i:%s", i, list[i].name);
int should_write = parser_get_opt_param_int(output_fields, field,
list[i].default_output);
if (should_write)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment