Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
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
SWIFT
SWIFTsim
Commits
ae46c08f
Commit
ae46c08f
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Make sure we never call the subset function for the star feedback.
parent
ac521a7f
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!956
Fully implement the timestep limiter (non MPI)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/feedback/none/feedback_iact.h
+2
-0
2 additions, 0 deletions
src/feedback/none/feedback_iact.h
src/runner_doiact_functions_stars.h
+19
-36
19 additions, 36 deletions
src/runner_doiact_functions_stars.h
with
21 additions
and
36 deletions
src/feedback/none/feedback_iact.h
+
2
−
0
View file @
ae46c08f
...
...
@@ -40,6 +40,7 @@ runner_iact_nonsym_feedback_density(const float r2, const float *dx,
struct
spart
*
si
,
const
struct
part
*
pj
,
const
struct
xpart
*
xp
,
const
struct
cosmology
*
cosmo
,
const
struct
engine
*
e
,
const
integertime_t
ti_current
)
{}
/**
...
...
@@ -65,6 +66,7 @@ runner_iact_nonsym_feedback_apply(const float r2, const float *dx,
const
struct
spart
*
si
,
struct
part
*
pj
,
struct
xpart
*
xp
,
const
struct
cosmology
*
cosmo
,
const
struct
engine
*
e
,
const
integertime_t
ti_current
)
{}
#endif
/* SWIFT_NONE_FEEDBACK_IACT_H */
This diff is collapsed.
Click to expand it.
src/runner_doiact_functions_stars.h
+
19
−
36
View file @
ae46c08f
...
...
@@ -577,7 +577,6 @@ void DOPAIR1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
const
int
flipped
,
const
double
*
shift
)
{
const
struct
engine
*
e
=
r
->
e
;
const
integertime_t
ti_current
=
e
->
ti_current
;
const
struct
cosmology
*
cosmo
=
e
->
cosmology
;
/* Cosmological terms */
...
...
@@ -586,9 +585,6 @@ void DOPAIR1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
const
int
count_j
=
cj
->
hydro
.
count
;
struct
part
*
restrict
parts_j
=
cj
->
hydro
.
parts
;
#if (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
struct
xpart
*
restrict
xparts_j
=
cj
->
hydro
.
xparts
;
#endif
/* Early abort? */
if
(
count_j
==
0
)
return
;
...
...
@@ -618,9 +614,6 @@ void DOPAIR1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
/* Get a pointer to the jth particle. */
struct
part
*
restrict
pj
=
&
parts_j
[
sort_j
[
pjd
].
i
];
#if (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
struct
xpart
*
restrict
xpj
=
&
xparts_j
[
sort_j
[
pjd
].
i
];
#endif
/* Skip inhibited particles. */
if
(
part_is_inhibited
(
pj
,
e
))
continue
;
...
...
@@ -649,10 +642,12 @@ void DOPAIR1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density
(
r2
,
dx
,
hi
,
hj
,
spi
,
pj
,
NULL
,
cosmo
,
e
,
ti_current
);
cosmo
,
e
,
e
->
ti_current
);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply
(
r2
,
dx
,
hi
,
hj
,
spi
,
pj
,
xpj
,
cosmo
,
e
,
ti_current
);
error
(
"This call makes no sense!"
);
/* runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, spi, pj, xpj,
* cosmo, */
/* e, ti_current); */
#endif
}
}
/* loop over the parts in cj. */
...
...
@@ -680,9 +675,6 @@ void DOPAIR1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
/* Get a pointer to the jth particle. */
struct
part
*
restrict
pj
=
&
parts_j
[
sort_j
[
pjd
].
i
];
#if (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
struct
xpart
*
restrict
xpj
=
&
xparts_j
[
sort_j
[
pjd
].
i
];
#endif
/* Skip inhibited particles. */
if
(
part_is_inhibited
(
pj
,
e
))
continue
;
...
...
@@ -711,10 +703,12 @@ void DOPAIR1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density
(
r2
,
dx
,
hi
,
hj
,
spi
,
pj
,
NULL
,
cosmo
,
e
,
ti_current
);
cosmo
,
e
,
e
->
ti_current
);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply
(
r2
,
dx
,
hi
,
hj
,
spi
,
pj
,
xpj
,
cosmo
,
e
,
ti_current
);
error
(
"This call makes no sense!"
);
/* runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, spi, pj, xpj,
* cosmo, */
/* e, ti_current); */
#endif
}
}
/* loop over the parts in cj. */
...
...
@@ -746,7 +740,6 @@ void DOPAIR1_SUBSET_STARS_NAIVE(struct runner *r, struct cell *restrict ci,
#endif
const
struct
engine
*
e
=
r
->
e
;
const
integertime_t
ti_current
=
e
->
ti_current
;
const
struct
cosmology
*
cosmo
=
e
->
cosmology
;
/* Cosmological terms */
...
...
@@ -755,9 +748,6 @@ void DOPAIR1_SUBSET_STARS_NAIVE(struct runner *r, struct cell *restrict ci,
const
int
count_j
=
cj
->
hydro
.
count
;
struct
part
*
restrict
parts_j
=
cj
->
hydro
.
parts
;
#if (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
struct
xpart
*
restrict
xparts_j
=
cj
->
hydro
.
xparts
;
#endif
/* Early abort? */
if
(
count_j
==
0
)
return
;
...
...
@@ -784,9 +774,6 @@ void DOPAIR1_SUBSET_STARS_NAIVE(struct runner *r, struct cell *restrict ci,
/* Get a pointer to the jth particle. */
struct
part
*
restrict
pj
=
&
parts_j
[
pjd
];
#if (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
struct
xpart
*
restrict
xpj
=
&
xparts_j
[
pjd
];
#endif
/* Skip inhibited particles */
if
(
part_is_inhibited
(
pj
,
e
))
continue
;
...
...
@@ -812,10 +799,12 @@ void DOPAIR1_SUBSET_STARS_NAIVE(struct runner *r, struct cell *restrict ci,
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density
(
r2
,
dx
,
hi
,
hj
,
spi
,
pj
,
NULL
,
cosmo
,
e
,
ti_current
);
cosmo
,
e
,
e
->
ti_current
);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply
(
r2
,
dx
,
hi
,
hj
,
spi
,
pj
,
xpj
,
cosmo
,
e
,
ti_current
);
error
(
"This call makes no sense!"
);
/* runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, spi, pj, xpj,
* cosmo, */
/* e, ti_current); */
#endif
}
}
/* loop over the parts in cj. */
...
...
@@ -841,7 +830,6 @@ void DOSELF1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
#endif
const
struct
engine
*
e
=
r
->
e
;
const
integertime_t
ti_current
=
e
->
ti_current
;
const
struct
cosmology
*
cosmo
=
e
->
cosmology
;
/* Cosmological terms */
...
...
@@ -850,9 +838,6 @@ void DOSELF1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
const
int
count_i
=
ci
->
hydro
.
count
;
struct
part
*
restrict
parts_j
=
ci
->
hydro
.
parts
;
#if (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
struct
xpart
*
restrict
xparts_j
=
ci
->
hydro
.
xparts
;
#endif
/* Early abort? */
if
(
count_i
==
0
)
return
;
...
...
@@ -878,9 +863,6 @@ void DOSELF1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
/* Get a pointer to the jth particle. */
struct
part
*
restrict
pj
=
&
parts_j
[
pjd
];
#if (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
struct
xpart
*
restrict
xpj
=
&
xparts_j
[
pjd
];
#endif
/* Early abort? */
if
(
part_is_inhibited
(
pj
,
e
))
continue
;
...
...
@@ -903,10 +885,11 @@ void DOSELF1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
IACT_STARS
(
r2
,
dx
,
hi
,
pj
->
h
,
spi
,
pj
,
a
,
H
);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density
(
r2
,
dx
,
hi
,
pj
->
h
,
spi
,
pj
,
NULL
,
cosmo
,
e
,
ti_current
);
cosmo
,
e
,
e
->
ti_current
);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply
(
r2
,
dx
,
hi
,
pj
->
h
,
spi
,
pj
,
xpj
,
cosmo
,
e
,
ti_current
);
error
(
"This call makes no sense!"
);
/* runner_iact_nonsym_feedback_apply(r2, dx, hi, pj->h, spi, pj, xpj, */
/* cosmo, e, ti_current); */
#endif
}
}
/* loop over the parts in cj. */
...
...
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