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

Apply the same bug fix to the other hydro schemes.

parent fc43e385
No related branches found
No related tags found
1 merge request!553Debug fixes for neighbour finding
......@@ -339,7 +339,7 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
/* 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.wcount = kernel_root * h_inv_dim;
p->rho_dh = 0.f;
p->density.wcount_dh = 0.f;
p->density.div_v = 0.f;
......@@ -423,7 +423,7 @@ __attribute__((always_inline)) INLINE static void hydro_reset_acceleration(
/* Reset the time derivatives. */
p->force.u_dt = 0.0f;
p->force.h_dt = 0.0f;
p->force.v_sig = 0.0f;
p->force.v_sig = p->force.soundspeed;
}
/**
......
......@@ -349,7 +349,7 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
/* 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.wcount = kernel_root * h_inv_dim;
p->density.rho_dh = 0.f;
p->density.wcount_dh = 0.f;
p->density.div_v = 0.f;
......
......@@ -398,7 +398,7 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
const float h_inv_dim = pow_dimension(h_inv); /* 1/h^d */
/* Re-set problematic values */
p->density.wcount = kernel_root * kernel_norm * h_inv_dim;
p->density.wcount = kernel_root * h_inv_dim;
p->density.wcount_dh = 0.f;
p->geometry.volume = 1.0f;
p->geometry.matrix_E[0][0] = 1.0f;
......
......@@ -398,7 +398,7 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
const float h_inv_dim = pow_dimension(h_inv); /* 1/h^d */
/* Re-set problematic values */
p->density.wcount = kernel_root * kernel_norm * h_inv_dim;
p->density.wcount = kernel_root * h_inv_dim;
p->density.wcount_dh = 0.f;
p->geometry.volume = 1.0f;
p->geometry.matrix_E[0][0] = 1.0f;
......
......@@ -403,7 +403,7 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
p->rho = p->mass * kernel_root * h_inv_dim;
p->pressure_bar =
p->mass * p->u * hydro_gamma_minus_one * kernel_root * h_inv_dim;
p->density.wcount = kernel_root * kernel_norm * h_inv_dim;
p->density.wcount = kernel_root * h_inv_dim;
p->density.rho_dh = 0.f;
p->density.wcount_dh = 0.f;
p->density.pressure_bar_dh = 0.f;
......@@ -480,7 +480,7 @@ __attribute__((always_inline)) INLINE static void hydro_reset_acceleration(
/* Reset the time derivatives. */
p->u_dt = 0.0f;
p->force.h_dt = 0.0f;
p->force.v_sig = 0.0f;
p->force.v_sig = p->force.soundspeed;
}
/**
......
......@@ -357,7 +357,7 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
/* Re-set problematic values */
p->rho = p->mass * kernel_root * h_inv_dim;
p->rho_bar = p->mass * kernel_root * h_inv_dim;
p->density.wcount = kernel_root * kernel_norm * h_inv_dim;
p->density.wcount = kernel_root * h_inv_dim;
p->density.rho_dh = 0.f;
p->density.wcount_dh = 0.f;
p->density.pressure_dh = 0.f;
......@@ -441,7 +441,7 @@ __attribute__((always_inline)) INLINE static void hydro_reset_acceleration(
p->force.h_dt = 0.0f;
/* Reset maximal signal velocity */
p->force.v_sig = 0.0f;
p->force.v_sig = p->force.soundspeed;
}
/**
......
......@@ -257,7 +257,7 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
const float h_inv_dim = pow_dimension(h_inv); /* 1/h^d */
/* Re-set problematic values */
p->density.wcount = kernel_root * kernel_norm * h_inv_dim;
p->density.wcount = kernel_root * h_inv_dim;
p->density.wcount_dh = 0.f;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment