Skip to content
Snippets Groups Projects
Commit b25e26cf authored by Stefan Arridge's avatar Stefan Arridge
Browse files

Merge branch 'master' into StefanCooling

parents b145e5bd 61111a27
Branches
Tags
2 merge requests!272Added README files to examples,!271Stats include external potential energy
......@@ -13,4 +13,4 @@ The particle load of the main EAGLE simulation can be reproduced by
running these ICs on 64 cores.
MD5 checksum of the ICs:
ada2c728db2bd2d77a20c4eef52dfaf1 EAGLE_ICs_25.hdf5
02cd1c353b86230af047b5d4ab22afcf EAGLE_ICs_25.hdf5
......@@ -487,8 +487,9 @@ void read_ic_parallel(char* fileName, const struct UnitSystem* internal_units,
}
/* Convert the dimensions of the box */
for (int j = 0; j<3 ; j++)
dim[j] *= units_conversion_factor(ic_units, internal_units, UNIT_CONV_LENGTH);
for (int j = 0; j < 3; j++)
dim[j] *=
units_conversion_factor(ic_units, internal_units, UNIT_CONV_LENGTH);
/* Allocate memory to store SPH particles */
*Ngas = N[0];
......
......@@ -145,11 +145,13 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux(
we add the extra velocity flux due to the absolute motion of the fluid
similarly, we need to add the energy fluxes due to the absolute motion */
v2 = vij[0] * vij[0] + vij[1] * vij[1] + vij[2] * vij[2];
// order is important: we first use the momentum fluxes to update the energy
// flux and then de-boost the momentum fluxes!
totflux[4] += vij[0] * totflux[1] + vij[1] * totflux[2] +
vij[2] * totflux[3] + 0.5 * v2 * totflux[0];
totflux[1] += vij[0] * totflux[0];
totflux[2] += vij[1] * totflux[0];
totflux[3] += vij[2] * totflux[0];
totflux[4] += vij[0] * totflux[1] + vij[1] * totflux[2] +
vij[2] * totflux[3] + 0.5 * v2 * totflux[0];
}
#endif /* SWIFT_RIEMANN_HLLC_H */
......@@ -529,8 +529,9 @@ void read_ic_serial(char* fileName, const struct UnitSystem* internal_units,
}
/* Convert the dimensions of the box */
for (int j = 0; j<3 ; j++)
dim[j] *= units_conversion_factor(ic_units, internal_units, UNIT_CONV_LENGTH);
for (int j = 0; j < 3; j++)
dim[j] *=
units_conversion_factor(ic_units, internal_units, UNIT_CONV_LENGTH);
/* Now need to broadcast that information to all ranks. */
MPI_Bcast(flag_entropy, 1, MPI_INT, 0, comm);
......
......@@ -434,8 +434,9 @@ void read_ic_single(char* fileName, const struct UnitSystem* internal_units,
}
/* Convert the dimensions of the box */
for (int j = 0; j<3 ; j++)
dim[j] *= units_conversion_factor(ic_units, internal_units, UNIT_CONV_LENGTH);
for (int j = 0; j < 3; j++)
dim[j] *=
units_conversion_factor(ic_units, internal_units, UNIT_CONV_LENGTH);
/* Allocate memory to store SPH particles */
*Ngas = N[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment