![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Abstract interface for the P3M reciprocal-space FFT. More...
#include <P3MFFTBackend.hpp>
Inheritance diagram for P3MFFTBackend< FloatType, FFTConfig >:Public Types | |
| using | ComplexType = std::complex< FloatType > |
| using | RSpaceScalar = FloatType |
| Real-space scalar type. | |
Public Member Functions | |
| virtual | ~P3MFFTBackend ()=default |
| virtual Utils::Vector3i | ks_local_ld_index () const =0 |
| Lower-left corner of this rank's k-space box (global coords). | |
| virtual Utils::Vector3i | ks_local_ur_index () const =0 |
| Upper-right corner (exclusive) of this rank's k-space box. | |
| virtual Utils::Vector3i | ks_local_size () const =0 |
| Extent of this rank's k-space box. | |
| virtual Utils::Vector3i | rs_local_size () const =0 |
| Extent of this rank's real-space (no-halo) box. | |
| virtual RSpaceScalar * | forward_input_buffer ()=0 |
| Persistent, transform-ready buffer for the caller to fill with the no-halo real-space input; holds product(rs_local_size()) elements. | |
| virtual void | forward (RSpaceScalar const *in, ComplexType *out)=0 |
| Forward transform (real/complex charge density to k-space). | |
| virtual void | backward (ComplexType *in, RSpaceScalar *out)=0 |
| Backward transform (k-space field to real space). | |
Abstract interface for the P3M reciprocal-space FFT.
P3M only ever touches the FFT through this handful of methods: the k-space box geometry accessors and the forward/backward transforms. Concrete backends (heFFTe for the general/distributed case, kokkos-fft for the single-rank case) implement it, so the solver is agnostic to which one is active. The transform buffers are flat, contiguous, no-halo arrays; halo exchange is handled outside the FFT.
Definition at line 37 of file P3MFFTBackend.hpp.
| using P3MFFTBackend< FloatType, FFTConfig >::ComplexType = std::complex<FloatType> |
Definition at line 38 of file P3MFFTBackend.hpp.
| using P3MFFTBackend< FloatType, FFTConfig >::RSpaceScalar = FloatType |
Real-space scalar type.
P3M's real-space buffers (charge density, E-field) are physically real in both configs, so this is always FloatType. For a c2c backend (use_r2c=false) the imaginary part is dropped on the backward transform via heFFTe's real-output convenience overload, matching the pre-backend-interface behaviour where the templated forward/backward transforms of P3MFFT accepted real pointers for either config.
Definition at line 47 of file P3MFFTBackend.hpp.
|
virtualdefault |
|
pure virtual |
Backward transform (k-space field to real space).
The input buffer is non-const by contract: a backend may destroy it during the transform (FFTW's multi-dimensional c2r has no preserve-input mode, so the kokkos-fft backend runs it in place). Callers must recompute the k-space input before reading it again.
Implemented in P3MFFTHeffte< FloatType, FFTConfig >.
|
pure virtual |
Forward transform (real/complex charge density to k-space).
Implemented in P3MFFTHeffte< FloatType, FFTConfig >.
|
pure virtual |
Persistent, transform-ready buffer for the caller to fill with the no-halo real-space input; holds product(rs_local_size()) elements.
Passing it back as forward's in lets a backend transform it in place.
Implemented in P3MFFTHeffte< FloatType, FFTConfig >.
|
pure virtual |
Lower-left corner of this rank's k-space box (global coords).
Implemented in P3MFFTHeffte< FloatType, FFTConfig >.
|
pure virtual |
Extent of this rank's k-space box.
Implemented in P3MFFTHeffte< FloatType, FFTConfig >.
|
pure virtual |
Upper-right corner (exclusive) of this rank's k-space box.
Implemented in P3MFFTHeffte< FloatType, FFTConfig >.
|
pure virtual |
Extent of this rank's real-space (no-halo) box.
Implemented in P3MFFTHeffte< FloatType, FFTConfig >.