Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
0dd9426f
Commit
0dd9426f
authored
Jul 20, 2016
by
Matthieu Schaller
Browse files
Restore the union in the DEFAULT_SPH particle definition
parent
d908d35f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/const.h
View file @
0dd9426f
...
...
@@ -56,8 +56,8 @@
/* SPH variant to use */
//#define MINIMAL_SPH
//
#define GADGET2_SPH
#define DEFAULT_SPH
#define GADGET2_SPH
//
#define DEFAULT_SPH
/* Gravity properties */
#define EXTERNAL_POTENTIAL_POINTMASS
...
...
src/hydro/Default/hydro_part.h
View file @
0dd9426f
...
...
@@ -69,43 +69,43 @@ struct part {
float
alpha
;
/* Store density/force specific stuff. */
//
union {
union
{
struct
{
struct
{
/* Particle velocity divergence. */
float
div_v
;
/* Particle velocity divergence. */
float
div_v
;
/* Derivative of particle number density. */
float
wcount_dh
;
/* Derivative of particle number density. */
float
wcount_dh
;
/* Particle velocity curl. */
float
rot_v
[
3
];
/* Particle velocity curl. */
float
rot_v
[
3
];
/* Particle number density. */
float
wcount
;
/* Particle number density. */
float
wcount
;
}
density
;
}
density
;
struct
{
struct
{
/* Balsara switch */
float
balsara
;
/* Balsara switch */
float
balsara
;
/* Aggregate quantities. */
float
POrho2
;
/* Aggregate quantities. */
float
POrho2
;
/* Change in particle energy over time. */
float
u_dt
;
/* Change in particle energy over time. */
float
u_dt
;
/* Signal velocity */
float
v_sig
;
/* Signal velocity */
float
v_sig
;
/* Sound speed */
float
c
;
/* Sound speed */
float
c
;
}
force
;
//
};
}
force
;
};
/* Particle mass. */
float
mass
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment