Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPC_Imaging
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Claudio Gheller
HPC_Imaging
Commits
15def884
Commit
15def884
authored
Mar 3, 2022
by
Nandhana Sakhtivel
Browse files
Options
Downloads
Patches
Plain Diff
Changes in parameters
parent
6de9bfb4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fourier_transform.c
+2
-2
2 additions, 2 deletions
fourier_transform.c
gridding.c
+12
-11
12 additions, 11 deletions
gridding.c
with
14 additions
and
13 deletions
fourier_transform.c
+
2
−
2
View file @
15def884
...
@@ -104,7 +104,7 @@ void write_fftw_data(){
...
@@ -104,7 +104,7 @@ void write_fftw_data(){
for
(
int
iv
=
0
;
iv
<
yaxis
;
iv
++
)
for
(
int
iv
=
0
;
iv
<
yaxis
;
iv
++
)
for
(
int
iu
=
0
;
iu
<
xaxis
;
iu
++
)
for
(
int
iu
=
0
;
iu
<
xaxis
;
iu
++
)
{
{
long
global_index
=
(
iu
+
(
iv
+
isector
*
yaxis
)
*
xaxis
+
iw
*
grid_size_x
*
grid_size_y
)
*
sizeof
(
double
);
long
global_index
=
(
iu
+
(
iv
+
isector
*
yaxis
)
*
xaxis
+
iw
*
param
.
grid_size_x
*
param
.
grid_size_y
)
*
sizeof
(
double
);
long
index
=
iu
+
iv
*
xaxis
+
iw
*
xaxis
*
yaxis
;
long
index
=
iu
+
iv
*
xaxis
+
iw
*
xaxis
*
yaxis
;
fseek
(
file
.
pFilereal
,
global_index
,
SEEK_SET
);
fseek
(
file
.
pFilereal
,
global_index
,
SEEK_SET
);
fwrite
(
&
gridss_real
[
index
],
1
,
sizeof
(
double
),
file
.
pFilereal
);
fwrite
(
&
gridss_real
[
index
],
1
,
sizeof
(
double
),
file
.
pFilereal
);
...
@@ -113,7 +113,7 @@ void write_fftw_data(){
...
@@ -113,7 +113,7 @@ void write_fftw_data(){
for
(
int
iv
=
0
;
iv
<
yaxis
;
iv
++
)
for
(
int
iv
=
0
;
iv
<
yaxis
;
iv
++
)
for
(
int
iu
=
0
;
iu
<
xaxis
;
iu
++
)
for
(
int
iu
=
0
;
iu
<
xaxis
;
iu
++
)
{
{
long
global_index
=
(
iu
+
(
iv
+
isector
*
yaxis
)
*
xaxis
+
iw
*
grid_size_x
*
grid_size_y
)
*
sizeof
(
double
);
long
global_index
=
(
iu
+
(
iv
+
isector
*
yaxis
)
*
xaxis
+
iw
*
param
.
grid_size_x
*
param
.
grid_size_y
)
*
sizeof
(
double
);
long
index
=
iu
+
iv
*
xaxis
+
iw
*
xaxis
*
yaxis
;
long
index
=
iu
+
iv
*
xaxis
+
iw
*
xaxis
*
yaxis
;
fseek
(
file
.
pFileimg
,
global_index
,
SEEK_SET
);
fseek
(
file
.
pFileimg
,
global_index
,
SEEK_SET
);
fwrite
(
&
gridss_img
[
index
],
1
,
sizeof
(
double
),
file
.
pFileimg
);
fwrite
(
&
gridss_img
[
index
],
1
,
sizeof
(
double
),
file
.
pFileimg
);
...
...
This diff is collapsed.
Click to expand it.
gridding.c
+
12
−
11
View file @
15def884
...
@@ -333,22 +333,22 @@ void write_grided_data()
...
@@ -333,22 +333,22 @@ void write_grided_data()
gridss_real
[
i
]
=
gridss
[
2
*
i
];
gridss_real
[
i
]
=
gridss
[
2
*
i
];
gridss_img
[
i
]
=
gridss
[
2
*
i
+
1
];
gridss_img
[
i
]
=
gridss
[
2
*
i
+
1
];
}
}
if
(
num_w_planes
>
1
)
if
(
param
.
num_w_planes
>
1
)
{
{
for
(
int
iw
=
0
;
iw
<
num_w_planes
;
iw
++
)
for
(
int
iw
=
0
;
iw
<
param
.
num_w_planes
;
iw
++
)
for
(
int
iv
=
0
;
iv
<
yaxis
;
iv
++
)
for
(
int
iv
=
0
;
iv
<
yaxis
;
iv
++
)
for
(
int
iu
=
0
;
iu
<
xaxis
;
iu
++
)
for
(
int
iu
=
0
;
iu
<
xaxis
;
iu
++
)
{
{
long
global_index
=
(
iu
+
(
iv
+
isector
*
yaxis
)
*
xaxis
+
iw
*
grid_size_x
*
grid_size_y
)
*
sizeof
(
double
);
long
global_index
=
(
iu
+
(
iv
+
isector
*
yaxis
)
*
xaxis
+
iw
*
param
.
grid_size_x
*
param
.
grid_size_y
)
*
sizeof
(
double
);
long
index
=
iu
+
iv
*
xaxis
+
iw
*
xaxis
*
yaxis
;
long
index
=
iu
+
iv
*
xaxis
+
iw
*
xaxis
*
yaxis
;
fseek
(
file
.
pFilereal
,
global_index
,
SEEK_SET
);
fseek
(
file
.
pFilereal
,
global_index
,
SEEK_SET
);
fwrite
(
&
gridss_real
[
index
],
1
,
sizeof
(
double
),
file
.
pFilereal
);
fwrite
(
&
gridss_real
[
index
],
1
,
sizeof
(
double
),
file
.
pFilereal
);
}
}
for
(
int
iw
=
0
;
iw
<
num_w_planes
;
iw
++
)
for
(
int
iw
=
0
;
iw
<
param
.
num_w_planes
;
iw
++
)
for
(
int
iv
=
0
;
iv
<
yaxis
;
iv
++
)
for
(
int
iv
=
0
;
iv
<
yaxis
;
iv
++
)
for
(
int
iu
=
0
;
iu
<
xaxis
;
iu
++
)
for
(
int
iu
=
0
;
iu
<
xaxis
;
iu
++
)
{
{
long
global_index
=
(
iu
+
(
iv
+
isector
*
yaxis
)
*
xaxis
+
iw
*
grid_size_x
*
grid_size_y
)
*
sizeof
(
double
);
long
global_index
=
(
iu
+
(
iv
+
isector
*
yaxis
)
*
xaxis
+
iw
*
param
.
grid_size_x
*
param
.
grid_size_y
)
*
sizeof
(
double
);
long
index
=
iu
+
iv
*
xaxis
+
iw
*
xaxis
*
yaxis
;
long
index
=
iu
+
iv
*
xaxis
+
iw
*
xaxis
*
yaxis
;
fseek
(
file
.
pFileimg
,
global_index
,
SEEK_SET
);
fseek
(
file
.
pFileimg
,
global_index
,
SEEK_SET
);
fwrite
(
&
gridss_img
[
index
],
1
,
sizeof
(
double
),
file
.
pFileimg
);
fwrite
(
&
gridss_img
[
index
],
1
,
sizeof
(
double
),
file
.
pFileimg
);
...
@@ -359,9 +359,9 @@ void write_grided_data()
...
@@ -359,9 +359,9 @@ void write_grided_data()
}
}
else
else
{
{
for
(
int
iw
=
0
;
iw
<
num_w_planes
;
iw
++
)
for
(
int
iw
=
0
;
iw
<
param
.
num_w_planes
;
iw
++
)
{
{
long
global_index
=
(
xaxis
*
isector
*
yaxis
+
iw
*
grid_size_x
*
grid_size_y
)
*
sizeof
(
double
);
long
global_index
=
(
xaxis
*
isector
*
yaxis
+
iw
*
param
.
grid_size_x
*
param
.
grid_size_y
)
*
sizeof
(
double
);
long
index
=
iw
*
xaxis
*
yaxis
;
long
index
=
iw
*
xaxis
*
yaxis
;
fseek
(
file
.
pFilereal
,
global_index
,
SEEK_SET
);
fseek
(
file
.
pFilereal
,
global_index
,
SEEK_SET
);
fwrite
(
&
gridss_real
[
index
],
xaxis
*
yaxis
,
sizeof
(
double
),
file
.
pFilereal
);
fwrite
(
&
gridss_real
[
index
],
xaxis
*
yaxis
,
sizeof
(
double
),
file
.
pFilereal
);
...
@@ -371,11 +371,11 @@ void write_grided_data()
...
@@ -371,11 +371,11 @@ void write_grided_data()
}
}
}
}
#else
#else
for
(
int
iw
=
0
;
iw
<
num_w_planes
;
iw
++
)
for
(
int
iw
=
0
;
iw
<
param
.
num_w_planes
;
iw
++
)
for
(
int
iv
=
0
;
iv
<
grid_size_y
;
iv
++
)
for
(
int
iv
=
0
;
iv
<
param
.
grid_size_y
;
iv
++
)
for
(
int
iu
=
0
;
iu
<
grid_size_x
;
iu
++
)
for
(
int
iu
=
0
;
iu
<
param
.
grid_size_x
;
iu
++
)
{
{
long
index
=
2
*
(
iu
+
iv
*
grid_size_x
+
iw
*
grid_size_x
*
grid_size_y
);
long
index
=
2
*
(
iu
+
iv
*
param
.
grid_size_x
+
iw
*
param
.
grid_size_x
*
param
.
grid_size_y
);
fwrite
(
&
gridtot
[
index
],
1
,
sizeof
(
double
),
file
.
pFilereal
);
fwrite
(
&
gridtot
[
index
],
1
,
sizeof
(
double
),
file
.
pFilereal
);
fwrite
(
&
gridtot
[
index
+
1
],
1
,
sizeof
(
double
),
file
.
pFileimg
);
fwrite
(
&
gridtot
[
index
+
1
],
1
,
sizeof
(
double
),
file
.
pFileimg
);
//double v_norm = sqrt(gridtot[index]*gridtot[index]+gridtot[index+1]*gridtot[index+1]);
//double v_norm = sqrt(gridtot[index]*gridtot[index]+gridtot[index+1]*gridtot[index+1]);
...
@@ -389,6 +389,7 @@ void write_grided_data()
...
@@ -389,6 +389,7 @@ void write_grided_data()
#ifdef USE_MPI
#ifdef USE_MPI
MPI_Win_fence
(
0
,
slabwin
);
MPI_Win_fence
(
0
,
slabwin
);
#endif
#endif
#endif //WRITE_DATA
#endif //WRITE_DATA
}
}
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