diff --git a/examples/MHDTests/RyuJones_1A/plotSolution.py b/examples/MHDTests/RyuJones_1A/plotSolution.py index 9427505433231b9096242a0f43c35ec6b57fac38..1559201c7868d422e48bc82c6743139b71daeaae 100644 --- a/examples/MHDTests/RyuJones_1A/plotSolution.py +++ b/examples/MHDTests/RyuJones_1A/plotSolution.py @@ -51,7 +51,7 @@ with h5py.File(args.input, "r") as handle: u = handle["PartType0/InternalEnergies"][:] B = handle["PartType0/MagneticFluxDensities"][:] divB = handle["PartType0/MagneticDivergences"][:] - psi = handle["PartType0/DednerScalars"][:] + psi = handle["PartType0/DednerScalarsOverCleaningSpeeds"][:] git = handle["Code"].attrs["Git Revision"] gitBranch = handle["Code"].attrs["Git Branch"] scheme = handle["/HydroScheme"].attrs["Scheme"] diff --git a/examples/MHDTests/RyuJones_3B/plotSolution.py b/examples/MHDTests/RyuJones_3B/plotSolution.py index 586f9198bd4737402c9f46b3abaad5a40855971a..acf4a8452fe571b405dc15cb74da3b23e2b163a5 100644 --- a/examples/MHDTests/RyuJones_3B/plotSolution.py +++ b/examples/MHDTests/RyuJones_3B/plotSolution.py @@ -50,7 +50,7 @@ with h5py.File(args.input, "r") as handle: u = handle["PartType0/InternalEnergies"][:] B = handle["PartType0/MagneticFluxDensities"][:] divB = handle["PartType0/MagneticDivergences"][:] - psi = handle["PartType0/DednerScalars"][:] + psi = handle["PartType0/DednerScalarsOverCleaningSpeeds"][:] git = handle["Code"].attrs["Git Revision"] gitBranch = handle["Code"].attrs["Git Branch"] scheme = handle["/HydroScheme"].attrs["Scheme"] diff --git a/src/mhd/DirectInduction/mhd_io.h b/src/mhd/DirectInduction/mhd_io.h index 3ea76fa063667862411d04c7bcdfca31e56d61eb..37b6068bbabfacfe74683843e7912d9509b0aaa9 100644 --- a/src/mhd/DirectInduction/mhd_io.h +++ b/src/mhd/DirectInduction/mhd_io.h @@ -41,9 +41,9 @@ INLINE static int mhd_read_particles(struct part* parts, INLINE static void convert_B(const struct engine* e, const struct part* p, const struct xpart* xp, float* ret) { - ret[0] = xp->mhd_data.B_over_rho_full[0] * p->rho; - ret[1] = xp->mhd_data.B_over_rho_full[1] * p->rho; - ret[2] = xp->mhd_data.B_over_rho_full[2] * p->rho; + ret[0] = p->mhd_data.B_over_rho[0] * p->rho; + ret[1] = p->mhd_data.B_over_rho[1] * p->rho; + ret[2] = p->mhd_data.B_over_rho[2] * p->rho; } /** @@ -390,15 +390,15 @@ INLINE static int mhd_write_particles(const struct part* parts, "co-moving DivB of the particle"); list[2] = io_make_output_field( - "DednerScalars", FLOAT, 1, UNIT_CONV_ELECTRIC_CHARGE_FIELD_STRENGTH, + "DednerScalarsOverCleaningSpeeds", FLOAT, 1, UNIT_CONV_MAGNETIC_FIELD, -1.5f * hydro_gamma - 1.f, parts, mhd_data.psi_over_ch, - "Dedner scalar associated to the particle"); + "Dedner scalars over cleaning speeds of the particles"); list[3] = io_make_output_field( - "DednerScalarsdt", FLOAT, 1, - UNIT_CONV_ELECTRIC_CHARGE_FIELD_STRENGTH_RATE, 1.f, parts, + "DednerScalarsOverCleaningSpeedsdt", FLOAT, 1, + UNIT_CONV_MAGNETIC_FIELD_PER_TIME, 1.f, parts, mhd_data.psi_over_ch_dt, - "Time derivative of Dedner scalar associated to particle"); + "Time derivative of Dedner scalars over cleaning speeds of the particles"); list[4] = io_make_output_field( "MagneticFluxDensitiesdt", FLOAT, 3, UNIT_CONV_MAGNETIC_FIELD_PER_TIME,