21 const std::vector<Complex>& coefficients_g_space,
22 const std::vector<int>& g_vector_indices,
23 int number_of_plane_waves,
24 std::vector<Complex>& coefficients_real_space) {
27 coefficients_real_space.assign(
31 const auto& g_vectors = g_vectors_grid.
g_vectors();
32 for (
int plane_wave_index = 0; plane_wave_index < number_of_plane_waves;
34 const auto& g_vector_entry = g_vectors[g_vector_indices[plane_wave_index]];
36 g_vector_entry.miller.x, g_vector_entry.miller.y, g_vector_entry.miller.z);
41 if (fft_grid_index >= 0) {
42 coefficients_real_space[fft_grid_index] = coefficients_g_space[plane_wave_index];
46 fft_wave.
inverse(coefficients_real_space.data());
51 const std::vector<Complex>& coefficients_real_space,
52 const std::vector<int>& g_vector_indices,
53 int number_of_plane_waves,
54 std::vector<Complex>& coefficients_g_space) {
56 std::vector<Complex> work(coefficients_real_space.begin(), coefficients_real_space.end());
63 const auto& g_vectors = g_vectors_grid.
g_vectors();
64 coefficients_g_space.assign(number_of_plane_waves,
Complex(0.0, 0.0));
65 for (
int plane_wave_index = 0; plane_wave_index < number_of_plane_waves;
67 const auto& g_vector_entry = g_vectors[g_vector_indices[plane_wave_index]];
69 g_vector_entry.miller.x, g_vector_entry.miller.y, g_vector_entry.miller.z);
70 if (fft_grid_index >= 0) {
71 coefficients_g_space[plane_wave_index] = work[fft_grid_index];