Commit b80fb3c3 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Fixed a mangled merge in the Minimal-SPH hydro scheme.

parent c7307172
......@@ -249,27 +249,6 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
p->density.wcount_dh = 0.f;
}
/**
* @brief Sets all particle fields to sensible values when the #part has 0 ngbs.
*
* @param p The particle to act upon
* @param xp The extended particle data to act upon
*/
__attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
struct part *restrict p, struct xpart *restrict xp) {
/* Some smoothing length multiples. */
const float h = p->h;
const float h_inv = 1.0f / h; /* 1/h */
const float h_inv_dim = pow_dimension(h_inv); /* 1/h^d */
/* Re-set problematic values */
p->rho = p->mass * kernel_root * h_inv_dim;
p->density.wcount = kernel_root * kernel_norm * h_inv_dim;
p->density.rho_dh = 0.f;
p->density.wcount_dh = 0.f;
}
/**
* @brief Prepare a particle for the force calculation.
*
......
......@@ -125,7 +125,7 @@ struct part *make_particles(size_t count, double *offset, double spacing,
*/
void prepare_force(struct part *parts, size_t count) {
#if !defined(GIZMO_SPH) && !defined(SHADOWFAX_SPH)
#if !defined(GIZMO_SPH) && !defined(SHADOWFAX_SPH) && !defined(MINIMAL_SPH)
struct part *p;
for (size_t i = 0; i < count; ++i) {
p = &parts[i];
......
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