Skip to content
Snippets Groups Projects
Commit 566c6efc authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Don't convert the energy before the pressure.

parent cde5f99c
Branches
Tags
1 merge request!223Merge Gizmo-SPH into the master branch
......@@ -260,10 +260,11 @@ __attribute__((always_inline)) INLINE static void hydro_convert_quantities(
p->conserved.momentum[0] = m * p->primitives.v[0];
p->conserved.momentum[1] = m * p->primitives.v[1];
p->conserved.momentum[2] = m * p->primitives.v[2];
p->conserved.energy *= m;
p->primitives.P =
hydro_gamma_minus_one * p->conserved.energy * p->primitives.rho;
p->conserved.energy *= m;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment