Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gadget4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sten Delos
Gadget4
Commits
7b854f23
Commit
7b854f23
authored
4 years ago
by
Volker Springel
Browse files
Options
Downloads
Patches
Plain Diff
reacticated missing setSofteningClass() call for proper function of ADAPTIVE_HYDRO_SOFTENING
parent
807f39bf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/data/simparticles.h
+0
-1
0 additions, 1 deletion
src/data/simparticles.h
src/sph/density.cc
+13
-10
13 additions, 10 deletions
src/sph/density.cc
with
13 additions
and
11 deletions
src/data/simparticles.h
+
0
−
1
View file @
7b854f23
...
@@ -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
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/sph/density.cc
+
13
−
10
View file @
7b854f23
...
@@ -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
;
...
@@ -890,9 +893,9 @@ void sph::density_evaluate_kernel(pinfo &pdat)
...
@@ -890,9 +893,9 @@ 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,10 +906,9 @@ void sph::density_evaluate_kernel(pinfo &pdat)
...
@@ -903,10 +906,9 @@ 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
;
decayVel_loc
=
max
(
decayVel_loc
,
decay_vel
);
decayVel_loc
=
max
(
decayVel_loc
,
decay_vel
);
...
@@ -914,10 +916,11 @@ void sph::density_evaluate_kernel(pinfo &pdat)
...
@@ -914,10 +916,11 @@ 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
)
{
targetSphP
->
decayVel
=
decayVel_loc
[
i
];
if
(
decayVel_loc
[
i
]
>
targetSphP
->
decayVel
)
}
targetSphP
->
decayVel
=
decayVel_loc
[
i
];
}
#endif
#endif
}
}
...
@@ -1025,7 +1028,7 @@ void sph::density_evaluate_kernel(pinfo &pdat)
...
@@ -1025,7 +1028,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
;
double
mu_ij
=
vdotr2
/
(
All
.
cf_afac3
*
All
.
Time
*
kernel
.
r
);
double
mu_ij
=
vdotr2
/
(
All
.
cf_afac3
*
All
.
Time
*
kernel
.
r
);
double
decay_vel
;
double
decay_vel
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment