Page MenuHomec4science

fftransform_fftw.hh
No OneTemporary

File Metadata

Created
Sat, May 25, 08:07

fftransform_fftw.hh

/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef FFTRANSFORM_FFTW_HH
#define FFTRANSFORM_FFTW_HH
#include "fftransform.hh"
#include "fftw_interface.hh"
namespace tamaas {
/**
* @brief Class wrapping fftw's interface
*/
template <typename T, UInt dim>
class FFTransformFFTW : public FFTransform<T, dim> {
using plan_t = typename fftw::helper<T>::plan;
using complex_t = typename fftw::helper<T>::complex;
public:
/// Constructor
FFTransformFFTW(Grid<T, dim>& real, GridHermitian<T, dim>& spectral);
/// Destructor
~FFTransformFFTW() override;
public:
/// Perform FFT
void forwardTransform() override;
/// Perform IFFT
void backwardTransform() override;
private:
plan_t forward_plan;
plan_t backward_plan;
};
} // namespace tamaas
#endif // FFTRANSFORM_FFTW_HH

Event Timeline