Skip to content
Snippets Groups Projects
Commit 14548a05 authored by Josh Borrow's avatar Josh Borrow
Browse files

Fixed small bug where Entropy was getting written not U

parent 013a95ba
Branches
Tags
1 merge request!540Add Pressure-Energy (P-U) SPH
...@@ -71,7 +71,7 @@ void hydro_read_particles(struct part* parts, struct io_props* list, ...@@ -71,7 +71,7 @@ void hydro_read_particles(struct part* parts, struct io_props* list,
void convert_u(const struct engine* e, const struct part* p, void convert_u(const struct engine* e, const struct part* p,
const struct xpart* xp, float* ret) { const struct xpart* xp, float* ret) {
ret[0] = hydro_get_comoving_entropy(p); ret[0] = hydro_get_comoving_internal_energy(p);
} }
void convert_P(const struct engine* e, const struct part* p, void convert_P(const struct engine* e, const struct part* p,
...@@ -139,7 +139,7 @@ void hydro_write_particles(const struct part* parts, ...@@ -139,7 +139,7 @@ void hydro_write_particles(const struct part* parts,
const struct xpart* xparts, const struct xpart* xparts,
struct io_props* list, int* num_fields) { struct io_props* list, int* num_fields) {
*num_fields = 9; *num_fields = 8;
/* List what we want to write */ /* List what we want to write */
list[0] = io_make_output_field_convert_part("Coordinates", DOUBLE, 3, list[0] = io_make_output_field_convert_part("Coordinates", DOUBLE, 3,
...@@ -158,7 +158,7 @@ void hydro_write_particles(const struct part* parts, ...@@ -158,7 +158,7 @@ void hydro_write_particles(const struct part* parts,
UNIT_CONV_NO_UNITS, parts, id); UNIT_CONV_NO_UNITS, parts, id);
list[6] = list[6] =
io_make_output_field("Density", FLOAT, 1, UNIT_CONV_DENSITY, parts, rho); io_make_output_field("Density", FLOAT, 1, UNIT_CONV_DENSITY, parts, rho);
list[8] = io_make_output_field( list[7] = io_make_output_field(
"Pressure", FLOAT, 1, UNIT_CONV_PRESSURE, parts, pressure_bar); "Pressure", FLOAT, 1, UNIT_CONV_PRESSURE, parts, pressure_bar);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment