Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
fft_grid_factory.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * FFTGridFactory — abstract factory for FFT grid instances.
5 *
6 * Layer-3 consumers (PlanewaveFFTPair, PlanewaveBasis) need to create FFT
7 * grids without knowing which concrete implementation (serial FFTW, FFTW-MPI
8 * slab-decomposed, GPU) the run is using. That choice belongs to the
9 * execution policy at layer 4 — so layer 3 defines this interface and the
10 * PlanewaveExecutionPolicy implements it (dependency inversion: lower layers
11 * must not include higher-layer headers).
12 */
13
15
16#include <memory>
17
18namespace q3 {
19
21 public:
22 virtual ~FFTGridFactory() = default;
23
24 /**
25 * Create a new FFT grid instance appropriate for the active execution
26 * configuration (serial, MPI slab-decomposed, ...).
27 */
28 virtual std::unique_ptr<FFTGrid> create_fft_grid() const = 0;
29};
30
31} // namespace q3
virtual std::unique_ptr< FFTGrid > create_fft_grid() const =0
virtual ~FFTGridFactory()=default