Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Volker Springel
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
Show whitespace changes
Inline
Side-by-side
defines_extra
View file @
cda6e3b5
#defines for headers
#
defines for headers
VERSION_H
VERSION_H
HDF5UTIL_H
HDF5UTIL_H
ALLVARS_H
ALLVARS_H
...
...
src/data/simparticles.h
View file @
cda6e3b5
...
@@ -413,7 +413,6 @@ class simparticles : public intposconvert, public setcomm
...
@@ -413,7 +413,6 @@ class simparticles : public intposconvert, public setcomm
int
test_if_grav_timestep_is_too_large
(
int
p
,
int
bin
);
int
test_if_grav_timestep_is_too_large
(
int
p
,
int
bin
);
int
get_timestep_bin
(
integertime
ti_step
);
int
get_timestep_bin
(
integertime
ti_step
);
private:
#ifdef ADAPTIVE_HYDRO_SOFTENING
#ifdef ADAPTIVE_HYDRO_SOFTENING
int
get_softeningtype_for_hydro_particle
(
int
i
)
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)
...
@@ -556,6 +556,9 @@ void sph::density(int *list, int ntarget)
All
.
Timebase_interval
;
All
.
Timebase_interval
;
double
dtime
=
All
.
cf_atime
*
dt
/
All
.
cf_atime_hubble_a
;
double
dtime
=
All
.
cf_atime
*
dt
/
All
.
cf_atime_hubble_a
;
SphP
[
target
].
set_viscosity_coefficient
(
dtime
);
SphP
[
target
].
set_viscosity_coefficient
(
dtime
);
#endif
#ifdef ADAPTIVE_HYDRO_SOFTENING
Tp
->
P
[
target
].
setSofteningClass
(
Tp
->
get_softeningtype_for_hydro_particle
(
target
));
#endif
#endif
/* now check whether we had enough neighbours */
/* now check whether we had enough neighbours */
double
desnumngb
=
All
.
DesNumNgb
;
double
desnumngb
=
All
.
DesNumNgb
;
...
@@ -892,7 +895,7 @@ void sph::density_evaluate_kernel(pinfo &pdat)
...
@@ -892,7 +895,7 @@ void sph::density_evaluate_kernel(pinfo &pdat)
if
(
All
.
ComovingIntegrationOn
)
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_j
(
ngb0
->
Csnd
,
ngb1
->
Csnd
,
ngb2
->
Csnd
,
ngb3
->
Csnd
);
Vec4d
cs_sum
=
cs_i
+
cs_j
;
Vec4d
cs_sum
=
cs_i
+
cs_j
;
...
@@ -903,7 +906,6 @@ void sph::density_evaluate_kernel(pinfo &pdat)
...
@@ -903,7 +906,6 @@ void sph::density_evaluate_kernel(pinfo &pdat)
Vec4d
decay_vel
=
select
(
decision
,
cs_sum
,
decay_vel_2
);
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
;
...
@@ -914,7 +916,8 @@ void sph::density_evaluate_kernel(pinfo &pdat)
...
@@ -914,7 +916,8 @@ void sph::density_evaluate_kernel(pinfo &pdat)
}
}
#ifdef TIMEDEP_ART_VISC
#ifdef TIMEDEP_ART_VISC
for
(
int
i
=
0
;
i
<
vector_length
;
i
++
)
{
for
(
int
i
=
0
;
i
<
vector_length
;
i
++
)
{
if
(
decayVel_loc
[
i
]
>
targetSphP
->
decayVel
)
if
(
decayVel_loc
[
i
]
>
targetSphP
->
decayVel
)
targetSphP
->
decayVel
=
decayVel_loc
[
i
];
targetSphP
->
decayVel
=
decayVel_loc
[
i
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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