Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tobias WEBER
Takin MnSi module
Commits
32990d71
Verified
Commit
32990d71
authored
Jul 24, 2020
by
Tobias WEBER
Browse files
formatting cleanups
parent
5450851a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/calc/weight_sum.cpp
View file @
32990d71
...
@@ -34,7 +34,7 @@ void calc_disp(
...
@@ -34,7 +34,7 @@ void calc_disp(
t_real
Gx
,
t_real
Gy
,
t_real
Gz
,
t_real
Gx
,
t_real
Gy
,
t_real
Gz
,
t_real
Bx
,
t_real
By
,
t_real
Bz
,
t_real
Bx
,
t_real
By
,
t_real
Bz
,
t_real
Px
,
t_real
Py
,
t_real
Pz
,
t_real
Px
,
t_real
Py
,
t_real
Pz
,
t_real
q
,
int
iProj
=
1
)
t_real
q
,
int
iProj
=
1
)
{
{
Skx
<
t_real
,
t_cplx
,
DEF_SKX_ORDER
>
skx
;
Skx
<
t_real
,
t_cplx
,
DEF_SKX_ORDER
>
skx
;
Heli
<
t_real
,
t_cplx
,
DEF_HELI_ORDER
>
heli
;
Heli
<
t_real
,
t_cplx
,
DEF_HELI_ORDER
>
heli
;
...
@@ -58,7 +58,7 @@ void calc_disp(
...
@@ -58,7 +58,7 @@ void calc_disp(
skx
.
GenFullFourier
();
skx
.
GenFullFourier
();
skx
.
SetFilterZeroWeight
(
1
);
skx
.
SetFilterZeroWeight
(
1
);
heli
.
SetFilterZeroWeight
(
1
);
heli
.
SetFilterZeroWeight
(
1
);
skx
.
SetWeightEps
(
1e-6
);
skx
.
SetWeightEps
(
1e-6
);
...
@@ -88,20 +88,20 @@ void calc_disp(
...
@@ -88,20 +88,20 @@ void calc_disp(
std
::
ofstream
ofstr_raw
(
"weightsum_skx.dat"
);
std
::
ofstream
ofstr_raw
(
"weightsum_skx.dat"
);
std
::
ofstream
ofstr_raw_heli
(
"weightsum_heli.dat"
);
std
::
ofstream
ofstr_raw_heli
(
"weightsum_heli.dat"
);
// write file header
// write file header
for
(
std
::
ostream
*
ostr
:
{
&
ofstr_raw
,
&
ofstr_raw_heli
})
for
(
std
::
ostream
*
ostr
:
{
&
ofstr_raw
,
&
ofstr_raw_heli
})
{
{
ostr
->
precision
(
8
);
ostr
->
precision
(
8
);
(
*
ostr
)
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"# angle"
(
*
ostr
)
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"# angle"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"qh"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"qh"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"qk"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"qk"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"ql"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"ql"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"E"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"E"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"wSF1"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"wSF1"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"wSF2"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"wSF2"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"wNSF"
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
"wNSF"
<<
"
\n
"
;
<<
"
\n
"
;
}
}
for
(
t_real
angle
=
angle_begin
;
angle
<
angle_end
;
angle
+=
angle_delta
)
for
(
t_real
angle
=
angle_begin
;
angle
<
angle_end
;
angle
+=
angle_delta
)
...
@@ -119,15 +119,15 @@ void calc_disp(
...
@@ -119,15 +119,15 @@ void calc_disp(
histWeightsNSF
(
Es
[
i
],
hist
::
weight
(
wsNSF
[
i
]
*
0.5
));
histWeightsNSF
(
Es
[
i
],
hist
::
weight
(
wsNSF
[
i
]
*
0.5
));
histWeightsSF
(
Es
[
i
],
hist
::
weight
(
wsSF1
[
i
]));
histWeightsSF
(
Es
[
i
],
hist
::
weight
(
wsSF1
[
i
]));
ofstr_raw
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
angle
ofstr_raw
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
angle
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qx
-
Gx
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qx
-
Gx
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qy
-
Gy
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qy
-
Gy
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qz
-
Gz
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qz
-
Gz
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
Es
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
Es
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsSF1
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsSF1
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsSF2
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsSF2
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsNSF
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsNSF
[
i
]
<<
std
::
endl
;
<<
std
::
endl
;
}
}
}
}
...
@@ -138,15 +138,15 @@ void calc_disp(
...
@@ -138,15 +138,15 @@ void calc_disp(
histWeightsHeliNSF
(
EsH
[
i
],
hist
::
weight
(
wsNSFH
[
i
]
*
0.5
));
histWeightsHeliNSF
(
EsH
[
i
],
hist
::
weight
(
wsNSFH
[
i
]
*
0.5
));
histWeightsHeliSF
(
EsH
[
i
],
hist
::
weight
(
wsSF1H
[
i
]));
histWeightsHeliSF
(
EsH
[
i
],
hist
::
weight
(
wsSF1H
[
i
]));
ofstr_raw_heli
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
angle
ofstr_raw_heli
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
angle
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qx
-
Gx
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qx
-
Gx
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qy
-
Gy
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qy
-
Gy
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qz
-
Gz
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
(
Qz
-
Gz
)
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
EsH
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
EsH
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsSF1H
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsSF1H
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsSF2H
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsSF2H
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsNSFH
[
i
]
<<
" "
<<
std
::
left
<<
std
::
setw
(
COL_SIZE
)
<<
wsNSFH
[
i
]
<<
std
::
endl
;
<<
std
::
endl
;
}
}
}
}
}
}
...
@@ -215,7 +215,7 @@ void calc_disp(
...
@@ -215,7 +215,7 @@ void calc_disp(
int
main
()
int
main
()
{
{
// equivalent to the used setup around (000)
// equivalent to the used setup around (000)
t_real
Gx
=
1.
,
Gy
=
1.
,
Gz
=
0.
;
t_real
Gx
=
1.
,
Gy
=
1.
,
Gz
=
0.
;
t_real
Bx
=
0.
,
By
=
0.
,
Bz
=
1.
;
t_real
Bx
=
0.
,
By
=
0.
,
Bz
=
1.
;
t_real
q
=
0.0123
;
t_real
q
=
0.0123
;
...
...
Write
Preview
Markdown
is supported
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