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

Merge branch 'gizmo_no_neighbours' into 'master'

Made sure Gizmo hydro_part_has_no_neighbours implementation does sensible things.

Set volume, gradient matrix, cell centroid and total surface area (used for flux limiter) to safe values in `hydro_part_has_no_neighbours`.

See merge request !372
parents 56d1a511 a6161cae
No related branches found
No related tags found
1 merge request!372Made sure Gizmo hydro_part_has_no_neighbours implementation does sensible things.
...@@ -384,6 +384,23 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours( ...@@ -384,6 +384,23 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
/* Re-set problematic values */ /* Re-set problematic values */
p->density.wcount = kernel_root * kernel_norm * h_inv_dim; p->density.wcount = kernel_root * kernel_norm * h_inv_dim;
p->density.wcount_dh = 0.f; p->density.wcount_dh = 0.f;
p->geometry.volume = 1.0f;
p->geometry.matrix_E[0][0] = 1.0f;
p->geometry.matrix_E[0][1] = 0.0f;
p->geometry.matrix_E[0][2] = 0.0f;
p->geometry.matrix_E[1][0] = 0.0f;
p->geometry.matrix_E[1][1] = 1.0f;
p->geometry.matrix_E[1][2] = 0.0f;
p->geometry.matrix_E[2][0] = 0.0f;
p->geometry.matrix_E[2][1] = 0.0f;
p->geometry.matrix_E[2][2] = 1.0f;
/* centroid is relative w.r.t. particle position */
/* by setting the centroid to 0.0f, we make sure no velocity correction is
applied */
p->geometry.centroid[0] = 0.0f;
p->geometry.centroid[1] = 0.0f;
p->geometry.centroid[2] = 0.0f;
p->geometry.Atot = 1.0f;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment