Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
8eb6c69a
Commit
8eb6c69a
authored
1 year ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Use abs() function to calculate s0mag
parent
54c987b3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cluster/cluster.cpp
+3
-3
3 additions, 3 deletions
src/cluster/cluster.cpp
src/sphere/sphere.cpp
+2
-8
2 additions, 8 deletions
src/sphere/sphere.cpp
with
5 additions
and
11 deletions
src/cluster/cluster.cpp
+
3
−
3
View file @
8eb6c69a
...
@@ -368,7 +368,7 @@ void cluster() {
...
@@ -368,7 +368,7 @@ void cluster() {
s0
=
c1
->
fsas
[
i
]
*
exri
;
s0
=
c1
->
fsas
[
i
]
*
exri
;
qschu
=
s0
.
imag
()
*
csch
;
qschu
=
s0
.
imag
()
*
csch
;
pschu
=
s0
.
real
()
*
csch
;
pschu
=
s0
.
real
()
*
csch
;
s0mag
=
sqrt
((
s0
.
real
()
+
s0
.
imag
())
*
(
s0
.
real
()
-
s0
.
imag
())
)
*
cs0
;
s0mag
=
abs
(
s0
)
*
cs0
;
fprintf
(
output
,
" QSCHU=%15.7lE, PSCHU=%15.7lE, S0MAG=%15.7lE
\n
"
,
qschu
,
pschu
,
s0mag
);
fprintf
(
output
,
" QSCHU=%15.7lE, PSCHU=%15.7lE, S0MAG=%15.7lE
\n
"
,
qschu
,
pschu
,
s0mag
);
double
rapr
=
c1
->
sexs
[
i
]
-
gaps
[
i
];
double
rapr
=
c1
->
sexs
[
i
]
-
gaps
[
i
];
double
cosav
=
gaps
[
i
]
/
c1
->
sscs
[
i
];
double
cosav
=
gaps
[
i
]
/
c1
->
sscs
[
i
];
...
@@ -382,7 +382,7 @@ void cluster() {
...
@@ -382,7 +382,7 @@ void cluster() {
s0
=
c3
->
tfsas
*
exri
;
s0
=
c3
->
tfsas
*
exri
;
qschu
=
s0
.
imag
()
*
csch
;
qschu
=
s0
.
imag
()
*
csch
;
pschu
=
s0
.
real
()
*
csch
;
pschu
=
s0
.
real
()
*
csch
;
s0mag
=
sqrt
((
s0
.
real
()
+
s0
.
imag
())
*
(
s0
.
real
()
-
s0
.
imag
())
)
*
cs0
;
s0mag
=
abs
(
s0
)
*
cs0
;
fprintf
(
output
,
" QSCHU=%15.7lE, PSCHU=%15.7lE, S0MAG=%15.7lE
\n
"
,
qschu
,
pschu
,
s0mag
);
fprintf
(
output
,
" QSCHU=%15.7lE, PSCHU=%15.7lE, S0MAG=%15.7lE
\n
"
,
qschu
,
pschu
,
s0mag
);
tppoan
.
write
(
reinterpret_cast
<
char
*>
(
&
vk
),
sizeof
(
double
));
tppoan
.
write
(
reinterpret_cast
<
char
*>
(
&
vk
),
sizeof
(
double
));
pcrsm0
(
vk
,
exri
,
inpol
,
c1
,
c1ao
,
c4
);
pcrsm0
(
vk
,
exri
,
inpol
,
c1
,
c1ao
,
c4
);
...
@@ -731,7 +731,7 @@ void cluster() {
...
@@ -731,7 +731,7 @@ void cluster() {
s0
=
c1ao
->
fsac
[
ilr290
-
1
][
ilr290
-
1
]
*
exri
;
s0
=
c1ao
->
fsac
[
ilr290
-
1
][
ilr290
-
1
]
*
exri
;
double
qschu
=
s0
.
imag
()
*
csch
;
double
qschu
=
s0
.
imag
()
*
csch
;
double
pschu
=
s0
.
real
()
*
csch
;
double
pschu
=
s0
.
real
()
*
csch
;
s0mag
=
sqrt
((
s0
.
real
()
+
s0
.
imag
())
*
(
s0
.
real
()
-
s0
.
imag
())
)
*
cs0
;
s0mag
=
abs
(
s0
)
*
cs0
;
double
refinr
=
c1ao
->
fsac
[
ilr290
-
1
][
ilr290
-
1
].
real
()
/
c3
->
tfsas
.
real
();
double
refinr
=
c1ao
->
fsac
[
ilr290
-
1
][
ilr290
-
1
].
real
()
/
c3
->
tfsas
.
real
();
double
extcor
=
c1ao
->
fsac
[
ilr290
-
1
][
ilr290
-
1
].
imag
()
/
c3
->
tfsas
.
imag
();
double
extcor
=
c1ao
->
fsac
[
ilr290
-
1
][
ilr290
-
1
].
imag
()
/
c3
->
tfsas
.
imag
();
if
(
inpol
==
0
)
{
if
(
inpol
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
src/sphere/sphere.cpp
+
2
−
8
View file @
8eb6c69a
...
@@ -277,7 +277,6 @@ void sphere() {
...
@@ -277,7 +277,6 @@ void sphere() {
}
}
}
}
double
cs0
=
0.25
*
vk
*
vk
*
vk
/
half_pi
;
double
cs0
=
0.25
*
vk
*
vk
*
vk
/
half_pi
;
//printf("DEBUG: cs0 = %lE\n", cs0);
sscr0
(
tfsas
,
nsph
,
gconf
->
l_max
,
vk
,
exri
,
c1
);
sscr0
(
tfsas
,
nsph
,
gconf
->
l_max
,
vk
,
exri
,
c1
);
printf
(
"DEBUG: TFSAS = (%lE,%lE)
\n
"
,
tfsas
.
real
(),
tfsas
.
imag
());
printf
(
"DEBUG: TFSAS = (%lE,%lE)
\n
"
,
tfsas
.
real
(),
tfsas
.
imag
());
double
sqk
=
vk
*
vk
*
sconf
->
exdc
;
double
sqk
=
vk
*
vk
*
sconf
->
exdc
;
...
@@ -317,15 +316,10 @@ void sphere() {
...
@@ -317,15 +316,10 @@ void sphere() {
);
);
fprintf
(
output
,
" FSAS=%15.7lE%15.7lE
\n
"
,
c1
->
fsas
[
i170
-
1
].
real
(),
c1
->
fsas
[
i170
-
1
].
imag
());
fprintf
(
output
,
" FSAS=%15.7lE%15.7lE
\n
"
,
c1
->
fsas
[
i170
-
1
].
real
(),
c1
->
fsas
[
i170
-
1
].
imag
());
double
csch
=
2.0
*
vk
*
sqsfi
/
c1
->
gcsv
[
i170
-
1
];
double
csch
=
2.0
*
vk
*
sqsfi
/
c1
->
gcsv
[
i170
-
1
];
//printf("DEBUG: csch = %lE\n", csch);
s0
=
c1
->
fsas
[
i170
-
1
]
*
exri
;
s0
=
c1
->
fsas
[
i170
-
1
]
*
exri
;
//printf("DEBUG: s0 = (%lE,%lE)\n", s0.real(), s0.imag());
double
qschu
=
csch
*
s0
.
imag
();
double
qschu
=
csch
*
s0
.
imag
();
//printf("DEBUG: qschu = %lE\n", qschu);
double
pschu
=
csch
*
s0
.
real
();
double
pschu
=
csch
*
s0
.
real
();
//printf("DEBUG: pschu = %lE\n", pschu);
double
s0mag
=
cs0
*
abs
(
s0
);
double
s0mag
=
cs0
*
sqrt
((
s0
.
real
()
+
s0
.
imag
())
*
(
s0
.
real
()
-
s0
.
imag
()));
//printf("DEBUG: s0mag = %lE\n", s0mag);
fprintf
(
fprintf
(
output
,
output
,
" QSCHU=%15.7lE, PSCHU=%15.7lE, S0MAG=%15.7lE
\n
"
,
" QSCHU=%15.7lE, PSCHU=%15.7lE, S0MAG=%15.7lE
\n
"
,
...
@@ -364,7 +358,7 @@ void sphere() {
...
@@ -364,7 +358,7 @@ void sphere() {
s0
=
tfsas
*
exri
;
s0
=
tfsas
*
exri
;
double
qschu
=
csch
*
s0
.
imag
();
double
qschu
=
csch
*
s0
.
imag
();
double
pschu
=
csch
*
s0
.
real
();
double
pschu
=
csch
*
s0
.
real
();
double
s0mag
=
cs0
*
sqrt
((
s0
.
real
()
+
s0
.
imag
())
*
(
s0
.
real
()
-
s0
.
imag
())
);
double
s0mag
=
cs0
*
abs
(
s0
);
fprintf
(
fprintf
(
output
,
output
,
" QSCHU=%15.7lE, PSCHU=%15.7lE, S0MAG=%15.7lE
\n
"
,
" QSCHU=%15.7lE, PSCHU=%15.7lE, S0MAG=%15.7lE
\n
"
,
...
...
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