diff --git a/examples/output_fields_example.yml b/examples/output_fields_example.yml index 6ab88a74d444f6f777c41ca20d728ddcb766a42e..9dabdac217fe93054e1191aaf19f2fd81a97b142 100644 --- a/examples/output_fields_example.yml +++ b/examples/output_fields_example.yml @@ -1,4 +1,27 @@ -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 diff --git a/src/single_io.c b/src/single_io.c index dd1c132484f8d84d2e499ab4c5fd1db26f374930..fec094d1138765804f6c71557798833001b5cd0f 100644 --- a/src/single_io.c +++ b/src/single_io.c @@ -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)