Bridge++
Version 1.6.1
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
fft_3d.h
Go to the documentation of this file.
1
13
#ifndef FFT_3D_INCLUDED
14
#define FFT_3D_INCLUDED
15
16
#ifdef USE_FFTWLIB
17
18
// implementations
19
#include "
fft.h
"
20
#include "
fft_3d_local.h
"
21
#ifdef USE_MPI
22
#include "
fft_3d_parallel1d.h
"
23
#include "
fft_3d_parallel3d.h
"
24
#endif
25
26
#include "
Communicator/communicator.h
"
27
28
#include "
IO/bridgeIO.h
"
29
using
Bridge::vout
;
30
31
#ifdef USE_FACTORY
32
#include "
factory.h
"
33
#endif
34
35
37
46
class
FFT_3d
47
{
48
#ifdef USE_FACTORY
49
private
:
50
static
FFT *create_object()
51
{
52
// auto-select
53
54
int
npe_x =
Communicator::npe
(0);
55
int
npe_y =
Communicator::npe
(1);
56
int
npe_z =
Communicator::npe
(2);
57
int
npe_t =
Communicator::npe
(3);
58
59
if
((npe_x == 1) && (npe_y == 1) && (npe_z == 1)) {
60
// no parallelization in xyz-directions
61
return
new
FFT_3d_local;
62
63
#ifdef USE_MPI
64
}
else
if
((npe_x == 1) && (npe_y == 1)) {
65
// parallelization only in z-direction
66
return
new
FFT_3d_parallel1d;
67
}
else
{
68
// most general case
69
return
new
FFT_3d_parallel3d;
70
#endif
71
}
72
73
// default
74
return
NULL;
75
}
76
77
public
:
78
static
bool
register_factory()
79
{
80
return
FFT::Factory::Register(
"auto"
, create_object);
81
}
82
#endif
83
};
84
85
//- #endif of #ifdef USE_FFTWLIB
86
#endif
87
#endif
Bridge::vout
BridgeIO vout
Definition:
bridgeIO.cpp:503
fft_3d_parallel1d.h
Communicator::npe
static int npe(const int dir)
logical grid extent
Definition:
communicator.cpp:112
fft_3d_parallel3d.h
factory.h
bridgeIO.h
fft.h
fft_3d_local.h
communicator.h
src
lib
Tools
fft_3d.h
Generated on Tue Jun 15 2021 10:54:35 for Bridge++ by
1.8.6