Bridge++  Version 1.4.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fft.h
Go to the documentation of this file.
1 
14 #ifndef FFT_INCLUDED
15 #define FFT_INCLUDED
16 
17 #ifdef USE_FFTWLIB
18 
19 #ifdef USE_MPI
20 #include <fftw3-mpi.h>
21 #ifdef USE_BGNET
23 #else
25 #endif
26 #else
27 #include <fftw3.h>
28 #endif
29 
30 #ifdef USE_OPENMP
32 #endif
33 
34 #include "Field/field.h"
35 #include "Field/index_lex.h"
36 #include "Parameters/parameters.h"
37 
38 #include "IO/bridgeIO.h"
39 using Bridge::vout;
40 
41 #ifdef USE_FACTORY
42 #include "factory.h"
43 #endif
44 
45 
47 
53 class FFT
54 {
55  public:
56  FFT() {}
57 
58  virtual ~FFT() {}
59 
60  private:
61  // non-copyable
62  FFT(const FFT&);
63  FFT& operator=(const FFT&);
64 
65  public:
66  virtual void fft(Field& field) = 0; // field is overwritten
67  virtual void fft(Field& field_out, const Field& field_in) = 0;
68 
69  virtual void set_parameters(const Parameters&) = 0;
70  virtual void set_parameters(const std::string str_fft_direction) = 0;
71  virtual void set_parameter_verboselevel(const Bridge::VerboseLevel vl) = 0;
72 
73 #ifdef USE_FACTORY
74  public:
75  typedef FFT *(*ProductCreator)();
77 
78  static FFT *New(const IdentifierType& subtype)
79  {
80  ProductCreator p = Factory::Find(subtype);
81 
82  return p ? (*p)() : 0;
83  }
84 #endif
85 };
86 //- #endif of #ifdef USE_FFTWLIB
87 #endif
88 #endif
BridgeIO vout
Definition: bridgeIO.cpp:495
Container of Field-type object.
Definition: field.h:39
Class for parameters.
Definition: parameters.h:46
Bridge::VerboseLevel vl
Definition: checker.cpp:18
VerboseLevel
Definition: bridgeIO.h:42
std::string IdentifierType
Factory template class.
Definition: factory.h:33