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

Allow for different velocity and pressure fields

parent 80b371bd
Branches
Tags
1 merge request!208Test 125
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
/* Local includes. */ /* Local includes. */
#include "config.h" #include "config.h"
#include "const.h" #include "const.h"
#include "hydro.h"
#include "inline.h" #include "inline.h"
#include "part.h" #include "part.h"
......
...@@ -55,56 +55,52 @@ struct part { ...@@ -55,56 +55,52 @@ struct part {
/* Particle density. */ /* Particle density. */
float rho; float rho;
/* Derivative of the density with respect to this particle's smoothing length.
*/
float rho_dh;
/* Particle entropy. */ /* Particle entropy. */
float entropy; float entropy;
/* Derivative of the density with respect to smoothing length. */ /* Derivative of the density with respect to smoothing length. */
float rho_dh; float rho_dh;
union { // union {
struct { struct {
/* Number of neighbours. */ /* Number of neighbours. */
float wcount; float wcount;
/* Number of neighbours spatial derivative. */ /* Number of neighbours spatial derivative. */
float wcount_dh; float wcount_dh;
/* Particle velocity curl. */ /* Particle velocity curl. */
float rot_v[3]; float rot_v[3];
/* Particle velocity divergence. */ /* Particle velocity divergence. */
float div_v; float div_v;
} density; } density;
struct { struct {
/* Balsara switch */ /* Balsara switch */
float balsara; float balsara;
/* Pressure over density squared (including drho/dh term) */ /* Pressure over density squared (including drho/dh term) */
float P_over_rho2; float P_over_rho2;
/* Particle sound speed. */ /* Particle sound speed. */
float soundspeed; float soundspeed;
/* Signal velocity. */ /* Signal velocity. */
float v_sig; float v_sig;
/* Entropy time derivative */ /* Entropy time derivative */
float entropy_dt; float entropy_dt;
/* Time derivative of the smoothing length */ /* Time derivative of the smoothing length */
float h_dt; float h_dt;
} force; } force;
}; // };
/* Particle ID. */ /* Particle ID. */
long long id; long long id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment