Bridge++  Ver. 1.3.x
fft_xyz_3dim.h
Go to the documentation of this file.
1 
14 #ifndef FFT_XYZ_3DIM_INCLUDED
15 #define FFT_XYZ_3DIM_INCLUDED
16 
17 #ifdef USE_FFTWLIB
18 
19 #ifdef USE_MPI
20 #include "fftw3-mpi.h"
21 #ifdef USE_BGNET
22 #include "communicator_bgnet.h"
23 #else
24 #include "communicator_mpi.h"
25 #endif
26 #else
27 #include "fftw3.h"
28 #endif
29 
30 #ifdef USE_OPENMP
31 #include "threadManager_OpenMP.h"
32 #endif
33 
34 #include "field.h"
35 #include "index_lex.h"
36 
37 #include "bridgeIO.h"
38 using Bridge::vout;
39 
41 
49 class FFT_xyz_3dim
50 {
51  public:
52  static const std::string class_name;
53 
54  protected:
56 
57  public:
58  FFT_xyz_3dim()
59  : m_vl(CommonParameters::Vlevel())
60  {
61  init();
62  }
63 
64  ~FFT_xyz_3dim()
65  {
66  tidy_up();
67  }
68 
69  private:
70  // non-copyable
71  FFT_xyz_3dim(const FFT_xyz_3dim&);
72  FFT_xyz_3dim& operator=(const FFT_xyz_3dim&);
73 
74  public:
75  void FFT(Field& field, const bool is_forward); // field is overwritten
76  void FFT(Field& field_out, const Field& field_in, const bool is_forward);
77 
78  private:
79  Index_lex m_index;
80 
81  fftw_complex *m_in;
82  fftw_complex *m_out;
83 
84  fftw_plan m_plan;
85 
86 #ifdef USE_MPI
87  ptrdiff_t m_Nz_p, m_z_start_p;
88 #endif
89 
90  void init();
91  void tidy_up();
92 };
93 //- #endif of #ifdef USE_FFTWLIB
94 #endif
95 #endif
BridgeIO vout
Definition: bridgeIO.cpp:278
Container of Field-type object.
Definition: field.h:39
Common parameter class: provides parameters as singleton.
Lexical site index.
Definition: index_lex.h:34
VerboseLevel
Definition: bridgeIO.h:39