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
d415644f
Commit
d415644f
authored
8 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
remove init task.
parent
d63754e4
No related branches found
No related tags found
1 merge request
!327
Rebuild criteria
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner.c
+0
-68
0 additions, 68 deletions
src/runner.c
with
0 additions
and
68 deletions
src/runner.c
+
0
−
68
View file @
d415644f
...
...
@@ -510,71 +510,6 @@ void runner_do_sort(struct runner *r, struct cell *c, int flags, int clock) {
if
(
clock
)
TIMER_TOC
(
timer_dosort
);
}
/**
* @brief Initialize the particles before the density calculation
*
* @param r The runner thread.
* @param c The cell.
* @param timer 1 if the time is to be recorded.
*/
void
runner_do_init
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
)
{
struct
part
*
restrict
parts
=
c
->
parts
;
struct
gpart
*
restrict
gparts
=
c
->
gparts
;
const
int
count
=
c
->
count
;
const
int
gcount
=
c
->
gcount
;
const
struct
engine
*
e
=
r
->
e
;
TIMER_TIC
;
/* Anything to do here? */
if
(
!
cell_is_active
(
c
,
e
))
return
;
/* Reset the gravity acceleration tensors */
if
(
e
->
policy
&
engine_policy_self_gravity
)
gravity_field_tensor_init
(
c
->
multipole
);
/* Recurse? */
if
(
c
->
split
)
{
for
(
int
k
=
0
;
k
<
8
;
k
++
)
if
(
c
->
progeny
[
k
]
!=
NULL
)
runner_do_init
(
r
,
c
->
progeny
[
k
],
0
);
}
else
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
!
cell_is_drifted
(
c
,
e
))
error
(
"Trying to init undrifted cell."
);
#endif
/* Loop over the parts in this cell. */
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
/* Get a direct pointer on the part. */
struct
part
*
restrict
p
=
&
parts
[
i
];
if
(
part_is_active
(
p
,
e
))
{
/* Get ready for a density calculation */
hydro_init_part
(
p
);
}
}
/* Loop over the gparts in this cell. */
for
(
int
i
=
0
;
i
<
gcount
;
i
++
)
{
/* Get a direct pointer on the part. */
struct
gpart
*
restrict
gp
=
&
gparts
[
i
];
if
(
gpart_is_active
(
gp
,
e
))
{
/* Get ready for a density calculation */
gravity_init_gpart
(
gp
);
}
}
}
if
(
timer
)
TIMER_TOC
(
timer_init
);
}
/**
* @brief Intermediate task after the gradient loop that does final operations
* on the gradient quantities and optionally slope limits the gradients
...
...
@@ -1830,9 +1765,6 @@ void *runner_main(void *data) {
case
task_type_sort
:
runner_do_sort
(
r
,
ci
,
t
->
flags
,
1
);
break
;
case
task_type_init
:
runner_do_init
(
r
,
ci
,
1
);
break
;
case
task_type_ghost
:
runner_do_ghost
(
r
,
ci
,
1
);
break
;
...
...
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