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
70edbfe7
Commit
70edbfe7
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Converted space.c
parent
8b49a37d
Branches
Branches containing commit
Tags
Tags containing commit
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/space.c
+9
-10
9 additions, 10 deletions
src/space.c
with
9 additions
and
10 deletions
src/space.c
+
9
−
10
View file @
70edbfe7
...
...
@@ -902,7 +902,7 @@ void space_map_cells_pre(struct space *s, int full,
void
space_split
(
struct
space
*
s
,
struct
cell
*
c
)
{
int
k
,
count
=
c
->
count
,
gcount
=
c
->
gcount
,
maxdepth
=
0
;
float
h
,
h_max
=
0
.
0
f
,
dt
,
dt
_min
=
c
->
parts
[
0
].
dt
,
dt_max
=
dt_min
;
float
h
,
h_max
=
0
.
0
f
,
t_end
_min
=
FLT_MAX
,
t_end_max
=
0
.,
t_end
;
struct
cell
*
temp
;
struct
part
*
p
,
*
parts
=
c
->
parts
;
struct
xpart
*
xp
,
*
xparts
=
c
->
xparts
;
...
...
@@ -951,16 +951,16 @@ void space_split(struct space *s, struct cell *c) {
}
else
{
space_split
(
s
,
c
->
progeny
[
k
]);
h_max
=
fmaxf
(
h_max
,
c
->
progeny
[
k
]
->
h_max
);
d
t_min
=
fminf
(
d
t_min
,
c
->
progeny
[
k
]
->
d
t_min
);
d
t_max
=
fmaxf
(
d
t_max
,
c
->
progeny
[
k
]
->
d
t_max
);
t
_end
_min
=
fminf
(
t
_end
_min
,
c
->
progeny
[
k
]
->
t
_end
_min
);
t
_end
_max
=
fmaxf
(
t
_end
_max
,
c
->
progeny
[
k
]
->
t
_end
_max
);
if
(
c
->
progeny
[
k
]
->
maxdepth
>
maxdepth
)
maxdepth
=
c
->
progeny
[
k
]
->
maxdepth
;
}
/* Set the values for this cell. */
c
->
h_max
=
h_max
;
c
->
d
t_min
=
d
t_min
;
c
->
d
t_max
=
d
t_max
;
c
->
t
_end
_min
=
t
_end
_min
;
c
->
t
_end
_max
=
t
_end
_max
;
c
->
maxdepth
=
maxdepth
;
}
...
...
@@ -981,15 +981,14 @@ void space_split(struct space *s, struct cell *c) {
xp
->
x_old
[
0
]
=
p
->
x
[
0
];
xp
->
x_old
[
1
]
=
p
->
x
[
1
];
xp
->
x_old
[
2
]
=
p
->
x
[
2
];
dt
=
p
->
dt
;
h
=
p
->
h
;
if
(
h
>
h_max
)
h_max
=
h
;
if
(
dt
<
dt
_min
)
d
t_min
=
d
t
;
if
(
dt
>
dt
_max
)
d
t_max
=
d
t
;
if
(
t_end
<
t_end
_min
)
t
_end
_min
=
t
_end
;
if
(
t_end
>
t_end
_max
)
t
_end
_max
=
t
_end
;
}
c
->
h_max
=
h_max
;
c
->
d
t_min
=
d
t_min
;
c
->
d
t_max
=
d
t_max
;
c
->
t
_end
_min
=
t
_end
_min
;
c
->
t
_end
_max
=
t
_end
_max
;
}
/* Set ownership accorind to the start of the parts array. */
...
...
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