Skip to content
GitLab
Menu
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
8cbae064
Commit
8cbae064
authored
Apr 12, 2013
by
Pedro Gonnet
Browse files
fix bug in balsara, found by matthieu.
Former-commit-id: cee33042fcd80bedd4d1d7e7df9cd9c482fa392f
parent
a01841d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/runner.c
View file @
8cbae064
...
...
@@ -431,7 +431,7 @@ void runner_doghost ( struct runner *r , struct cell *c ) {
p
->
force
.
POrho2
=
u
*
(
const_gamma
-
1
.
0
f
)
/
(
rho
+
hg
*
rho_dh
/
3
.
0
f
);
/* Balsara switch */
p
->
force
.
balsara
=
norm
Curl
_v
/
(
normDiv_v
+
normCurl_v
+
0
.
0001
f
*
fc
*
ihg
);
p
->
force
.
balsara
=
norm
Div
_v
/
(
normDiv_v
+
normCurl_v
+
0
.
0001
f
*
fc
*
ihg
);
/* Reset the acceleration. */
for
(
k
=
0
;
k
<
3
;
k
++
)
...
...
src/vector.h
View file @
8cbae064
...
...
@@ -27,7 +27,7 @@
#define VEC_MACRO(elcount, type) __attribute__((vector_size((elcount)*sizeof(type)))) type
/* So what will the vector size be? */
#ifdef __AVX__
#ifdef
NO
__AVX__
#define VECTORIZE
#define VEC_SIZE 8
#define VEC_FLOAT __m256
...
...
@@ -54,7 +54,7 @@
#define vec_dbl_ftoi(a) _mm256_cvttpd_epi32(a)
#define vec_dbl_fmin(a,b) _mm256_min_pd(a,b)
#define vec_dbl_fmax(a,b) _mm256_max_pd(a,b)
#elif defined( __SSE2__ )
#elif defined(
NO
__SSE2__ )
#define VECTORIZE
#define VEC_SIZE 4
#define VEC_FLOAT __m128
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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