Bridge++
Ver. 2.0.3
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
d
e
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
d
t
v
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
r
s
t
v
w
y
Typedefs
a
b
c
d
e
i
k
l
m
o
p
r
s
t
u
v
Enumerations
Enumerator
c
e
f
g
i
l
m
n
p
r
s
u
v
z
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
f
g
h
i
l
m
n
o
r
s
t
u
y
Variables
Typedefs
a
c
e
f
i
m
o
r
s
t
u
Enumerations
Enumerator
Macros
_
a
b
c
d
e
i
l
n
r
t
u
v
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
fft_3d_parallel1d.h
Go to the documentation of this file.
1
13
#ifndef FFT_3D_PARALLEL1D_INCLUDED
14
#define FFT_3D_PARALLEL1D_INCLUDED
15
16
// requires FFTW library
17
#ifdef USE_FFTWLIB
18
19
// requires MPI
20
#ifdef USE_MPI
21
22
#include <fftw3-mpi.h>
23
24
#include "
fft.h
"
25
#include "
Communicator/MPI/communicator_mpi.h
"
26
27
class
FFT_3d_parallel1d :
public
FFT
28
{
29
public
:
30
static
const
std::string class_name;
31
32
public
:
33
FFT_3d_parallel1d();
34
FFT_3d_parallel1d(
const
Parameters
& params);
35
virtual
~FFT_3d_parallel1d();
36
37
void
fft(
Field
& dst,
const
Field
& src,
enum
Direction
dir);
38
void
fft(
Field
& dst,
const
Field
& src);
39
void
fft(
Field
& field);
40
41
void
set_parameters(
const
Parameters
& params);
42
void
set_parameters(
const
std::string& direction);
43
44
void
get_parameters(
Parameters
& params)
const
;
45
46
private
:
47
48
void
initialize();
49
void
finalize();
50
51
bool
check_ok();
52
53
void
initialize_plan(
const
Field
& src);
54
void
clear_plan();
55
56
Bridge::VerboseLevel
m_vl;
57
58
// size info
59
int
m_ndim;
60
ptrdiff_t m_nsize[4];
// assume atmost 4dimensional
61
ptrdiff_t m_vol;
62
ptrdiff_t m_nv;
// number of complex elements
63
64
fftw_complex *m_buf_in;
65
fftw_complex *m_buf_out;
66
fftw_plan m_plan_fw;
67
fftw_plan m_plan_bw;
68
69
MPI_Comm m_comm;
70
71
Direction
m_direction;
72
73
74
#ifdef USE_FACTORY
75
private
:
76
static
FFT *create_object()
77
{
78
return
new
FFT_3d_parallel1d();
79
}
80
81
static
FFT *create_object_with_params(
const
Parameters
& params)
82
{
83
return
new
FFT_3d_parallel1d(params);
84
}
85
86
public
:
87
static
bool
register_factory()
88
{
89
bool
init =
true
;
90
init &= FFT::Factory::Register(
"FFT_3d_parallel_1dim"
, create_object);
91
init &= FFT::Factory_params::Register(
"FFT_3d_parallel_1dim"
, create_object_with_params);
92
return
init;
93
}
94
#endif
95
};
96
97
#endif
/* USE_MPI */
98
#endif
/* USE_FFTWLIB */
99
100
#endif
/* FFT_3D_PARALLEL1D_INCLUDED */
Parameters
Class for parameters.
Definition:
parameters.h:46
Direction
Direction
Definition:
bridge_defs.h:24
communicator_mpi.h
fft.h
Field
Container of Field-type object.
Definition:
field.h:46
Bridge::VerboseLevel
VerboseLevel
Definition:
bridgeIO.h:42
src
lib
Tools
fft_3d_parallel1d.h
Generated on Wed Mar 19 2025 11:03:47 for Bridge++ by
1.8.17