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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
1e182f64
Commit
1e182f64
authored
2 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Use the revised TFRFME class interface in calculations
parent
64b58343
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/trapping/cfrfme.cpp
+17
-18
17 additions, 18 deletions
src/trapping/cfrfme.cpp
src/trapping/clffft.cpp
+15
-17
15 additions, 17 deletions
src/trapping/clffft.cpp
with
32 additions
and
35 deletions
src/trapping/cfrfme.cpp
+
17
−
18
View file @
1e182f64
...
...
@@ -110,20 +110,20 @@ void frfme(string data_file, string output_path) {
int
nxv
,
nyv
,
nzv
;
if
(
tfrfme
==
NULL
)
tfrfme
=
TFRFME
::
from_binary
(
tfrfme_name
,
"HDF5"
);
if
(
tfrfme
!=
NULL
)
{
lmode
=
(
int
)
tfrfme
->
get_param
(
"
lmode
"
)
;
lm
=
(
int
)
tfrfme
->
get_param
(
"lm"
)
;
nkv
=
(
int
)
tfrfme
->
get_param
(
"
nkv
"
)
;
nxv
=
(
int
)
tfrfme
->
get_param
(
"
nxv
"
)
;
nyv
=
(
int
)
tfrfme
->
get_param
(
"
nyv
"
)
;
nzv
=
(
int
)
tfrfme
->
get_param
(
"
nzv
"
)
;
vk
=
tfrfme
->
get_param
(
"vk"
)
;
exri
=
tfrfme
->
get_param
(
"
exri
"
)
;
an
=
tfrfme
->
get_param
(
"an"
)
;
ff
=
tfrfme
->
get_param
(
"ff"
)
;
tra
=
tfrfme
->
get_param
(
"
tra
"
)
;
spd
=
tfrfme
->
get_param
(
"
spd
"
)
;
frsh
=
tfrfme
->
get_param
(
"
frsh
"
)
;
exril
=
tfrfme
->
get_param
(
"
exril
"
)
;
lmode
=
tfrfme
->
lmode
;
lm
=
tfrfme
->
lm
;
nkv
=
tfrfme
->
nkv
;
nxv
=
tfrfme
->
nxv
;
nyv
=
tfrfme
->
nyv
;
nzv
=
tfrfme
->
nzv
;
vk
=
tfrfme
->
vk
;
exri
=
tfrfme
->
exri
;
an
=
tfrfme
->
an
;
ff
=
tfrfme
->
ff
;
tra
=
tfrfme
->
tra
;
spd
=
tfrfme
->
spd
;
frsh
=
tfrfme
->
frsh
;
exril
=
tfrfme
->
exril
;
string
tempname2
=
output_path
+
"/c_TEMPTAPE2.hd5"
;
if
(
tt2
==
NULL
)
tt2
=
Swap2
::
from_binary
(
tempname2
,
"HDF5"
);
if
(
tt2
!=
NULL
)
{
...
...
@@ -299,7 +299,7 @@ void frfme(string data_file, string output_path) {
int
nzs
=
nzsh
*
2
;
int
nzv
=
nzs
+
1
;
int
nzshpo
=
nzsh
+
1
;
tfrfme_size
=
TFRFME
::
get_
memory_requirement
(
lmode
,
lm
,
nkv
,
nxv
,
nyv
,
nzv
);
tfrfme_size
=
TFRFME
::
get_
size
(
lm
,
nkv
,
nxv
,
nyv
,
nzv
);
size_mb
=
1.0
*
tfrfme_size
/
1024.0
/
1024.0
;
printf
(
"TFRFME: %.2lg MB
\n
"
,
size_mb
);
size_mb
=
1.0
*
(
swap1_size
+
swap2_size
+
tfrfme_size
)
/
1024.0
/
1024.0
;
...
...
@@ -308,7 +308,6 @@ void frfme(string data_file, string output_path) {
double
*
_xv
=
tfrfme
->
get_x
();
double
*
_yv
=
tfrfme
->
get_y
();
double
*
_zv
=
tfrfme
->
get_z
();
dcomplex
**
_wsum
=
tfrfme
->
get_matrix
();
#ifdef USE_NVTX
nvtxRangePop
();
#endif
...
...
@@ -391,7 +390,7 @@ void frfme(string data_file, string output_path) {
}
// jx50
}
// jy50 loop
int
ixyz
=
0
;
for
(
int
wj
=
0
;
wj
<
nrvc
;
wj
++
)
_
wsum
[
j80
-
1
][
wj
]
=
cc0
;
for
(
int
wj
=
0
;
wj
<
nrvc
;
wj
++
)
tfrfme
->
wsum
[
j80
-
1
][
wj
]
=
cc0
;
for
(
int
iz75
=
0
;
iz75
<
nzv
;
iz75
++
)
{
double
z
=
_zv
[
iz75
]
+
frsh
;
for
(
int
iy70
=
0
;
iy70
<
nyv
;
iy70
++
)
{
...
...
@@ -417,7 +416,7 @@ void frfme(string data_file, string output_path) {
if
(
jy60
==
0
||
jy60
==
nkv
-
1
)
sumx
*=
0.5
;
sumy
+=
sumx
;
}
// jy60 loop
_
wsum
[
j80
-
1
][
ixyz
-
1
]
=
sumy
*
delks
;
tfrfme
->
wsum
[
j80
-
1
][
ixyz
-
1
]
=
sumy
*
delks
;
}
// ix65 loop
}
// iy70 loop
}
// iz75 loop
...
...
This diff is collapsed.
Click to expand it.
src/trapping/clffft.cpp
+
15
−
17
View file @
1e182f64
...
...
@@ -82,7 +82,6 @@ void lffft(string data_file, string output_path) {
dcomplex
**
amd
=
NULL
;
int
**
indam
=
NULL
;
dcomplex
*
tmsm
=
NULL
,
*
tmse
=
NULL
,
**
tms
=
NULL
;
dcomplex
**
_wsum
=
NULL
;
int
jft
,
jss
,
jtw
;
int
is
,
le
,
nvam
=
0
;
double
vks
,
exris
;
...
...
@@ -188,26 +187,25 @@ void lffft(string data_file, string output_path) {
int
lmode
,
lm
,
nkv
,
nxv
,
nyv
,
nzv
;
double
vk
,
exri
,
an
,
ff
,
tra
;
double
spd
,
frsh
,
exril
;
lmode
=
(
int
)
tfrfme
->
get_param
(
"lmode"
);
lm
=
(
int
)
tfrfme
->
get_param
(
"lm"
);
nkv
=
(
int
)
tfrfme
->
get_param
(
"nkv"
);
nxv
=
(
int
)
tfrfme
->
get_param
(
"nxv"
);
nyv
=
(
int
)
tfrfme
->
get_param
(
"nyv"
);
nzv
=
(
int
)
tfrfme
->
get_param
(
"nzv"
);
_wsum
=
tfrfme
->
get_matrix
();
lmode
=
tfrfme
->
lmode
;
lm
=
tfrfme
->
lm
;
nkv
=
tfrfme
->
nkv
;
nxv
=
tfrfme
->
nxv
;
nyv
=
tfrfme
->
nyv
;
nzv
=
tfrfme
->
nzv
;
double
*
_xv
=
tfrfme
->
get_x
();
double
*
_yv
=
tfrfme
->
get_y
();
double
*
_zv
=
tfrfme
->
get_z
();
if
(
lm
>=
le
)
{
vk
=
tfrfme
->
get_param
(
"vk"
)
;
exri
=
tfrfme
->
get_param
(
"
exri
"
)
;
an
=
tfrfme
->
get_param
(
"an"
)
;
ff
=
tfrfme
->
get_param
(
"ff"
)
;
tra
=
tfrfme
->
get_param
(
"
tra
"
)
;
vk
=
tfrfme
->
vk
;
exri
=
tfrfme
->
exri
;
an
=
tfrfme
->
an
;
ff
=
tfrfme
->
ff
;
tra
=
tfrfme
->
tra
;
if
(
vk
==
vks
&&
exri
==
exris
)
{
spd
=
tfrfme
->
get_param
(
"
spd
"
)
;
frsh
=
tfrfme
->
get_param
(
"
frsh
"
)
;
exril
=
tfrfme
->
get_param
(
"
exril
"
)
;
spd
=
tfrfme
->
spd
;
frsh
=
tfrfme
->
frsh
;
exril
=
tfrfme
->
exril
;
bool
goto160
=
false
;
if
(
jft
<=
0
)
{
zpv
=
new
double
***
[
le
];
...
...
@@ -316,7 +314,7 @@ void lffft(string data_file, string output_path) {
//binary_input.read(reinterpret_cast<char *>(&vimag), sizeof(double));
int
row
=
i
;
int
col
=
(
nyv
*
nxv
*
iz475
)
+
(
nxv
*
iy475
)
+
ix475
;
dcomplex
value
=
_
wsum
[
row
][
col
];
dcomplex
value
=
tfrfme
->
wsum
[
row
][
col
];
if
(
lm
<=
le
)
{
ws
[
i
]
=
value
;
}
else
{
// label 170
...
...
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