13 #ifndef FFT_3D_PARALLEL3D_INCLUDED
14 #define FFT_3D_PARALLEL3D_INCLUDED
28 class FFT_3d_parallel3d :
public FFT
31 static const std::string class_name;
36 virtual ~FFT_3d_parallel3d();
40 void fft(
Field& field);
43 void set_parameters(
const std::string& direction);
54 bool need_create_plan(
const Field&);
56 void create_plan(
int site_dof);
59 void create_mpi_datatype(
int site_dof);
60 void release_mpi_datatype();
62 void create_fft_plan(
int site_dof);
63 void release_fft_plan();
66 std::vector<int> grid_rank_to_coord(
int r);
67 int find_global_index(
const std::vector<int>& coord);
84 std::vector<int> m_grid_size;
87 std::vector<int> m_lattice_size;
90 std::vector<int> m_local_size;
94 MPI_Datatype m_site_vector_type;
95 MPI_Datatype m_local_patch_type;
96 MPI_Datatype m_subarray_type;
98 std::vector<int> m_sendcounts;
99 std::vector<int> m_subarray_displs;
100 std::vector<int> m_local_patch_displs;
116 static FFT *create_object()
118 return new FFT_3d_parallel3d();
121 static FFT *create_object_with_params(
const Parameters& params)
123 return new FFT_3d_parallel3d(params);
127 static bool register_factory()
130 init &= FFT::Factory::Register(
"FFT_3d_parallel_3dim", create_object);
131 init &= FFT::Factory_params::Register(
"FFT_3d_parallel_3dim", create_object_with_params);