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
9f114949
Commit
9f114949
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Cleaned-up init tasks
parent
eba84165
No related branches found
No related tags found
2 merge requests
!136
Master
,
!79
First version of the multiple time-stepping
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner.c
+14
-14
14 additions, 14 deletions
src/runner.c
with
14 additions
and
14 deletions
src/runner.c
+
14
−
14
View file @
9f114949
...
@@ -499,18 +499,18 @@ void runner_dogsort(struct runner *r, struct cell *c, int flags, int clock) {
...
@@ -499,18 +499,18 @@ void runner_dogsort(struct runner *r, struct cell *c, int flags, int clock) {
void
runner_doinit
(
struct
runner
*
r
,
struct
cell
*
c
)
{
void
runner_doinit
(
struct
runner
*
r
,
struct
cell
*
c
)
{
struct
part
*
p
,
*
parts
=
c
->
parts
;
struct
part
*
p
,
*
parts
=
c
->
parts
;
int
i
,
k
,
count
=
c
->
count
;
const
int
count
=
c
->
count
;
float
t_end
=
r
->
e
->
time
;
const
float
t_end
=
r
->
e
->
time
;
/* Recurse? */
/* Recurse? */
if
(
c
->
split
)
{
if
(
c
->
split
)
{
for
(
k
=
0
;
k
<
8
;
k
++
)
for
(
int
k
=
0
;
k
<
8
;
k
++
)
if
(
c
->
progeny
[
k
]
!=
NULL
)
runner_doinit
(
r
,
c
->
progeny
[
k
]);
if
(
c
->
progeny
[
k
]
!=
NULL
)
runner_doinit
(
r
,
c
->
progeny
[
k
]);
return
;
return
;
}
}
/* Loop over the parts in this cell. */
/* Loop over the parts in this cell. */
for
(
i
=
0
;
i
<
count
;
i
++
)
{
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
/* Get a direct pointer on the part. */
/* Get a direct pointer on the part. */
p
=
&
parts
[
i
];
p
=
&
parts
[
i
];
...
@@ -518,15 +518,15 @@ void runner_doinit(struct runner *r, struct cell *c) {
...
@@ -518,15 +518,15 @@ void runner_doinit(struct runner *r, struct cell *c) {
if
(
p
->
t_end
<=
t_end
)
{
if
(
p
->
t_end
<=
t_end
)
{
/* Get ready for a density calculation */
/* Get ready for a density calculation */
p
->
density
.
wcount
=
0
.
0
;
p
->
density
.
wcount
=
0
.
f
;
p
->
density
.
wcount_dh
=
0
.
0
;
p
->
density
.
wcount_dh
=
0
.
f
;
p
->
rho
=
0
.
0
;
p
->
rho
=
0
.
f
;
p
->
rho_dh
=
0
.
0
;
p
->
rho_dh
=
0
.
f
;
p
->
density
.
div_v
=
0
.
0
;
p
->
density
.
div_v
=
0
.
f
;
for
(
k
=
0
;
k
<
3
;
k
++
)
p
->
density
.
curl_v
[
k
]
=
0
.
0
;
p
->
density
.
curl_v
[
0
]
=
0
.
f
;
p
->
density
.
curl_v
[
1
]
=
0
.
f
;
p
->
density
.
curl_v
[
2
]
=
0
.
f
;
}
}
;
}
}
}
}
...
...
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