gitlab is upgraded to version 13, please report any issues and enjoy

Commit e310691d authored by lhausamm's avatar lhausamm
Browse files

Remove default value for select io

parent 431b13da
......@@ -106,16 +106,16 @@ 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, 1);
"Coordinates", DOUBLE, 3, UNIT_CONV_LENGTH, gparts, convert_gpart_pos);
list[1] = io_make_output_field_convert_gpart(
"Velocities", FLOAT, 3, UNIT_CONV_SPEED, gparts, convert_gpart_vel, 1);
"Velocities", FLOAT, 3, UNIT_CONV_SPEED, gparts, convert_gpart_vel);
list[2] =
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, gparts, mass, 1);
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, 1);
gparts, id_or_neg_offset);
list[4] = io_make_output_field("Potential", FLOAT, 1, UNIT_CONV_POTENTIAL,
gparts, potential, 1);
gparts, potential);
}
#endif /* SWIFT_DEFAULT_GRAVITY_IO_H */
......@@ -127,23 +127,23 @@ void hydro_write_particles(const struct part* parts, const struct xpart* xparts,
/* List what we want to write */
list[0] = io_make_output_field_convert_part("Coordinates", DOUBLE, 3,
UNIT_CONV_LENGTH, parts, xparts,
convert_part_pos, 1);
convert_part_pos);
list[1] =
io_make_output_field_convert_part("Velocities", FLOAT, 3, UNIT_CONV_SPEED,
parts, xparts, convert_part_vel, 1);
parts, xparts, convert_part_vel);
list[2] =
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts, mass, 1);
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts, mass);
list[3] = io_make_output_field("SmoothingLength", FLOAT, 1, UNIT_CONV_LENGTH,
parts, h, 1);
parts, h);
list[4] = io_make_output_field("InternalEnergy", FLOAT, 1,
UNIT_CONV_ENERGY_PER_UNIT_MASS, parts, u, 1);
UNIT_CONV_ENERGY_PER_UNIT_MASS, parts, u);
list[5] = io_make_output_field("ParticleIDs", ULONGLONG, 1,
UNIT_CONV_NO_UNITS, parts, id, 1);
UNIT_CONV_NO_UNITS, parts, id);
list[6] = io_make_output_field("Density", FLOAT, 1, UNIT_CONV_DENSITY, parts,
rho, 1);
rho);
list[7] = io_make_output_field_convert_part(
"Potential", FLOAT, 1, UNIT_CONV_POTENTIAL, parts, xparts,
convert_part_potential, 1);
convert_part_potential);
}
/**
......
......@@ -139,30 +139,30 @@ void hydro_write_particles(const struct part* parts, const struct xpart* xparts,
/* List what we want to write */
list[0] = io_make_output_field_convert_part("Coordinates", DOUBLE, 3,
UNIT_CONV_LENGTH, parts, xparts,
convert_part_pos, 1);
convert_part_pos);
list[1] =
io_make_output_field_convert_part("Velocities", FLOAT, 3, UNIT_CONV_SPEED,
parts, xparts, convert_part_vel, 1);
parts, xparts, convert_part_vel);
list[2] =
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts, mass, 1);
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts, mass);
list[3] = io_make_output_field("SmoothingLength", FLOAT, 1, UNIT_CONV_LENGTH,
parts, h, 1);
parts, h);
list[4] = io_make_output_field(
"Entropy", FLOAT, 1, UNIT_CONV_ENTROPY_PER_UNIT_MASS, parts, entropy, 1);
"Entropy", FLOAT, 1, UNIT_CONV_ENTROPY_PER_UNIT_MASS, parts, entropy);
list[5] = io_make_output_field("ParticleIDs", ULONGLONG, 1,
UNIT_CONV_NO_UNITS, parts, id, 1);
UNIT_CONV_NO_UNITS, parts, id);
list[6] = io_make_output_field("Density", FLOAT, 1, UNIT_CONV_DENSITY, parts,
rho, 1);
rho);
list[7] = io_make_output_field_convert_part("InternalEnergy", FLOAT, 1,
UNIT_CONV_ENERGY_PER_UNIT_MASS,
parts, xparts, convert_part_u, 1);
parts, xparts, convert_part_u);
list[8] = io_make_output_field_convert_part("Pressure", FLOAT, 1,
UNIT_CONV_PRESSURE, parts, xparts,
convert_part_P, 1);
convert_part_P);
list[9] = io_make_output_field_convert_part(
"Potential", FLOAT, 1, UNIT_CONV_POTENTIAL, parts, xparts,
convert_part_potential, 1);
convert_part_potential);
#ifdef DEBUG_INTERACTIONS_SPH
......@@ -170,15 +170,15 @@ void hydro_write_particles(const struct part* parts, const struct xpart* xparts,
*num_fields += 4;
list[0] = io_make_output_field("Num_ngb_density", INT, 1, UNIT_CONV_NO_UNITS,
parts, num_ngb_density, 1);
parts, num_ngb_density);
list[1] = io_make_output_field("Num_ngb_force", INT, 1, UNIT_CONV_NO_UNITS,
parts, num_ngb_force, 1);
parts, num_ngb_force);
list[2] =
io_make_output_field("Ids_ngb_density", LONGLONG, MAX_NUM_OF_NEIGHBOURS,
UNIT_CONV_NO_UNITS, parts, ids_ngbs_density, 1);
UNIT_CONV_NO_UNITS, parts, ids_ngbs_density);
list[3] =
io_make_output_field("Ids_ngb_force", LONGLONG, MAX_NUM_OF_NEIGHBOURS,
UNIT_CONV_NO_UNITS, parts, ids_ngbs_force, 1);
UNIT_CONV_NO_UNITS, parts, ids_ngbs_force);
#endif
}
......
......@@ -184,32 +184,32 @@ void hydro_write_particles(const struct part* parts, const struct xpart* xparts,
/* List what we want to write */
list[0] = io_make_output_field_convert_part("Coordinates", DOUBLE, 3,
UNIT_CONV_LENGTH, parts, xparts,
convert_part_pos, 1);
convert_part_pos);
list[1] =
io_make_output_field_convert_part("Velocities", FLOAT, 3, UNIT_CONV_SPEED,
parts, xparts, convert_part_vel, 1);
parts, xparts, convert_part_vel);
list[2] = io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts,
conserved.mass, 1);
conserved.mass);
list[3] = io_make_output_field("SmoothingLength", FLOAT, 1, UNIT_CONV_LENGTH,
parts, h, 1);
parts, h);
list[4] = io_make_output_field_convert_part("InternalEnergy", FLOAT, 1,
UNIT_CONV_ENERGY_PER_UNIT_MASS,
parts, xparts, convert_u, 1);
parts, xparts, convert_u);
list[5] = io_make_output_field("ParticleIDs", ULONGLONG, 1,
UNIT_CONV_NO_UNITS, parts, id, 1);
UNIT_CONV_NO_UNITS, parts, id);
list[6] = io_make_output_field("Density", FLOAT, 1, UNIT_CONV_DENSITY, parts,
primitives.rho, 1);
primitives.rho);
list[7] = io_make_output_field_convert_part(
"Entropy", FLOAT, 1, UNIT_CONV_ENTROPY, parts, xparts, convert_A, 1);
"Entropy", FLOAT, 1, UNIT_CONV_ENTROPY, parts, xparts, convert_A);
list[8] = io_make_output_field("Pressure", FLOAT, 1, UNIT_CONV_PRESSURE,
parts, primitives.P, 1);
parts, primitives.P);
list[9] = io_make_output_field_convert_part(
"TotEnergy", FLOAT, 1, UNIT_CONV_ENERGY, parts, xparts, convert_Etot, 1);
"TotEnergy", FLOAT, 1, UNIT_CONV_ENERGY, parts, xparts, convert_Etot);
list[10] = io_make_output_field_convert_part(
"Potential", FLOAT, 1, UNIT_CONV_POTENTIAL, parts, xparts,
convert_part_potential, 1);
convert_part_potential);
}
/**
......
......@@ -154,29 +154,29 @@ void hydro_write_particles(const struct part* parts, const struct xpart* xparts,
/* List what we want to write */
list[0] = io_make_output_field_convert_part("Coordinates", DOUBLE, 3,
UNIT_CONV_LENGTH, parts, xparts,
convert_part_pos, 1);
convert_part_pos);
list[1] =
io_make_output_field_convert_part("Velocities", FLOAT, 3, UNIT_CONV_SPEED,
parts, xparts, convert_part_vel, 1);
parts, xparts, convert_part_vel);
list[2] =
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts, mass, 1);
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts, mass);
list[3] = io_make_output_field("SmoothingLength", FLOAT, 1, UNIT_CONV_LENGTH,
parts, h, 1);
parts, h);
list[4] = io_make_output_field("InternalEnergy", FLOAT, 1,
UNIT_CONV_ENERGY_PER_UNIT_MASS, parts, u, 1);
UNIT_CONV_ENERGY_PER_UNIT_MASS, parts, u);
list[5] = io_make_output_field("ParticleIDs", ULONGLONG, 1,
UNIT_CONV_NO_UNITS, parts, id, 1);
UNIT_CONV_NO_UNITS, parts, id);
list[6] = io_make_output_field("Density", FLOAT, 1, UNIT_CONV_DENSITY, parts,
rho, 1);
rho);
list[7] = io_make_output_field_convert_part("Entropy", FLOAT, 1,
UNIT_CONV_ENTROPY_PER_UNIT_MASS,
parts, xparts, convert_S, 1);
parts, xparts, convert_S);
list[8] = io_make_output_field_convert_part(
"Pressure", FLOAT, 1, UNIT_CONV_PRESSURE, parts, xparts, convert_P, 1);
"Pressure", FLOAT, 1, UNIT_CONV_PRESSURE, parts, xparts, convert_P);
list[9] = io_make_output_field_convert_part(
"Potential", FLOAT, 1, UNIT_CONV_POTENTIAL, parts, xparts,
convert_part_potential, 1);
convert_part_potential);
}
/**
......
......@@ -151,30 +151,30 @@ void hydro_write_particles(const struct part* parts, const struct xpart* xparts,
/* List what we want to write */
list[0] = io_make_output_field_convert_part("Coordinates", DOUBLE, 3,
UNIT_CONV_LENGTH, parts, xparts,
convert_part_pos, 1);
convert_part_pos);
list[1] =
io_make_output_field_convert_part("Velocities", FLOAT, 3, UNIT_CONV_SPEED,
parts, xparts, convert_part_vel, 1);
parts, xparts, convert_part_vel);
list[2] =
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts, mass, 1);
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts, mass);
list[3] = io_make_output_field("SmoothingLength", FLOAT, 1, UNIT_CONV_LENGTH,
parts, h, 1);
parts, h);
list[4] = io_make_output_field(
"Entropy", FLOAT, 1, UNIT_CONV_ENTROPY_PER_UNIT_MASS, parts, entropy, 1);
"Entropy", FLOAT, 1, UNIT_CONV_ENTROPY_PER_UNIT_MASS, parts, entropy);
list[5] = io_make_output_field("ParticleIDs", ULONGLONG, 1,
UNIT_CONV_NO_UNITS, parts, id, 1);
UNIT_CONV_NO_UNITS, parts, id);
list[6] = io_make_output_field("Density", FLOAT, 1, UNIT_CONV_DENSITY, parts,
rho, 1);
rho);
list[7] = io_make_output_field_convert_part("InternalEnergy", FLOAT, 1,
UNIT_CONV_ENERGY_PER_UNIT_MASS,
parts, xparts, convert_u, 1);
parts, xparts, convert_u);
list[8] = io_make_output_field_convert_part(
"Pressure", FLOAT, 1, UNIT_CONV_PRESSURE, parts, xparts, convert_P, 1);
"Pressure", FLOAT, 1, UNIT_CONV_PRESSURE, parts, xparts, convert_P);
list[9] = io_make_output_field("WeightedDensity", FLOAT, 1, UNIT_CONV_DENSITY,
parts, rho_bar, 1);
parts, rho_bar);
list[10] = io_make_output_field_convert_part(
"Potential", FLOAT, 1, UNIT_CONV_POTENTIAL, parts, xparts,
convert_part_potential, 1);
convert_part_potential);
}
/**
......
......@@ -138,28 +138,28 @@ void hydro_write_particles(const struct part* parts, const struct xpart* xparts,
UNIT_CONV_LENGTH, parts, xparts,
convert_part_pos);
list[1] = io_make_output_field("Velocities", FLOAT, 3, UNIT_CONV_SPEED, parts,
primitives.v, 1);
primitives.v);
list[2] = io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, parts,
conserved.mass, 1);
conserved.mass);
list[3] = io_make_output_field("SmoothingLength", FLOAT, 1, UNIT_CONV_LENGTH,
parts, h, 1);
parts, h);
list[4] = io_make_output_field_convert_part("InternalEnergy", FLOAT, 1,
UNIT_CONV_ENERGY_PER_UNIT_MASS,
parts, xparts, convert_u);
list[5] = io_make_output_field("ParticleIDs", ULONGLONG, 1,
UNIT_CONV_NO_UNITS, parts, id, 1);
UNIT_CONV_NO_UNITS, parts, id);
list[6] = io_make_output_field("Acceleration", FLOAT, 3,
UNIT_CONV_ACCELERATION, parts, a_hydro, 1);
UNIT_CONV_ACCELERATION, parts, a_hydro);
list[7] = io_make_output_field("Density", FLOAT, 1, UNIT_CONV_DENSITY, parts,
primitives.rho, 1);
primitives.rho);
list[8] = io_make_output_field("Volume", FLOAT, 1, UNIT_CONV_VOLUME, parts,
cell.volume, 1);
cell.volume);
list[9] = io_make_output_field("GradDensity", FLOAT, 3, UNIT_CONV_DENSITY,
parts, primitives.gradients.rho, 1);
parts, primitives.gradients.rho);
list[10] = io_make_output_field_convert_part(
"Entropy", FLOAT, 1, UNIT_CONV_ENTROPY, parts, xparts, convert_A);
list[11] = io_make_output_field("Pressure", FLOAT, 1, UNIT_CONV_PRESSURE,
parts, primitives.P, 1);
parts, primitives.P);
list[12] = io_make_output_field_convert_part(
"TotEnergy", FLOAT, 1, UNIT_CONV_ENERGY, parts, xparts, convert_Etot);
}
......
......@@ -98,9 +98,6 @@ struct io_props {
conversion_func_gpart_float convert_gpart_f;
conversion_func_gpart_double convert_gpart_d;
/* default output behaviour
* 0 means not writing, 1 means writing */
int default_output;
};
/**
......@@ -143,7 +140,6 @@ INLINE static struct io_props io_make_input_field_(
r.convert_part_d = NULL;
r.convert_gpart_f = NULL;
r.convert_gpart_d = NULL;
r.default_output = 0;
return r;
}
......@@ -151,10 +147,9 @@ INLINE static struct io_props io_make_input_field_(
/**
* @brief Constructs an #io_props from its parameters
*/
#define io_make_output_field(name, type, dim, units, part, field, \
default_output) \
#define io_make_output_field(name, type, dim, units, part, field) \
io_make_output_field_(name, type, dim, units, (char*)(&(part[0]).field), \
sizeof(part[0]), default_output)
sizeof(part[0]))
/**
* @brief Construct an #io_props from its parameters
......@@ -165,14 +160,12 @@ INLINE static struct io_props io_make_input_field_(
* @param units The units of the dataset
* @param field Pointer to the field of the first particle
* @param partSize The size in byte of the particle
* @param default_output Default output behaviour (0 -> not write, 1 -> write)
*
* Do not call this function directly. Use the macro defined above.
*/
INLINE static struct io_props io_make_output_field_(
const char name[FIELD_BUFFER_SIZE], enum IO_DATA_TYPE type, int dimension,
enum unit_conversion_factor units, char* field, size_t partSize,
int default_output) {
enum unit_conversion_factor units, char* field, size_t partSize) {
struct io_props r;
strcpy(r.name, name);
r.type = type;
......@@ -188,7 +181,6 @@ INLINE static struct io_props io_make_output_field_(
r.convert_part_d = NULL;
r.convert_gpart_f = NULL;
r.convert_gpart_d = NULL;
r.default_output = default_output;
return r;
}
......@@ -197,10 +189,10 @@ INLINE static struct io_props io_make_output_field_(
* @brief Constructs an #io_props (with conversion) from its parameters
*/
#define io_make_output_field_convert_part(name, type, dim, units, part, xpart, \
convert, default_output) \
convert) \
io_make_output_field_convert_part_##type(name, type, dim, units, \
sizeof(part[0]), part, xpart, \
convert, default_output)
convert)
/**
* @brief Construct an #io_props from its parameters
......@@ -213,7 +205,6 @@ INLINE static struct io_props io_make_output_field_(
* @param parts The particle array
* @param xparts The xparticle array
* @param functionPtr The function used to convert a particle to a float
* @param default_output Default output behaviour (0 -> not write, 1 -> write)
*
* Do not call this function directly. Use the macro defined above.
*/
......@@ -221,7 +212,7 @@ INLINE static struct io_props io_make_output_field_convert_part_FLOAT(
const char name[FIELD_BUFFER_SIZE], enum IO_DATA_TYPE type, int dimension,
enum unit_conversion_factor units, size_t partSize,
const struct part* parts, const struct xpart* xparts,
conversion_func_part_float functionPtr, int default_output) {
conversion_func_part_float functionPtr) {
struct io_props r;
strcpy(r.name, name);
......@@ -239,7 +230,6 @@ INLINE static struct io_props io_make_output_field_convert_part_FLOAT(
r.convert_part_d = NULL;
r.convert_gpart_f = NULL;
r.convert_gpart_d = NULL;
r.default_output = default_output;
return r;
}
......@@ -255,7 +245,6 @@ INLINE static struct io_props io_make_output_field_convert_part_FLOAT(
* @param parts The particle array
* @param xparts The xparticle array
* @param functionPtr The function used to convert a particle to a float
* @param default_output Default output behaviour (0 -> not write, 1 -> write)
*
* Do not call this function directly. Use the macro defined above.
*/
......@@ -263,7 +252,7 @@ INLINE static struct io_props io_make_output_field_convert_part_DOUBLE(
const char name[FIELD_BUFFER_SIZE], enum IO_DATA_TYPE type, int dimension,
enum unit_conversion_factor units, size_t partSize,
const struct part* parts, const struct xpart* xparts,
conversion_func_part_double functionPtr, int default_output) {
conversion_func_part_double functionPtr) {
struct io_props r;
strcpy(r.name, name);
......@@ -281,7 +270,6 @@ INLINE static struct io_props io_make_output_field_convert_part_DOUBLE(
r.convert_part_d = functionPtr;
r.convert_gpart_f = NULL;
r.convert_gpart_d = NULL;
r.default_output = default_output;
return r;
}
......@@ -290,10 +278,9 @@ INLINE static struct io_props io_make_output_field_convert_part_DOUBLE(
* @brief Constructs an #io_props (with conversion) from its parameters
*/
#define io_make_output_field_convert_gpart(name, type, dim, units, gpart, \
convert, default_output) \
convert) \
io_make_output_field_convert_gpart_##type(name, type, dim, units, \
sizeof(gpart[0]), gpart, convert, \
default_output)
sizeof(gpart[0]), gpart, convert)
/**
* @brief Construct an #io_props from its parameters
......@@ -305,15 +292,13 @@ INLINE static struct io_props io_make_output_field_convert_part_DOUBLE(
* @param gpartSize The size in byte of the particle
* @param gparts The particle array
* @param functionPtr The function used to convert a g-particle to a float
* @param default_output Default output behaviour (0 -> not write, 1 -> write)
*
* Do not call this function directly. Use the macro defined above.
*/
INLINE static struct io_props io_make_output_field_convert_gpart_FLOAT(
const char name[FIELD_BUFFER_SIZE], enum IO_DATA_TYPE type, int dimension,
enum unit_conversion_factor units, size_t gpartSize,
const struct gpart* gparts, conversion_func_gpart_float functionPtr,
int default_output) {
const struct gpart* gparts, conversion_func_gpart_float functionPtr) {
struct io_props r;
strcpy(r.name, name);
......@@ -331,7 +316,6 @@ INLINE static struct io_props io_make_output_field_convert_gpart_FLOAT(
r.convert_part_d = NULL;
r.convert_gpart_f = functionPtr;
r.convert_gpart_d = NULL;
r.default_output = default_output;
return r;
}
......@@ -346,15 +330,13 @@ INLINE static struct io_props io_make_output_field_convert_gpart_FLOAT(
* @param gpartSize The size in byte of the particle
* @param gparts The particle array
* @param functionPtr The function used to convert a g-particle to a float
* @param default_output Default output behaviour (0 -> not write, 1 -> write)
*
* Do not call this function directly. Use the macro defined above.
*/
INLINE static struct io_props io_make_output_field_convert_gpart_DOUBLE(
const char name[FIELD_BUFFER_SIZE], enum IO_DATA_TYPE type, int dimension,
enum unit_conversion_factor units, size_t gpartSize,
const struct gpart* gparts, conversion_func_gpart_double functionPtr,
int default_output) {
const struct gpart* gparts, conversion_func_gpart_double functionPtr) {
struct io_props r;
strcpy(r.name, name);
......@@ -372,7 +354,6 @@ INLINE static struct io_props io_make_output_field_convert_gpart_DOUBLE(
r.convert_part_d = NULL;
r.convert_gpart_f = NULL;
r.convert_gpart_d = functionPtr;
r.default_output = default_output;
return r;
}
......
......@@ -1266,8 +1266,7 @@ void write_output_parallel(struct engine* e, const char* baseName,
for (int i = 0; i < num_fields; ++i) {
char field[200] = "OutputFields:";
strcat(field, list[i].name);
int should_write = parser_get_opt_param_int(output_fields, field,
list[i].default_output);
int should_write = parser_get_opt_param_int(output_fields, field, 0);
if (should_write)
writeArray(e, h_grp, fileName, partTypeGroupName, list[i], Nparticles,
N_total[ptype], mpi_rank, offset[ptype], internal_units,
......
......@@ -1010,8 +1010,7 @@ void write_output_serial(struct engine* e, const char* baseName,
for (int i = 0; i < num_fields; ++i) {
char field[200] = "OutputFields:";
strcat(field, list[i].name);
int should_write = parser_get_opt_param_int(output_fields, field,
list[i].default_output);
int should_write = parser_get_opt_param_int(output_fields, field, 0);
if (should_write)
writeArray(e, h_grp, fileName, xmfFile, partTypeGroupName, list[i],
Nparticles, N_total[ptype], mpi_rank, offset[ptype],
......
......@@ -829,8 +829,7 @@ void write_output_single(struct engine* e, const char* baseName,
for (int i = 0; i < num_fields; ++i) {
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);
int should_write = parser_get_opt_param_int(output_fields, field, 0);
if (should_write)
writeArray(e, h_grp, fileName, xmfFile, partTypeGroupName, list[i], N,
internal_units, snapshot_units);
......
......@@ -60,13 +60,13 @@ void star_write_particles(const struct spart* sparts, struct io_props* list,
/* List what we want to read */
list[0] = io_make_output_field("Coordinates", DOUBLE, 3, UNIT_CONV_LENGTH,
sparts, x, 1);
sparts, x);
list[1] = io_make_output_field("Velocities", FLOAT, 3, UNIT_CONV_SPEED,
sparts, v, 1);
sparts, v);
list[2] =
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, sparts, mass, 1);
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, sparts, mass);
list[3] = io_make_output_field("ParticleIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS,
sparts, id, 1);
sparts, id);
}
#endif /* SWIFT_DEFAULT_STAR_IO_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment