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
mlz
kww
Commits
154841c4
Commit
154841c4
authored
Dec 17, 2019
by
Wuttke, Joachim
Browse files
Merge branch 'master' of jugit.fz-juelich.de:mlz/kww
parents
130127e8
b7907204
Pipeline
#14239
failed with stage
in 12 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/kww.c
View file @
154841c4
...
...
@@ -116,31 +116,6 @@ double kwwp_lim_hig( const double b )
}
/*****************************************************************************/
/* Auxiliary functions for debugging */
/*****************************************************************************/
void
kww_hexprint_double
(
const
char
*
name
,
const
double
x
)
{
union
{
double
d
;
unsigned
long
u
;
}
u
;
u
.
d
=
x
;
printf
(
" %s = %24.18f [%lx]
\n
"
,
name
,
x
,
u
.
u
);
}
void
kww_hexprint_quad
(
const
char
*
name
,
const
long
double
x
)
{
union
{
long
double
d
;
unsigned
long
long
u
;
}
u
;
u
.
d
=
x
;
printf
(
" %s = %24.18Lf [%llx]"
,
name
,
x
,
u
.
u
);
}
/*****************************************************************************/
/* High-level wrapper functions */
/*****************************************************************************/
...
...
@@ -379,12 +354,6 @@ double kww_hig( const double w, const double beta,
long
double
s
;
// full term (with trigonometric factor)
long
double
x
,
gl
;
// local variables
if
(
kww_debug
&
8
)
{
printf
(
"kww_hig: kappa %i mu %i deb %i
\n
"
,
kappa
,
mu
,
kww_debug
);
kww_hexprint_double
(
"b"
,
beta
);
kww_hexprint_double
(
"w"
,
w
);
}
// set diagnostic variable
kww_algorithm
=
3
;
...
...
@@ -581,11 +550,6 @@ double kww_mid( const double w, const double beta,
else
N
=
40
;
if
(
kww_debug
&
8
)
{
printf
(
"kww_mid %i %i %i %i
\n
"
,
kind
,
mu
,
N
,
kww_debug
);
kww_hexprint_double
(
"b"
,
beta
);
kww_hexprint_double
(
"w"
,
w
);
}
for
(
iter
=
0
;
iter
<
max_iter_int
;
++
iter
)
{
// static initialisation of NN, ak, bk for given 'iter'
if
(
iter
>
iterDone
[
kind
][
j
]
)
{
...
...
@@ -658,11 +622,6 @@ double kww_mid( const double w, const double beta,
kww_num_of_terms
+=
2
*
NN
[
j
][
iter
]
+
1
;
if
(
diffmode
)
S
+=
w
/
sqrt
(
PI
)
/
2
*
exp
(
-
SQR
(
w
)
/
4
);
if
(
kww_debug
&
8
)
{
printf
(
"iter %i N %i
\n
"
,
iter
,
N
);
kww_hexprint_double
(
"S_new"
,
S
);
kww_hexprint_double
(
"S_old"
,
S_last
);
}
// termination criteria
if
(
kww_debug
&
4
)
return
-
1
;
// we want to inspect just one sum
...
...
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