Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
297b73f6
Commit
297b73f6
authored
Mar 14, 2017
by
Bert Vandenbroucke
Browse files
Fixed some small issues in 2D Voronoi code. 2D Sod shock still does not work.
parent
77e62725
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/hydro/Shadowswift/hydro_iact.h
View file @
297b73f6
...
...
@@ -143,7 +143,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_fluxes_common(
float
n_unit
[
3
];
A
=
voronoi_get_face
(
&
pi
->
cell
,
pj
->
id
,
xij_i
);
if
(
!
A
)
{
if
(
A
==
0
.
0
f
)
{
/* this neighbour does not share a face with the cell, return */
return
;
}
...
...
src/hydro/Shadowswift/voronoi2d_algorithm.h
View file @
297b73f6
...
...
@@ -479,6 +479,10 @@ __attribute__((always_inline)) INLINE float voronoi_cell_finalize(
r2
=
x
[
0
]
*
x
[
0
]
+
y
[
0
]
*
y
[
0
];
r2max
=
max
(
r2max
,
r2
);
x
[
0
]
-=
x
[
1
];
y
[
0
]
-=
y
[
1
];
cell
->
face_lengths
[
i
]
=
sqrtf
(
x
[
0
]
*
x
[
0
]
+
y
[
0
]
*
y
[
0
]);
}
cell
->
volume
*=
0
.
5
f
;
...
...
@@ -517,6 +521,7 @@ __attribute__((always_inline)) INLINE float voronoi_get_face(
midpoint
[
0
]
=
cell
->
face_midpoints
[
i
][
0
];
midpoint
[
1
]
=
cell
->
face_midpoints
[
i
][
1
];
midpoint
[
2
]
=
0
.
0
f
;
return
cell
->
face_lengths
[
i
];
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment