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
Sten Delos
Gadget4
Commits
cda6e3b5
Commit
cda6e3b5
authored
May 06, 2021
by
Volker Springel
Browse files
Merge branch 'master' of gitlab.mpcdf.mpg.de:vrs/gadget4
parents
197afdac
8d814c5b
Changes
3
Hide whitespace changes
Inline
Side-by-side
defines_extra
View file @
cda6e3b5
#defines for headers
#
defines for headers
VERSION_H
HDF5UTIL_H
ALLVARS_H
...
...
src/data/simparticles.h
View file @
cda6e3b5
...
...
@@ -413,7 +413,6 @@ class simparticles : public intposconvert, public setcomm
int
test_if_grav_timestep_is_too_large
(
int
p
,
int
bin
);
int
get_timestep_bin
(
integertime
ti_step
);
private:
#ifdef ADAPTIVE_HYDRO_SOFTENING
int
get_softeningtype_for_hydro_particle
(
int
i
)
{
...
...
src/sph/density.cc
View file @
cda6e3b5
...
...
@@ -556,6 +556,9 @@ void sph::density(int *list, int ntarget)
All
.
Timebase_interval
;
double
dtime
=
All
.
cf_atime
*
dt
/
All
.
cf_atime_hubble_a
;
SphP
[
target
].
set_viscosity_coefficient
(
dtime
);
#endif
#ifdef ADAPTIVE_HYDRO_SOFTENING
Tp
->
P
[
target
].
setSofteningClass
(
Tp
->
get_softeningtype_for_hydro_particle
(
target
));
#endif
/* now check whether we had enough neighbours */
double
desnumngb
=
All
.
DesNumNgb
;
...
...
@@ -890,9 +893,9 @@ void sph::density_evaluate_kernel(pinfo &pdat)
}
if
(
All
.
ComovingIntegrationOn
)
vdotr2
+=
All
.
cf_atime2_hubble_a
*
r2
;
vdotr2
+=
All
.
cf_atime2_hubble_a
*
r2
;
Vec4d
mu_ij
=
vdotr2
/
(
All
.
cf_afac3
*
All
.
Time
*
r
);
Vec4d
mu_ij
=
vdotr2
/
(
All
.
cf_afac3
*
All
.
Time
*
r
);
Vec4d
cs_j
(
ngb0
->
Csnd
,
ngb1
->
Csnd
,
ngb2
->
Csnd
,
ngb3
->
Csnd
);
Vec4d
cs_sum
=
cs_i
+
cs_j
;
...
...
@@ -903,10 +906,9 @@ void sph::density_evaluate_kernel(pinfo &pdat)
Vec4d
decay_vel
=
select
(
decision
,
cs_sum
,
decay_vel_2
);
Vec4d
fac_decay_vel
=
select
(
decision_r_gt_0
,
1
,
0
);
Vec4d
fac_decay_vel
=
select
(
decision_r_gt_0
,
1
,
0
);
decay_vel
=
decay_vel
*
fac_decay_vel
;
decay_vel
=
decay_vel
*
fac_decay_vel
;
decayVel_loc
=
max
(
decayVel_loc
,
decay_vel
);
...
...
@@ -914,10 +916,11 @@ void sph::density_evaluate_kernel(pinfo &pdat)
}
#ifdef TIMEDEP_ART_VISC
for
(
int
i
=
0
;
i
<
vector_length
;
i
++
)
{
if
(
decayVel_loc
[
i
]
>
targetSphP
->
decayVel
)
targetSphP
->
decayVel
=
decayVel_loc
[
i
];
}
for
(
int
i
=
0
;
i
<
vector_length
;
i
++
)
{
if
(
decayVel_loc
[
i
]
>
targetSphP
->
decayVel
)
targetSphP
->
decayVel
=
decayVel_loc
[
i
];
}
#endif
}
...
...
@@ -1025,7 +1028,7 @@ void sph::density_evaluate_kernel(pinfo &pdat)
}
if
(
All
.
ComovingIntegrationOn
)
vdotr2
+=
All
.
cf_atime2_hubble_a
*
r2
;
vdotr2
+=
All
.
cf_atime2_hubble_a
*
r2
;
double
mu_ij
=
vdotr2
/
(
All
.
cf_afac3
*
All
.
Time
*
kernel
.
r
);
double
decay_vel
;
...
...
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