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

Merge branch 'planetary_update' into 'master'

Planetary update

See merge request !1594
parents 4161e58a a717970b
No related branches found
No related tags found
13 merge requests!1693More threapool plotting tweaks,!1668before Mag.Egy in all the flavors,!1663Initial sync to work again,!1662Initial sync from previous months,!1642When searching for more particles in a ghost task we walk up the cell tree,...,!1633When searching for more particles in a ghost task we walk up the cell tree,...,!1631Solving issues with different Hydro Schemes,!1620Mhd canvas,!1619Mhd canvas,!1617Update to from main branch to Canvas to MHD_FS,!1616Mhd canvas into MHD_FS,!1596Master,!1594Planetary update
...@@ -42,9 +42,9 @@ numPart2 = L2 * L2 ...@@ -42,9 +42,9 @@ numPart2 = L2 * L2
L1 = int(sqrt(numPart2 / rho2 * rho1)) L1 = int(sqrt(numPart2 / rho2 * rho1))
numPart1 = L1 * L1 numPart1 = L1 * L1
# print "N2 =", numPart2, "N1 =", numPart1 print("N2 =", numPart2, "N1 =", numPart1)
# print "L2 =", L2, "L1 = ", L1 print("L2 =", L2, "L1 = ", L1)
# print "rho2 =", rho2, "rho1 =", (float(L1*L1)) / (float(L2*L2)) print("rho2 =", rho2, "rho1 =", (float(L1 * L1)) / (float(L2 * L2)))
coords1 = zeros((numPart1, 3)) coords1 = zeros((numPart1, 3))
coords2 = zeros((numPart2, 3)) coords2 = zeros((numPart2, 3))
...@@ -110,8 +110,8 @@ vel[:, 1] = ( ...@@ -110,8 +110,8 @@ vel[:, 1] = (
omega0 omega0
* sin(4 * pi * coords[:, 0]) * sin(4 * pi * coords[:, 0])
* ( * (
exp(-(coords[:, 1] - 0.25) ** 2 / (2 * sigma ** 2)) exp(-((coords[:, 1] - 0.25) ** 2) / (2 * sigma ** 2))
+ exp(-(coords[:, 1] - 0.75) ** 2 / (2 * sigma ** 2)) + exp(-((coords[:, 1] - 0.75) ** 2) / (2 * sigma ** 2))
) )
) )
...@@ -155,5 +155,4 @@ ds[()] = ids.reshape((numPart, 1)) ...@@ -155,5 +155,4 @@ ds[()] = ids.reshape((numPart, 1))
ds = grp.create_dataset("MaterialIDs", (numPart, 1), "i") ds = grp.create_dataset("MaterialIDs", (numPart, 1), "i")
ds[()] = mat.reshape((numPart, 1)) ds[()] = mat.reshape((numPart, 1))
fileOutput.close() fileOutput.close()
...@@ -472,6 +472,28 @@ __attribute__((always_inline)) INLINE static float hydro_signal_velocity( ...@@ -472,6 +472,28 @@ __attribute__((always_inline)) INLINE static float hydro_signal_velocity(
return ci + cj - beta * mu_ij; return ci + cj - beta * mu_ij;
} }
/**
* @brief returns the signal velocity
*
* @brief p the particle
*/
__attribute__((always_inline)) INLINE static float hydro_get_signal_velocity(
const struct part *restrict p) {
return p->force.v_sig;
}
/**
* @brief returns the div_v
*
* @brief p the particle
*/
__attribute__((always_inline)) INLINE static float hydro_get_div_v(
const struct part *restrict p) {
return p->density.div_v;
}
/** /**
* @brief Does some extra hydro operations once the actual physical time step * @brief Does some extra hydro operations once the actual physical time step
* for the particle is known. * for the particle is known.
......
...@@ -79,10 +79,10 @@ struct xpart { ...@@ -79,10 +79,10 @@ struct xpart {
/*! Additional data used by the tracers */ /*! Additional data used by the tracers */
struct tracers_xpart_data tracers_data; struct tracers_xpart_data tracers_data;
/* Additional data used by the star formation */ /*! Additional data used by the star formation */
struct star_formation_xpart_data sf_data; struct star_formation_xpart_data sf_data;
/* Additional data used by the feedback */ /*! Additional data used by the feedback */
struct feedback_part_data feedback_data; struct feedback_part_data feedback_data;
/*! Additional data used by the MHD scheme */ /*! Additional data used by the MHD scheme */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment