Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plumed AlphaFold
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Martin Kurečka
Plumed AlphaFold
Commits
cfefc554
There was an error fetching the commit references. Please try again later.
Commit
cfefc554
authored
Oct 10, 2019
by
Gareth Tribello
Committed by
carlocamilloni
Oct 10, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Fixes to size of grid used by fourier transform object
parent
71483b76
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
regtest/analysis/rt-fftw/f.grid.reference
+10201
-10201
10201 additions, 10201 deletions
regtest/analysis/rt-fftw/f.grid.reference
src/gridtools/FourierTransform.cpp
+9
-15
9 additions, 15 deletions
src/gridtools/FourierTransform.cpp
with
10210 additions
and
10216 deletions
regtest/analysis/rt-fftw/f.grid.reference
+
10201
−
10201
View file @
cfefc554
This diff is collapsed.
Click to expand it.
src/gridtools/FourierTransform.cpp
+
9
−
15
View file @
cfefc554
...
@@ -70,7 +70,6 @@ class FourierTransform : public ActionWithInputGrid {
...
@@ -70,7 +70,6 @@ class FourierTransform : public ActionWithInputGrid {
private:
private:
std
::
string
output_type
;
std
::
string
output_type
;
bool
real_output
,
store_norm
;
bool
real_output
,
store_norm
;
std
::
vector
<
unsigned
>
gdirs
;
std
::
vector
<
int
>
fourier_params
;
std
::
vector
<
int
>
fourier_params
;
public:
public:
static
void
registerKeywords
(
Keywords
&
keys
);
static
void
registerKeywords
(
Keywords
&
keys
);
...
@@ -139,27 +138,20 @@ FourierTransform::FourierTransform(const ActionOptions&ao):
...
@@ -139,27 +138,20 @@ FourierTransform::FourierTransform(const ActionOptions&ao):
// Create the input from the old string
// Create the input from the old string
std
::
string
vstring
;
std
::
string
vstring
;
unsigned
n
=
0
;
gdirs
.
resize
(
ingrid
->
getDimension
()
);
for
(
unsigned
i
=
0
;
i
<
ingrid
->
getDimension
();
++
i
)
{
gdirs
[
n
]
=
i
;
n
++
;
}
plumed_assert
(
n
==
ingrid
->
getDimension
()
);
if
(
real_output
)
{
if
(
real_output
)
{
if
(
!
store_norm
)
vstring
=
"COMPONENTS="
+
getLabel
()
+
"_abs"
;
if
(
!
store_norm
)
vstring
=
"COMPONENTS="
+
getLabel
()
+
"_abs"
;
else
vstring
=
"COMPONENTS="
+
getLabel
()
+
"_norm"
;
else
vstring
=
"COMPONENTS="
+
getLabel
()
+
"_norm"
;
}
else
vstring
=
"COMPONENTS="
+
getLabel
()
+
"_real,"
+
getLabel
()
+
"_imag"
;
}
else
vstring
=
"COMPONENTS="
+
getLabel
()
+
"_real,"
+
getLabel
()
+
"_imag"
;
// Set COORDINATES keyword
// Set COORDINATES keyword
vstring
+=
" COORDINATES="
+
ingrid
->
getComponentName
(
gdirs
[
0
]
);
vstring
+=
" COORDINATES="
+
ingrid
->
getComponentName
(
0
);
for
(
unsigned
i
=
1
;
i
<
gdirs
.
size
();
++
i
)
vstring
+=
","
+
ingrid
->
getComponentName
(
gdirs
[
i
]
);
for
(
unsigned
i
=
1
;
i
<
ingrid
->
getDimension
();
++
i
)
vstring
+=
","
+
ingrid
->
getComponentName
(
i
);
// Set PBC keyword
// Set PBC keyword
vstring
+=
" PBC="
;
vstring
+=
" PBC="
;
if
(
ingrid
->
isPeriodic
(
gdirs
[
0
]
)
)
vstring
+=
"T"
;
else
vstring
+=
"F"
;
if
(
ingrid
->
isPeriodic
(
0
)
)
vstring
+=
"T"
;
else
vstring
+=
"F"
;
for
(
unsigned
i
=
1
;
i
<
gdirs
.
size
();
++
i
)
{
for
(
unsigned
i
=
1
;
i
<
ingrid
->
getDimension
();
++
i
)
{
if
(
ingrid
->
isPeriodic
(
gdirs
[
i
]
)
)
vstring
+=
",T"
;
else
vstring
+=
",F"
;
if
(
ingrid
->
isPeriodic
(
i
)
)
vstring
+=
",T"
;
else
vstring
+=
",F"
;
}
}
...
@@ -197,8 +189,10 @@ void FourierTransform::performOperations( const bool& from_update ) {
...
@@ -197,8 +189,10 @@ void FourierTransform::performOperations( const bool& from_update ) {
// <<" max_x: "<<ft_max[0]<<" max_y: "<<ft_max[1]<<"\n";
// <<" max_x: "<<ft_max[0]<<" max_y: "<<ft_max[1]<<"\n";
// Get the size of the input data arrays (to allocate FFT data)
// Get the size of the input data arrays (to allocate FFT data)
size_t
fft_dimension
=
static_cast
<
size_t
>
(
ingrid
->
getNumberOfPoints
()
);
std
::
vector
<
unsigned
>
N_input_data
(
ingrid
->
getNbin
()
);
std
::
vector
<
unsigned
>
N_input_data
(
ingrid
->
getNbin
()
);
size_t
fft_dimension
=
1
;
for
(
unsigned
i
=
0
;
i
<
N_input_data
.
size
();
++
i
)
fft_dimension
*=
static_cast
<
size_t
>
(
N_input_data
[
i
]
);
for
(
unsigned
i
=
0
;
i
<
N_input_data
.
size
();
++
i
)
if
(
!
ingrid
->
isPeriodic
(
i
)
)
N_input_data
[
i
]
++
;
// size_t fft_dimension=1; for(unsigned i=0; i<N_input_data.size(); ++i) fft_dimension*=static_cast<size_t>( N_input_data[i] );
// FFT arrays
// FFT arrays
std
::
vector
<
std
::
complex
<
double
>
>
input_data
(
fft_dimension
),
fft_data
(
fft_dimension
);
std
::
vector
<
std
::
complex
<
double
>
>
input_data
(
fft_dimension
),
fft_data
(
fft_dimension
);
...
...
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
sign in
to comment