Bridge++
Version 1.5.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
fft_3d_parallel1d.h
Go to the documentation of this file.
1
14
#ifndef FFT_3D_PARALLEL1D_INCLUDED
15
#define FFT_3D_PARALLEL1D_INCLUDED
16
17
// requires FFTW library
18
#ifdef USE_FFTWLIB
19
20
// requires MPI
21
#ifdef USE_MPI
22
23
#include <fftw3-mpi.h>
24
25
#include "
fft.h
"
26
#include "
Communicator/MPI/communicator_mpi.h
"
27
28
class
FFT_3d_parallel1d :
public
FFT
29
{
30
public
:
31
static
const
std::string class_name;
32
33
public
:
34
FFT_3d_parallel1d();
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
private
:
45
46
void
initialize();
47
void
finalize();
48
49
bool
check_ok();
50
51
void
initialize_plan(
const
Field
& src);
52
void
clear_plan();
53
54
// size info
55
int
m_ndim;
56
ptrdiff_t m_nsize[4];
// assume atmost 4dimensional
57
ptrdiff_t m_vol;
58
ptrdiff_t m_nv;
// number of complex elements
59
60
fftw_complex *m_buf_in;
61
fftw_complex *m_buf_out;
62
fftw_plan m_plan_fw;
63
fftw_plan m_plan_bw;
64
65
MPI_Comm m_comm;
66
67
Direction
m_direction;
68
69
70
#ifdef USE_FACTORY
71
private
:
72
static
FFT *create_object()
73
{
74
return
new
FFT_3d_parallel1d();
75
}
76
77
public
:
78
static
bool
register_factory()
79
{
80
return
FFT::Factory::Register(
"FFT_3d_parallel_1dim"
, create_object);
81
}
82
#endif
83
};
84
85
#endif
/* USE_MPI */
86
#endif
/* USE_FFTWLIB */
87
88
#endif
/* FFT_3D_PARALLEL1D_INCLUDED */
communicator_mpi.h
Field
Container of Field-type object.
Definition:
field.h:45
Parameters
Class for parameters.
Definition:
parameters.h:46
Direction
Direction
Definition:
bridge_defs.h:24
fft.h
src
lib
Tools
fft_3d_parallel1d.h
Generated on Thu Mar 19 2020 10:28:24 for Bridge++ by
1.8.6