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
11913694
Commit
11913694
authored
Dec 07, 2016
by
James Willis
Browse files
Renamed kernel constants.
parent
4e0393b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kernel_hydro.h
View file @
11913694
...
...
@@ -364,12 +364,12 @@ __attribute__((always_inline)) INLINE static void kernel_deval_vec(
/* Define constant vectors for the Wendland C2 kernel coefficients. */
#ifdef WENDLAND_C2_KERNEL
static
const
vector
c0
=
FILL_VEC
(
4
.
f
);
static
const
vector
c1
=
FILL_VEC
(
-
15
.
f
);
static
const
vector
c2
=
FILL_VEC
(
20
.
f
);
static
const
vector
c3
=
FILL_VEC
(
-
10
.
f
);
static
const
vector
c4
=
FILL_VEC
(
0
.
f
);
static
const
vector
c5
=
FILL_VEC
(
1
.
f
);
static
const
vector
wendland_const_
c0
=
FILL_VEC
(
4
.
f
);
static
const
vector
wendland_const_
c1
=
FILL_VEC
(
-
15
.
f
);
static
const
vector
wendland_const_
c2
=
FILL_VEC
(
20
.
f
);
static
const
vector
wendland_const_
c3
=
FILL_VEC
(
-
10
.
f
);
static
const
vector
wendland_const_
c4
=
FILL_VEC
(
0
.
f
);
static
const
vector
wendland_const_
c5
=
FILL_VEC
(
1
.
f
);
#endif
/**
...
...
@@ -399,31 +399,31 @@ __attribute__((always_inline)) INLINE static void kernel_deval_2_vec(
#ifdef WENDLAND_C2_KERNEL
/* Init the iteration for Horner's scheme. */
w
->
v
=
vec_fma
(
c0
.
v
,
x
.
v
,
c1
.
v
);
w2
->
v
=
vec_fma
(
c0
.
v
,
x2
.
v
,
c1
.
v
);
dw_dx
->
v
=
c0
.
v
;
dw_dx2
->
v
=
c0
.
v
;
w
->
v
=
vec_fma
(
wendland_const_c0
.
v
,
x
.
v
,
wendland_const_
c1
.
v
);
w2
->
v
=
vec_fma
(
wendland_const_c0
.
v
,
x2
.
v
,
wendland_const_
c1
.
v
);
dw_dx
->
v
=
wendland_const_
c0
.
v
;
dw_dx2
->
v
=
wendland_const_
c0
.
v
;
/* Calculate the polynomial interleaving vector operations */
dw_dx
->
v
=
vec_fma
(
dw_dx
->
v
,
x
.
v
,
w
->
v
);
dw_dx2
->
v
=
vec_fma
(
dw_dx2
->
v
,
x2
.
v
,
w2
->
v
);
w
->
v
=
vec_fma
(
x
.
v
,
w
->
v
,
c2
.
v
);
w2
->
v
=
vec_fma
(
x2
.
v
,
w2
->
v
,
c2
.
v
);
w
->
v
=
vec_fma
(
x
.
v
,
w
->
v
,
wendland_const_
c2
.
v
);
w2
->
v
=
vec_fma
(
x2
.
v
,
w2
->
v
,
wendland_const_
c2
.
v
);
dw_dx
->
v
=
vec_fma
(
dw_dx
->
v
,
x
.
v
,
w
->
v
);
dw_dx2
->
v
=
vec_fma
(
dw_dx2
->
v
,
x2
.
v
,
w2
->
v
);
w
->
v
=
vec_fma
(
x
.
v
,
w
->
v
,
c3
.
v
);
w2
->
v
=
vec_fma
(
x2
.
v
,
w2
->
v
,
c3
.
v
);
w
->
v
=
vec_fma
(
x
.
v
,
w
->
v
,
wendland_const_
c3
.
v
);
w2
->
v
=
vec_fma
(
x2
.
v
,
w2
->
v
,
wendland_const_
c3
.
v
);
dw_dx
->
v
=
vec_fma
(
dw_dx
->
v
,
x
.
v
,
w
->
v
);
dw_dx2
->
v
=
vec_fma
(
dw_dx2
->
v
,
x2
.
v
,
w2
->
v
);
w
->
v
=
vec_fma
(
x
.
v
,
w
->
v
,
c4
.
v
);
w2
->
v
=
vec_fma
(
x2
.
v
,
w2
->
v
,
c4
.
v
);
w
->
v
=
vec_fma
(
x
.
v
,
w
->
v
,
wendland_const_
c4
.
v
);
w2
->
v
=
vec_fma
(
x2
.
v
,
w2
->
v
,
wendland_const_
c4
.
v
);
dw_dx
->
v
=
vec_fma
(
dw_dx
->
v
,
x
.
v
,
w
->
v
);
dw_dx2
->
v
=
vec_fma
(
dw_dx2
->
v
,
x2
.
v
,
w2
->
v
);
w
->
v
=
vec_fma
(
x
.
v
,
w
->
v
,
c5
.
v
);
w2
->
v
=
vec_fma
(
x2
.
v
,
w2
->
v
,
c5
.
v
);
w
->
v
=
vec_fma
(
x
.
v
,
w
->
v
,
wendland_const_
c5
.
v
);
w2
->
v
=
vec_fma
(
x2
.
v
,
w2
->
v
,
wendland_const_
c5
.
v
);
/* Return everything */
w
->
v
=
...
...
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